/* Shared forum styles. The topic detail partial is rendered both as a page and
   inside the forum drawer, so its styles must live outside either Pug view. */
.forum-page,
.topic-page,
.forum-panel {
    --forum-blue: #155dfc;
    --forum-blue-dark: #0f49cf;
    --forum-blue-soft: #eef6ff;
    --forum-surface: rgba(255, 255, 255, .9);
    --forum-border: #dce8f5;
    --forum-muted: #62748e;
}

.forum-page {
    min-height: calc(100vh - var(--header-h));
    padding: 28px 0 56px;
    background:
        radial-gradient(circle at 12% 8%, rgba(14, 165, 233, .08), transparent 24rem),
        radial-gradient(circle at 88% 22%, rgba(99, 102, 241, .06), transparent 28rem);
}

.forum-shell {
    gap: 24px;
}

.forum-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    flex-basis: 256px;
    width: 256px;
    padding: 20px 14px 14px;
    border-color: var(--forum-border);
    border-radius: 18px;
    background: var(--forum-surface);
    box-shadow: 0 12px 34px rgba(15, 23, 43, .07);
    backdrop-filter: blur(16px);
}

.forum-sidebar__eyebrow {
    display: block;
    margin: 0 6px 5px;
    color: var(--forum-blue);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.forum-sidebar__title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 6px 18px;
    font-size: 18px;
    letter-spacing: -.02em;
}

.forum-sidebar__icon,
.forum-main__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0ea5e9, var(--forum-blue));
    color: #fff;
    box-shadow: 0 7px 16px rgba(21, 93, 252, .2);
}

.forum-sidebar__icon svg,
.forum-main__icon svg {
    width: 16px;
    height: 16px;
}

.forum-channels {
    gap: 6px;
}

.forum-channel {
    position: relative;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: 13px;
}

.forum-channel:hover {
    border-color: #dbeafe;
    background: #f7fbff;
}

.forum-channel.active {
    border-color: #cfe3ff;
    background: linear-gradient(90deg, #eaf5ff, #f1f5ff);
    box-shadow: inset 3px 0 0 var(--forum-blue);
}

.forum-channel__hash {
    font-size: 15px;
}

.forum-main {
    min-height: 540px;
    max-height: calc(100vh - var(--header-h) - 56px);
    border-color: var(--forum-border);
    border-radius: 18px;
    background: var(--forum-surface);
    box-shadow: 0 14px 38px rgba(15, 23, 43, .08);
    backdrop-filter: blur(16px);
}

.forum-main__header {
    align-items: center;
    padding: 18px 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 251, 255, .88));
}

.forum-main__heading {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.forum-main__heading-copy {
    min-width: 0;
}

.forum-main__icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
}

.forum-main__title {
    font-size: 18px;
    letter-spacing: -.02em;
}

.forum-main__desc {
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-main__count {
    padding: 6px 10px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #f5f9ff;
    color: #47617e;
    font-weight: 700;
}

.forum-feed {
    flex: 1 1 auto;
    max-height: none;
    padding: 10px 12px;
    scrollbar-color: #cbdced transparent;
    scrollbar-width: thin;
}

.forum-post {
    width: 100%;
    padding: 14px 12px;
    border: 1px solid transparent;
    background: transparent;
    color: inherit;
    font-family: inherit;
}

.forum-post + .forum-post {
    border-top-color: #edf2f7;
    border-radius: 0 0 12px 12px;
}

.forum-post:hover {
    border-color: #dcecff;
    background: #f8fbff;
    box-shadow: 0 6px 18px rgba(21, 93, 252, .05);
}

.forum-post:focus-visible {
    outline: 3px solid rgba(14, 165, 233, .22);
    outline-offset: -2px;
}

.forum-post__avatar {
    width: 40px;
    height: 40px;
    box-shadow: 0 0 0 3px #edf6ff;
}

.forum-post__meta {
    gap: 7px;
}

.forum-post__time::before {
    content: "•";
    margin-right: 7px;
    color: #c2cfdd;
}

.forum-post__content {
    margin-top: 5px;
    color: var(--ink-700);
    font-size: 13.5px;
    line-height: 1.65;
}

.forum-post__shared-url,
.topic-card__shared-url {
    display: block;
    width: min(440px, 100%);
    margin-top: 3px;
    overflow: hidden;
    color: #52677f;
    font-size: 11px;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-post__shared-url:hover,
.topic-card__shared-url:hover {
    color: var(--forum-blue);
}

.forum-post__link {
    border-color: #dce8f5;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.forum-post__link-source,
.topic-card__link-source {
    color: #667085 !important;
    font-size: 10px !important;
    font-weight: 500;
    text-transform: uppercase;
}

.forum-post__link-description,
.topic-card__link-description {
    display: -webkit-box !important;
    margin-top: 2px;
    overflow: hidden;
    color: #667085 !important;
    font-size: 11px !important;
    line-height: 1.35;
    white-space: normal !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.forum-post__footer {
    gap: 8px;
    margin-top: 10px;
}

.forum-post__comments {
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid #e2ebf4;
    border-radius: 999px;
    background: #fff;
    color: var(--ink-600);
}

.forum-empty {
    margin: auto;
    padding: 48px 20px;
    line-height: 1.6;
}

.forum-empty__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 16px;
    background: var(--forum-blue-soft);
    color: var(--forum-blue);
    font-size: 22px;
}

.forum-composer {
    position: relative;
    margin: 0;
    padding: 14px 16px 16px;
    border-top: 1px solid var(--forum-border);
    background: rgba(255, 255, 255, .96);
}

.forum-composer--sharing {
    align-items: flex-end;
    flex-wrap: wrap;
}

.forum-share-draft {
    position: relative;
    flex: 0 0 100%;
    padding: 0 42px 10px 0;
}

.forum-share-draft__label {
    display: block;
    margin-bottom: 7px;
    color: #475467;
    font-size: 11px;
    font-weight: 700;
}

.forum-share-draft__close {
    position: absolute !important;
    top: -5px;
    right: 0 !important;
    bottom: auto !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px !important;
    height: 28px !important;
    padding: 0;
    border: 1px solid #dce8f5;
    border-radius: 50%;
    background: #fff !important;
    color: #667085 !important;
    font-size: 18px !important;
    font-weight: 400;
    line-height: 1;
    box-shadow: 0 2px 7px rgba(16, 24, 40, .08) !important;
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease, background .15s ease !important;
}

.forum-share-draft__close:hover {
    border-color: #f2b8b5;
    background: #fff5f5 !important;
    color: #d92d20 !important;
}

.forum-share-draft__close:focus-visible {
    outline: 3px solid rgba(21, 93, 252, .18);
    outline-offset: 2px;
}

.forum-share-draft__card {
    display: flex;
    width: min(520px, 100%);
    overflow: hidden;
    border: 1px solid #dce8f5;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(16, 24, 40, .05);
}

.forum-share-draft__media {
    flex: 0 0 112px;
    width: 112px;
    min-height: 78px;
    background: #f2f4f7;
}

.forum-share-draft__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.forum-share-draft__body {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
    padding: 9px 11px;
}

.forum-share-draft__body strong {
    overflow: hidden;
    color: #101828;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-share-draft__body span {
    display: -webkit-box;
    overflow: hidden;
    color: #667085;
    font-size: 10px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.forum-share-draft__body small {
    color: #98a2b3;
    font-size: 9px;
    text-transform: uppercase;
}

.forum-composer textarea {
    min-height: 46px;
    height: 46px;
    padding: 12px 52px 12px 16px;
    border-color: #d9e5f2;
    border-radius: 14px;
    background: #f7faff;
}

.forum-composer button {
    position: absolute;
    right: 22px;
    bottom: 21px;
    width: 36px;
    height: 36px;
    box-shadow: 0 6px 14px rgba(21, 93, 252, .22);
}

.forum-composer--locked {
    justify-content: center;
    color: var(--forum-muted);
    font-size: 13px;
}

.forum-composer--locked::before {
    content: "🔒";
    font-size: 13px;
}

.forum-composer--locked .forum-composer__login {
    position: static;
}

/* Drawer */
.forum-overlay {
    background: rgba(15, 23, 43, .48);
    backdrop-filter: blur(3px);
}

.forum-panel {
    width: min(560px, 100vw);
    border-left: 1px solid rgba(205, 220, 236, .8);
    box-shadow: -22px 0 60px rgba(15, 23, 43, .2);
}

.forum-panel__header {
    min-height: 72px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, .96);
}

.forum-panel__heading {
    min-width: 0;
}

.forum-panel__eyebrow {
    display: block;
    margin-bottom: 2px;
    color: var(--forum-blue);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.forum-panel__title {
    overflow: hidden;
    font-size: 17px;
    letter-spacing: -.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-panel__close {
    width: 38px;
    height: 38px;
    border: 1px solid #e0e9f2;
    border-radius: 12px;
    background: #f7faff;
    font-size: 0;
}

.forum-panel__close::before,
.forum-panel__close::after {
    position: absolute;
    width: 15px;
    height: 1.5px;
    border-radius: 2px;
    background: #52657b;
    content: "";
    transform: rotate(45deg);
}

.forum-panel__close::after {
    transform: rotate(-45deg);
}

.forum-panel__close:hover {
    border-color: #cfe0f1;
    background: #eef5fc;
}

.forum-panel__body {
    padding: 0;
    background: #f6f9fc;
}

.forum-panel__body .topic-card {
    margin: 0;
    padding: 22px 22px 20px;
    border-bottom: 1px solid var(--forum-border);
    border-radius: 0;
    background: #fff;
}

.forum-panel__body .comments {
    margin: 0;
    padding: 22px;
}

.forum-panel__body .comment-composer {
    position: sticky;
    bottom: -22px;
    z-index: 2;
    margin: 18px -22px -22px;
    padding: 14px 22px;
    border-top: 1px solid var(--forum-border);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
}

.forum-panel__loading,
.forum-panel__error {
    display: grid;
    min-height: 240px;
    place-items: center;
    padding: 32px;
    color: var(--forum-muted);
    font-size: 13px;
    text-align: center;
}

.forum-panel__spinner {
    width: 30px;
    height: 30px;
    margin: 0 auto 12px;
    border: 3px solid #dbeafe;
    border-top-color: var(--forum-blue);
    border-radius: 50%;
    animation: forum-spin .75s linear infinite;
}

@keyframes forum-spin {
    to { transform: rotate(360deg); }
}

/* Topic detail, shared by the standalone page and drawer */
.topic-page {
    min-height: calc(100vh - var(--header-h));
    background: linear-gradient(180deg, #f8fbff, #fff 35%);
}

.topic-card {
    padding: 22px;
    border: 1px solid var(--forum-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 12px 34px rgba(15, 23, 43, .07);
}

.topic-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topic-card__avatar,
.comment-item__avatar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, var(--forum-blue));
    color: #fff;
    font-weight: 800;
}

.topic-card__avatar {
    width: 44px;
    height: 44px;
    box-shadow: 0 0 0 4px #edf6ff;
}

.topic-card__avatar img,
.comment-item__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.topic-card__author {
    color: var(--ink-900);
    font-size: 14px;
    font-weight: 800;
}

.topic-card__time {
    margin-top: 2px;
    color: var(--forum-muted);
    font-size: 11px;
}

.topic-card__title {
    margin: 18px 0 0;
    color: var(--ink-900);
    font-size: 21px;
    line-height: 1.35;
    letter-spacing: -.025em;
}

.topic-card__content {
    margin: 12px 0 0;
    color: var(--ink-700);
    font-size: 14px;
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: break-word;
}

.topic-card__link {
    display: flex;
    gap: 14px;
    margin-top: 16px;
    padding: 12px;
    border: 1px solid var(--forum-border);
    border-radius: 14px;
    background: #f9fbfe;
}

.topic-card__link:hover {
    border-color: #bdd8fa;
    box-shadow: 0 8px 22px rgba(21, 93, 252, .08);
}

.topic-card__link-media {
    flex: 0 0 auto;
    width: 140px;
    height: 96px;
    overflow: hidden;
    border-radius: 10px;
    background: linear-gradient(135deg, #dbeafe, #eef2ff);
}

.topic-card__link-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.topic-card__link-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.topic-card__link-body strong {
    color: var(--ink-900);
    font-size: 14px;
    line-height: 1.45;
}

.topic-card__link-body span {
    overflow: hidden;
    color: var(--forum-blue);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topic-card__footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid #edf2f7;
}

.topic-comment-count {
    color: var(--forum-muted);
    font-size: 12px;
}

.comments {
    margin-top: 24px;
}

.comments__title {
    margin: 0 0 16px;
    color: var(--ink-900);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.015em;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.comment-item__avatar {
    width: 34px;
    height: 34px;
    font-size: 11px;
    box-shadow: 0 0 0 3px #eaf3fc;
}

.comment-item__bubble {
    min-width: 0;
    flex: 1 1 auto;
    padding: 11px 13px;
    border: 1px solid #dfe9f3;
    border-radius: 4px 14px 14px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(15, 23, 43, .035);
}

.comment-item__meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.comment-item__author {
    color: var(--ink-900);
    font-size: 12px;
    font-weight: 800;
}

.comment-item__time {
    color: var(--ink-400);
    font-size: 10px;
}

.comment-item__content {
    margin: 4px 0 0;
    color: var(--ink-700);
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.comments-empty {
    padding: 28px 18px;
    border: 1px dashed #d5e2ef;
    border-radius: 14px;
    background: rgba(255, 255, 255, .6);
    color: var(--forum-muted);
    font-size: 13px;
    line-height: 1.55;
    text-align: center;
}

.comment-composer {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 16px;
}

.comment-composer input,
.comment-composer textarea {
    min-width: 0;
    flex: 1 1 auto;
    height: 44px;
    padding: 0 15px;
    border: 1px solid #d9e5f2;
    border-radius: 13px;
    outline: 0;
    background: #f7faff;
    color: var(--ink-800);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.4;
}

.comment-composer textarea {
    max-height: 120px;
    padding: 12px 15px;
    resize: none;
    overflow-y: auto;
}

.comment-composer input:focus,
.comment-composer textarea:focus {
    border-color: #60a5fa;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, .12);
}

.comment-composer button {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, #0ea5e9, var(--forum-blue));
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(21, 93, 252, .22);
}

.comment-composer button:disabled,
.forum-composer button:disabled {
    opacity: .55;
    cursor: wait;
}

.comment-login {
    margin: 16px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--forum-blue-soft);
    color: var(--forum-muted);
    font-size: 13px;
    text-align: center;
}

.comment-login a {
    color: var(--forum-blue);
    font-weight: 800;
}

@media (max-width: 900px) {
    .forum-page {
        padding-top: 18px;
    }

    .forum-shell {
        gap: 14px;
    }

    .forum-sidebar {
        position: static;
        flex: 0 0 auto;
        width: 100%;
        padding: 14px;
    }

    .forum-sidebar__eyebrow {
        display: none;
    }

    .forum-sidebar__title {
        margin-bottom: 12px;
    }

    .forum-channels {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .forum-channels::-webkit-scrollbar {
        display: none;
    }

    .forum-channel {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .forum-main {
        width: 100%;
        min-height: 520px;
        max-height: none;
    }

    .forum-feed {
        max-height: 58vh;
    }
}

@media (max-width: 560px) {
    .forum-page {
        padding: 12px 0 32px;
    }

    .forum-shell {
        padding: 0 12px;
    }

    .forum-sidebar,
    .forum-main {
        border-radius: 15px;
    }

    .forum-sidebar__title {
        font-size: 16px;
    }

    .forum-sidebar__icon {
        width: 28px;
        height: 28px;
    }

    .forum-main__header {
        padding: 14px 16px;
    }

    .forum-main__icon {
        display: none;
    }

    .forum-main__count {
        padding: 5px 8px;
        font-size: 10px;
    }

    .forum-main__desc {
        max-width: 180px;
    }

    .forum-feed {
        padding: 7px;
    }

    .forum-post {
        gap: 10px;
        padding: 12px 8px;
    }

    .forum-post__avatar {
        width: 36px;
        height: 36px;
    }

    .forum-post__footer {
        flex-wrap: wrap;
    }

    .forum-post__link {
        flex-direction: column;
    }

    .forum-post__link-media,
    .topic-card__link-media {
        width: 100%;
        height: 150px;
    }

    .forum-composer {
        padding: 10px 12px 12px;
    }

    .forum-composer button {
        right: 18px;
        bottom: 17px;
    }

    .forum-panel__header {
        min-height: 64px;
        padding: 11px 14px;
    }

    .forum-panel__body .topic-card {
        padding: 18px 16px;
    }

    .forum-panel__body .comments {
        padding: 18px 16px;
    }

    .forum-panel__body .comment-composer {
        bottom: -18px;
        margin: 16px -16px -18px;
        padding: 12px 16px;
    }

    .topic-card__title {
        font-size: 19px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .forum-panel,
    .forum-overlay,
    .forum-post {
        transition: none;
    }

    .forum-panel__spinner {
        animation-duration: 1.5s;
    }
}

/* --------------------------------------------------------------------------
   Figma frame 119:2656 — flat, full-height community chat layout.
   These rules intentionally override the earlier card treatment while the
   shared topic/detail styles above remain available to the drawer.
   -------------------------------------------------------------------------- */
.forum-page {
    min-height: calc(100vh - var(--header-h));
    padding: 0;
    background: #fff;
}

.forum-shell {
    align-items: stretch;
    width: 100%;
    min-height: calc(100vh - var(--header-h));
    margin: 0;
    padding: 0;
    gap: 0;
}

.forum-sidebar {
    position: static;
    flex: 0 0 280px;
    width: 280px;
    padding: 26px 16px;
    border: 0;
    border-right: 1px solid #e7eaf0;
    border-radius: 0;
    background: #f7f8fb;
    box-shadow: none;
    backdrop-filter: none;
}

.forum-sidebar > .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.forum-channels {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.forum-channel {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 9px 14px;
    border: 0;
    border-radius: 7px;
    color: #667085;
    font-size: 13px;
    font-weight: 500;
}

.forum-channel:hover {
    border: 0;
    background: #eef2f8;
    color: #344054;
}

.forum-channel.active {
    border: 0;
    background: #e8f0ff;
    color: #155dfc;
    box-shadow: none;
    font-weight: 700;
}

.forum-channel__hash {
    flex: 0 0 auto;
    color: #98a2b3;
    font-size: 13px;
}

.forum-channel.active .forum-channel__hash {
    color: #155dfc;
}

.forum-channel__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-channel__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 21px;
    height: 21px;
    margin-left: auto;
    padding: 0 6px;
    border-radius: 999px;
    background: #155dfc;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.forum-main {
    min-width: 0;
    min-height: calc(100vh - var(--header-h));
    max-height: calc(100vh - var(--header-h));
    flex: 1 1 auto;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    backdrop-filter: none;
}

.forum-main__header {
    min-height: 96px;
    padding: 22px 32px 18px;
    border-bottom: 1px solid #eef0f4;
    background: #fff;
}

.forum-main__heading {
    gap: 0;
}

.forum-main__title {
    gap: 7px;
    color: #101828;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.015em;
}

.forum-main__hash {
    color: #101828;
}

.forum-main__desc {
    max-width: none;
    margin-top: 5px;
    color: #98a2b3;
    font-size: 12px;
    line-height: 1.45;
}

.forum-main__presence {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    color: #667085;
    font-size: 11px;
    white-space: nowrap;
}

.forum-main__presence-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #12b76a;
    box-shadow: 0 0 0 3px #ecfdf3;
}

.forum-feed {
    flex: 1 1 auto;
    gap: 0;
    max-height: none;
    padding: 14px 0 24px;
    scroll-padding-bottom: 24px;
    background: #fff;
}

.forum-post {
    gap: 14px;
    width: 100%;
    padding: 11px 32px;
    border: 0;
    border-radius: 0;
    background: #fff;
    transition: background-color .15s ease;
}

.forum-post + .forum-post {
    border: 0;
    border-radius: 0;
}

.forum-post:hover {
    border: 0;
    background: #fafbfc;
    box-shadow: none;
}

.forum-post:focus-visible {
    outline: 2px solid #84adff;
    outline-offset: -2px;
}

.forum-post__avatar {
    width: 44px;
    height: 44px;
    border: 0;
    background: #e8f1ff;
    box-shadow: none;
    color: #316bd6;
    font-size: 12px;
    font-weight: 700;
}

.forum-post__body {
    max-width: 760px;
}

.forum-post__meta {
    align-items: center;
    gap: 9px;
    min-height: 20px;
}

.forum-post__author {
    color: #101828;
    font-size: 13px;
    font-weight: 700;
}

.forum-post__time {
    color: #98a2b3;
    font-size: 10px;
}

.forum-post__time::before {
    display: none;
}

.forum-post__title {
    margin-top: 3px;
    color: #101828;
    font-size: 13px;
}

.forum-post__content {
    margin-top: 3px;
    color: #344054;
    font-size: 13px;
    line-height: 1.55;
}

.forum-post__link {
    flex-direction: column;
    gap: 0;
    width: min(440px, 100%);
    max-width: 440px;
    margin-top: 12px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.forum-post__link-media {
    width: 100%;
    height: 210px;
    border-radius: 0;
    background: #f2f4f7;
}

.forum-post__link-body {
    gap: 4px;
    padding: 11px 13px 12px;
}

.forum-post__link-body strong {
    color: #101828;
    font-size: 13px;
    line-height: 1.4;
}

.forum-post__link-body span {
    color: #98a2b3;
    font-size: 10px;
}

.forum-post__footer {
    gap: 15px;
    margin-top: 7px;
}

.forum-post__comments {
    min-height: 20px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #3478df;
    font-size: 10px;
}

.forum-empty {
    margin: auto;
    color: #98a2b3;
}

.forum-empty__icon {
    border-radius: 50%;
    background: #f2f4f7;
    color: #667085;
}

.forum-composer {
    flex: 0 0 auto;
    min-height: 76px;
    margin: 0;
    padding: 12px 32px 14px;
    border-top: 1px solid #eef0f4;
    background: #fff;
}

.forum-composer::before {
    display: none;
}

.forum-composer__plus {
    position: absolute;
    left: 48px;
    bottom: 28px;
    z-index: 1;
    color: #7c8da5;
    font-size: 22px;
    font-weight: 300;
    line-height: 1;
}

.forum-composer textarea {
    min-height: 48px;
    height: 48px;
    max-height: 112px;
    padding: 13px 58px 12px 46px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #eef7ff;
    color: #344054;
}

.forum-composer textarea::placeholder {
    color: #98a2b3;
}

.forum-composer textarea:focus {
    border-color: #9cc7fb;
    background: #f4f9ff;
    box-shadow: 0 0 0 3px rgba(53, 127, 224, .08);
}

.forum-composer button {
    right: 43px;
    bottom: 22px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0ea5e9;
    box-shadow: none;
    font-size: 16px;
}

.forum-composer--locked {
    display: flex;
    justify-content: flex-start;
    padding: 12px 32px 14px;
    color: #7c8da5;
}

.forum-composer--locked > span:last-child {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    padding: 0 16px 0 46px;
    border-radius: 8px;
    background: #eef7ff;
}

.forum-composer--locked .forum-composer__plus {
    position: absolute;
}

.forum-composer__login {
    margin-right: 4px;
    color: #3478df;
}

@media (max-width: 900px) {
    .forum-shell {
        flex-direction: column;
    }

    .forum-sidebar {
        flex: 0 0 auto;
        width: 100%;
        padding: 10px 14px;
        border-right: 0;
        border-bottom: 1px solid #e7eaf0;
    }

    .forum-channels {
        flex-direction: row;
        gap: 6px;
    }

    .forum-channel {
        min-height: 36px;
        padding: 7px 12px;
    }

    .forum-main {
        min-height: calc(100vh - var(--header-h) - 57px);
        max-height: none;
    }

    .forum-main__header {
        min-height: 84px;
        padding: 17px 20px 15px;
    }

    .forum-feed {
        min-height: 420px;
        max-height: none;
    }

    .forum-post {
        padding-right: 20px;
        padding-left: 20px;
    }

    .forum-composer,
    .forum-composer--locked {
        padding-right: 20px;
        padding-left: 20px;
    }

    .forum-composer__plus {
        left: 36px;
    }

    .forum-composer button {
        right: 31px;
    }
}

@media (max-width: 560px) {
    .forum-shell {
        padding: 0;
    }

    .forum-sidebar,
    .forum-main {
        border-radius: 0;
    }

    .forum-sidebar {
        overflow: hidden;
    }

    .forum-main__header {
        min-height: 78px;
        padding: 15px 16px 13px;
    }

    .forum-main__title {
        font-size: 16px;
    }

    .forum-main__desc {
        max-width: 230px;
        font-size: 11px;
    }

    .forum-main__presence {
        display: none;
    }

    .forum-feed {
        padding-top: 8px;
    }

    .forum-post {
        gap: 11px;
        padding: 10px 16px;
    }

    .forum-post__avatar {
        width: 38px;
        height: 38px;
    }

    .forum-post__link-media {
        height: 170px;
    }

    .forum-composer,
    .forum-composer--locked {
        min-height: 68px;
        padding: 9px 12px 11px;
    }

    .forum-composer__plus {
        left: 27px;
        bottom: 25px;
    }

    .forum-composer textarea {
        min-height: 46px;
        height: 46px;
    }

    .forum-composer button {
        right: 21px;
        bottom: 18px;
    }

    .forum-composer--locked > span:last-child {
        min-height: 46px;
        padding-right: 10px;
        font-size: 11px;
    }
}

/* --------------------------------------------------------------------------
   Discord-style reactions. Shared by feed posts, the topic card and comments.
   A bar with no pills collapses to nothing: its only child is the "+" button,
   which is taken out of flow so an un-reacted message keeps its exact layout.
   -------------------------------------------------------------------------- */
.forum-reactions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

/* An empty bar stops being a box entirely, so it neither takes height in a
   comment bubble nor earns a `gap` slot in the post footer. Its only child is
   the out-of-flow "+" button, which keeps positioning against the message. */
.forum-reactions.is-empty {
    display: contents;
}

.forum-reaction {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 24px;
    padding: 3px 9px;
    border: 1px solid #e4e7ec;
    border-radius: 999px;
    background: #f7f9fc;
    color: #475467;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.forum-reaction:hover {
    border-color: #bcd6f4;
    background: #eef6ff;
    color: #1d4ed8;
}

.forum-reaction.is-active {
    border-color: #9cc7fb;
    background: #e3eeff;
    color: #1d4ed8;
}

.forum-reaction__emoji {
    font-size: 13px;
    line-height: 1;
}

.forum-reaction__count {
    font-variant-numeric: tabular-nums;
}

/* Applied by the poller when a count moves, so a reaction someone else just cast
   is noticed instead of silently ticking over. `is-new` is the stronger cue: it
   marks an emoji that was not on the message a moment ago. */
@keyframes forum-reaction-bump {
    0% { transform: scale(1); }
    35% { transform: scale(1.28); }
    70% { transform: scale(.96); }
    100% { transform: scale(1); }
}

@keyframes forum-reaction-pop {
    0% { transform: scale(.4); opacity: 0; }
    60% { transform: scale(1.18); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.forum-reaction.is-bumped {
    animation: forum-reaction-bump .45s cubic-bezier(.2, .9, .3, 1.2);
}

.forum-reaction.is-new {
    animation: forum-reaction-pop .4s cubic-bezier(.2, .9, .3, 1.2);
}

/* Comment totals are reused in place rather than re-created, so they grow from
   their left edge to avoid nudging the rest of the footer around. */
[data-comment-count].is-bumped {
    display: inline-flex;
    transform-origin: left center;
    animation: forum-reaction-bump .45s cubic-bezier(.2, .9, .3, 1.2);
}

.forum-reaction-add {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #fff;
    color: #667085;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 2px 6px rgba(16, 24, 40, .08);
    transition: opacity .15s ease, color .15s ease, border-color .15s ease;
}

.forum-reaction-add svg {
    width: 15px;
    height: 15px;
}

.forum-reaction-add:hover,
.forum-reaction-add.is-open {
    border-color: #bcd6f4;
    color: #1d4ed8;
}

.forum-post:hover .forum-reaction-add,
.forum-post:focus-within .forum-reaction-add,
.comment-item:hover .forum-reaction-add,
.comment-item:focus-within .forum-reaction-add,
.forum-reaction-add:focus-visible,
.forum-reaction-add.is-open {
    opacity: 1;
    visibility: visible;
}

.forum-post {
    position: relative;
}

.forum-post .forum-reactions.is-empty .forum-reaction-add {
    top: 10px;
    right: 12px;
}

.comment-item__bubble {
    position: relative;
}

.comment-item__bubble .forum-reactions:not(.is-empty) {
    margin-top: 8px;
}

.comment-item__bubble .forum-reactions.is-empty .forum-reaction-add {
    top: -12px;
    right: 8px;
}

/* On the detail card reacting is a primary action rather than a hover
   affordance, so the button sits inline and stays visible. */
.topic-card__footer .forum-reaction-add {
    position: static;
    opacity: 1;
    visibility: visible;
    width: 30px;
    height: 30px;
    box-shadow: none;
}

/* Once a message has reactions the button joins the row as a trailing pill —
   Discord's placement — instead of floating over the message corner. It is only
   the un-reacted case that falls back to the hover affordance above, where
   reserving inline space would shift the footer around. */
.forum-reactions:not(.is-empty) .forum-reaction-add {
    position: static;
    width: auto;
    min-width: 30px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: #f7f9fc;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
}

.forum-reactions:not(.is-empty) .forum-reaction-add:hover,
.forum-reactions:not(.is-empty) .forum-reaction-add.is-open {
    background: #eef6ff;
}

.forum-reaction-picker {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1200;
    display: none;
    flex-wrap: wrap;
    gap: 2px;
    max-width: 232px;
    padding: 6px;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(16, 24, 40, .16);
}

.forum-reaction-picker.is-open {
    display: flex;
}

.forum-reaction-picker button {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease;
}

.forum-reaction-picker button:hover,
.forum-reaction-picker button:focus-visible {
    background: #eef6ff;
}

.forum-reaction-picker button.is-active {
    background: #e3eeff;
    box-shadow: inset 0 0 0 1px #9cc7fb;
}

/* Touch devices have no hover state to reveal the button on. */
@media (hover: none) {
    .forum-reaction-add {
        opacity: 1;
        visibility: visible;
    }
}

@media (prefers-reduced-motion: reduce) {
    .forum-reaction,
    .forum-reaction-add,
    .forum-reaction-picker button {
        transition: none;
    }

    .forum-reaction.is-bumped,
    .forum-reaction.is-new,
    [data-comment-count].is-bumped {
        animation: none;
    }
}

/* Comment count bar below each feed card. */
.forum-post__footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    width: min(440px, 100%);
    margin-top: 7px;
}

.forum-post__comments {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 32px;
    padding: 7px 10px 7px 9px;
    border: 0;
    border-left: 3px solid #1683ff;
    border-radius: 6px;
    background: #f1f3f6;
    color: #146cf0;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
}

.forum-post__comments::before {
    content: "";
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    background: #146cf0;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8z'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (max-width: 560px) {
    .forum-post__footer {
        width: 100%;
    }
}
