:root {
    --community-bg: #f7f3ff;
    --community-surface: rgba(255, 255, 255, 0.82);
    --community-surface-strong: #fcf9ff;
    --community-border: rgba(91, 57, 159, 0.14);
    --community-text: #221433;
    --community-muted: #65557f;
    --community-primary: #6b46c1;
    --community-secondary: #8b5cf6;
    --community-accent: #381a7d;
    --community-shadow: 0 24px 80px rgba(91, 57, 159, 0.16);
    --community-radius-xl: 32px;
    --community-radius-lg: 24px;
    --community-radius-md: 18px;
    --community-radius-sm: 12px;
}

body.community-body {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    scrollbar-gutter: stable;
    color: var(--community-text);
    background:
    radial-gradient(circle at top left, rgba(107, 70, 193, 0.16), transparent 32%),
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.14), transparent 24%),
    linear-gradient(180deg, #fcfaff 0%, #f2ebff 100%);
}

body.community-body #header-section,
body.community-body #cookie-banner-container,
body.community-body #footer-section {
    flex-shrink: 0;
}

.community-backdrop {
    inset: 0;
    pointer-events: none;
    position: fixed;
    z-index: -1;
}

.community-backdrop__orb {
    border-radius: 999px;
    filter: blur(18px);
    opacity: 0.75;
    position: absolute;
}

.community-backdrop__orb--one {
    background: rgba(107, 70, 193, 0.18);
    height: 340px;
    left: -90px;
    top: 110px;
    width: 340px;
}

.community-backdrop__orb--two {
    background: rgba(139, 92, 246, 0.16);
    height: 280px;
    right: -70px;
    top: 260px;
    width: 280px;
}

.community-backdrop__grid {
    background-image:
        linear-gradient(rgba(91, 57, 159, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(91, 57, 159, 0.04) 1px, transparent 1px);
    background-position: center;
    background-size: 48px 48px;
    inset: 0;
    opacity: 0.45;
    position: absolute;
}

.community-page,
.project-page {
    margin: 0 auto;
    max-width: 1380px;
    padding: 134px 24px 72px;
    width: 100%;
}

body.community-body:not(.project-body) .community-page {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    max-width: min(1880px, calc(100vw - 12px));
    min-height: 0;
    padding: 126px 10px 0;
}

.community-hero,
.project-hero {
    align-items: stretch;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
    margin-bottom: 32px;
}

.community-hero__content,
.project-hero__content,
.community-hero__panel,
.project-cover-card,
.community-card,
.composer-card,
.feed-card,
.project-section,
.project-sidebar-card,
.project-loading,
.project-error {
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    background: var(--community-surface);
    border: 1px solid var(--community-border);
    border-radius: var(--community-radius-xl);
    box-shadow: var(--community-shadow);
}

.community-hero__content,
.project-hero__content {
    overflow: hidden;
    padding: 38px;
    position: relative;
}

.community-hero__content::before,
.project-hero__content::before {
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.16), rgba(139, 92, 246, 0.12) 60%, transparent 100%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.community-hero__content > *,
.project-hero__content > * {
    position: relative;
    z-index: 1;
}

.community-badge,
.project-badge,
.project-breadcrumb {
    align-items: center;
    background: rgba(107, 70, 193, 0.1);
    border: 1px solid rgba(107, 70, 193, 0.12);
    border-radius: 999px;
    color: var(--community-accent);
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.86rem;
    gap: 8px;
    letter-spacing: 0.04em;
    padding: 10px 14px;
    text-transform: uppercase;
}

.community-hero h1,
.project-hero h1 {
    font-family: "Satoshi-Black", sans-serif;
    font-size: clamp(2.4rem, 5vw, 4.4rem);
    letter-spacing: -0.05em;
    line-height: 0.95;
    margin: 18px 0 16px;
    max-width: 12ch;
}

.community-hero p,
.project-hero p,
.community-card p,
.feed-card__body,
.project-post__body,
.comment-card__body,
.project-empty,
.community-empty {
    color: var(--community-muted);
    font-family: "Satoshi-Regular", sans-serif;
    font-size: 1rem;
    line-height: 1.65;
}

.community-hero__actions,
.project-hero__actions,
.project-links,
.composer-actions,
.feed-card__footer,
.feed-card__meta,
.project-meta,
.project-pill-row,
.project-stats,
.project-section__meta,
.comment-card__meta,
.community-stats,
.tag-cloud,
.project-tags,
.project-team,
.project-stack,
.project-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.community-btn,
.project-link-button,
.project-link-item {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    gap: 10px;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.community-btn:hover,
.project-link-button:hover,
.project-link-item:hover {
    transform: translateY(-2px);
}

.community-btn--primary,
.project-link-button {
    background: linear-gradient(135deg, #5a3aa0 0%, #6b46c1 35%, #7b51d8 68%, #8b5cf6 100%);
    box-shadow: 0 14px 30px rgba(107, 70, 193, 0.28);
    color: #ffffff;
    padding: 14px 20px;
}

.community-btn--secondary {
    background: rgba(107, 70, 193, 0.08);
    color: var(--community-accent);
    padding: 14px 20px;
}

.community-hero__panel,
.project-cover-card {
    overflow: hidden;
    padding: 24px;
}

.signal-card {
    background: linear-gradient(150deg, #381a7d 0%, #6342b0 32%, #7b51d8 66%, #8b5cf6 100%);
    border-radius: calc(var(--community-radius-xl) - 8px);
    color: #ffffff;
    min-height: 100%;
    padding: 26px;
}

.signal-card__eyebrow,
.community-card__eyebrow,
.feed-card__eyebrow,
.project-section__eyebrow {
    color: rgba(255, 255, 255, 0.8);
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
    text-transform: uppercase;
}

.community-card__eyebrow,
.feed-card__eyebrow,
.project-section__eyebrow {
    color: var(--community-secondary);
}

.signal-card__list,
.project-detail-list {
    display: grid;
    gap: 14px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.signal-card__list li,
.project-detail-list li {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    line-height: 1.55;
}

.signal-card__list li::before,
.project-detail-list li::before {
    color: var(--community-primary);
    content: "•";
    font-size: 1.2rem;
    line-height: 1;
}

.signal-card__list--compact {
    gap: 10px;
}

.community-layout,
.project-layout {
    display: grid;
    gap: 22px;
    grid-template-columns: 1fr;
}

body.community-body:not(.project-body) .community-layout {
    align-items: stretch;
    flex: 1 1 auto;
    gap: 16px;
    grid-template-columns: minmax(280px, 1fr) minmax(360px, 2.2fr) minmax(240px, 0.9fr);
    min-height: 100%;
}

body.community-body:not(.project-body) .community-hero {
    gap: 16px;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 0.92fr);
}

.community-sidebar,
.project-sidebar {
    display: grid;
    gap: 22px;
    height: fit-content;
    position: sticky;
    top: 110px;
}

/* Community-page specific: sidebars sized to content, sticky at top (LinkedIn-style) */
body.community-body:not(.project-body) .community-sidebar--left,
body.community-body:not(.project-body) .community-sidebar--right {
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 0;
    height: auto;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
    position: sticky;
    top: 110px;
}

body.community-body:not(.project-body) .community-sidebar--left {
    background: var(--community-surface);
    border: 1px solid var(--community-border);
    border-radius: var(--community-radius-xl);
    box-shadow: var(--community-shadow);
    display: flex;
    flex-direction: column;
    height: calc(95vh - 130px);
    margin-bottom: 20px;
    overflow: hidden;
    padding: 16px;
}

body.community-body:not(.project-body) .community-sidebar--left .community-chat-header {
    flex-shrink: 0;
}

body.community-body:not(.project-body) .community-sidebar--left .community-chat-search {
    flex-shrink: 0;
}

body.community-body:not(.project-body) .community-sidebar--left .chat-list {
    flex: 1 1 auto;
    max-height: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ── Left nav accordion (Facebook-style) ───────────────────────────────── */
.left-nav {
    overflow: hidden;
}

.left-nav__search {
    border-bottom: 1px solid var(--community-border);
    padding: 14px 14px 10px;
}

.left-nav__search .community-chat-search {
    margin-bottom: 0;
}

.left-nav__section {
    border-bottom: 1px solid rgba(107, 70, 193, 0.08);
}

.left-nav__section:last-child {
    border-bottom: none;
}

.left-nav__section-header {
    align-items: center;
    background: none;
    border: none;
    color: var(--community-text);
    cursor: pointer;
    display: flex;
    font: inherit;
    gap: 12px;
    padding: 11px 14px;
    text-align: left;
    transition: background .15s ease;
    width: 100%;
}

.left-nav__section-header:hover {
    background: rgba(107, 70, 193, 0.06);
}

.left-nav__section.is-open > .left-nav__section-header {
    background: rgba(107, 70, 193, 0.07);
}

.left-nav__section-icon {
    align-items: center;
    background: linear-gradient(135deg, rgba(90, 58, 160, 0.1), rgba(139, 92, 246, 0.14));
    border-radius: 10px;
    color: var(--community-primary);
    display: inline-flex;
    flex-shrink: 0;
    font-size: 1.05rem;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.left-nav__section-label {
    flex: 1;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.93rem;
}

.left-nav__section-caret {
    color: var(--community-muted);
    flex-shrink: 0;
    font-size: 0.8rem;
    transition: transform .22s ease;
}

.left-nav__section.is-open .left-nav__section-caret {
    transform: rotate(90deg);
}

.left-nav__section-body {
    padding: 6px 14px 14px;
}

/* Search preview panel */
.left-nav__user-preview {
    background: var(--community-surface-strong);
    border: 1px solid var(--community-border);
    border-radius: var(--community-radius-sm);
    margin-top: 8px;
    max-height: 224px;
    overflow-y: auto;
    padding: 4px 0;
    scrollbar-color: rgba(107, 70, 193, 0.25) transparent;
    scrollbar-width: thin;
}

.left-nav__user-preview-item {
    align-items: center;
    color: var(--community-text);
    display: flex;
    gap: 10px;
    padding: 7px 12px;
    text-decoration: none;
    transition: background .15s ease;
}

.left-nav__user-preview-item:hover {
    background: rgba(107, 70, 193, 0.07);
}

.left-nav__user-preview-avatar {
    align-items: center;
    background: linear-gradient(135deg, #6b46c1, #8b5cf6);
    border-radius: 50%;
    color: #fff;
    display: flex;
    flex-shrink: 0;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.72rem;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.left-nav__user-preview-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.left-nav__user-preview-name {
    font-family: "Satoshi-Medium", sans-serif;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.left-nav__user-preview-hl {
    color: var(--community-muted);
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.left-nav__user-preview-empty {
    color: var(--community-muted);
    font-size: 0.82rem;
    padding: 10px 14px;
    text-align: center;
}

.left-nav__preview-section-label {
    color: var(--community-muted);
    font-family: "Satoshi-Medium", sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    padding: 8px 12px 2px;
    text-transform: uppercase;
}

.left-nav__preview-section-label:first-child {
    padding-top: 4px;
}

.left-nav__user-preview-avatar--project {
    background: linear-gradient(135deg, #2563eb, #6b46c1);
}

.community-sidebar--left,
.project-sidebar {
    align-self: start;
}

body.community-body:not(.project-body) .community-sidebar--right {
    align-self: start;
    background: var(--community-surface);
    border: 1px solid var(--community-border);
    border-radius: var(--community-radius-xl);
    box-shadow: var(--community-shadow);
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    padding: 16px;
}

.community-feed-column,
.project-main-column {
    display: grid;
    gap: 20px;
}

body.community-body:not(.project-body) .community-feed-column {
    padding-bottom: 72px;
}

/* Back-to-top inside the feed column (community pages only) */
.community-back-to-top {
    display: flex;
    justify-content: center;
    padding: 8px 0 0;
}

body.community-body:not(.project-body) .community-feed-column {
    align-content: start;
    gap: 16px;
}

.community-card,
.project-sidebar-card,
.project-section,
.feed-card,
.project-loading,
.project-error {
    padding: 24px;
}

.composer-card {
    padding: 16px 20px;
}

#post-composer[hidden],
body.guest-mode #post-composer {
    display: none !important;
}

body.community-body:not(.project-body) .composer-card {
    margin-left: auto;
    margin-right: auto;
    max-width: min(95%, 1000px);
    width: 100%;
}

.community-card h2,
.project-section h2,
.project-sidebar-card h3,
.feed-card h2,
.feed-card h3,
.project-post h2,
.project-post h3 {
    font-family: "Satoshi-Bold", sans-serif;
    letter-spacing: -0.03em;
    margin: 0 0 10px;
}

.community-card--soft {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(245, 239, 255, 0.94));
}

.community-card--accent {
    background: linear-gradient(180deg, rgba(107, 70, 193, 0.14), rgba(255, 255, 255, 0.82));
}

.stat-chip,
.tag-pill,
.project-pill,
.project-stack__item,
.project-member,
.project-mini-card__tag,
.project-link-button--ghost {
    align-items: center;
    background: rgba(107, 70, 193, 0.08);
    border: 1px solid rgba(107, 70, 193, 0.1);
    border-radius: 999px;
    color: var(--community-accent);
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.92rem;
    gap: 8px;
    padding: 10px 14px;
}

.stat-chip strong {
    color: var(--community-text);
}

.composer-card {
    display: block;
}

.composer-card__avatar,
.feed-avatar,
.comment-avatar,
.project-owner-avatar,
.project-member__avatar {
    align-items: center;
    background: linear-gradient(135deg, #5a3aa0, #8b5cf6);
    border-radius: 50%;
    color: #ffffff;
    display: inline-flex;
    flex-shrink: 0;
    font-family: "Satoshi-Bold", sans-serif;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.composer-card__avatar img,
.feed-avatar img,
.comment-avatar img,
.project-owner-avatar img,
.project-member__avatar img {
    border-radius: 50%;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.composer-card__avatar,
.feed-avatar,
.project-owner-avatar {
    height: 56px;
    width: 56px;
}

.comment-avatar,
.project-member__avatar {
    height: 42px;
    width: 42px;
}

.composer-actions span,
.feed-card__footer span,
.project-section__meta span,
.comment-card__meta span,
.project-meta span {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

/* ── Post composer (expanded) ──────────────────────────────────────────── */

/* ── Post composer trigger row ─────────────────────────────────────────── */
.composer-trigger-row {
    align-items: center;
    cursor: text;
    display: flex;
    gap: 12px;
    width: 100%;
}

.composer-trigger-row .composer-card__avatar {
    flex-shrink: 0;
}

.composer-trigger-row:hover .composer-bar {
    border-color: rgba(107, 70, 193, 0.35);
    box-shadow: 0 2px 10px rgba(107, 70, 193, 0.08);
}

/* ── Post composer trigger bar ─────────────────────────────────────────── */
.composer-bar {
    align-items: center;
    background: rgba(255, 255, 255, 0.7);
    border: 1.5px solid var(--community-border);
    border-radius: 999px;
    cursor: text;
    display: flex;
    flex: 1;
    gap: 10px;
    padding: 12px 20px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.composer-bar__placeholder {
    color: var(--community-muted);
    flex: 1;
    font-size: 0.93rem;
    pointer-events: none;
    user-select: none;
}

.composer-expanded {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Ensure HTML hidden attribute is respected even with display:flex override */
.composer-expanded[hidden] {
    display: none !important;
}

/* Trigger row is hidden when the expanded form is open */
.composer-trigger-row[hidden] {
    display: none !important;
}



.composer-label {
    align-items: center;
    color: var(--community-muted);
    display: flex;
    font-size: 0.82rem;
    gap: 5px;
    margin-bottom: 5px;
}

.composer-select {
    appearance: none;
    background: rgba(255, 255, 255, 0.85) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 256 256'%3E%3Cpath fill='%236b46c1' d='m213.66 101.66-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32Z'/%3E%3C/svg%3E") no-repeat right 12px center;
    background-size: 16px;
    border: 1.5px solid var(--community-border);
    border-radius: 12px;
    color: var(--community-text);
    font-family: "Satoshi-Regular", sans-serif;
    font-size: 0.92rem;
    outline: none;
    padding: 9px 36px 9px 12px;
    transition: border-color 0.15s;
    width: 100%;
}
.composer-select:focus { border-color: var(--community-primary); }

.composer-textarea {
    background: rgba(255, 255, 255, 0.7);
    border: 1.5px solid var(--community-border);
    border-radius: 14px;
    color: var(--community-text);
    font-family: "Satoshi-Regular", sans-serif;
    font-size: 0.97rem;
    line-height: 1.6;
    min-height: 80px;
    outline: none;
    padding: 12px 14px;
    resize: none;
    transition: border-color 0.15s;
    width: 100%;
}
.composer-textarea:focus { border-color: var(--community-primary); }

.composer-char-count {
    color: var(--community-muted);
    font-size: 0.75rem;
    margin-top: -8px;
    text-align: right;
}

/* Image preview */
.composer-image-preview {
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}
.composer-image-preview img {
    border-radius: 14px;
    display: block;
    height: auto;
    max-height: 260px;
    object-fit: cover;
    width: 100%;
}
.composer-image-remove {
    background: rgba(34, 20, 51, 0.65);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    height: 30px;
    line-height: 1;
    position: absolute;
    right: 10px;
    top: 10px;
    transition: background 0.15s;
    width: 30px;
}
.composer-image-remove:hover { background: rgba(180, 60, 60, 0.8); }

/* Link row */
.composer-link-row {
    align-items: center;
    background: rgba(107, 70, 193, 0.05);
    border: 1.5px solid var(--community-border);
    border-radius: 12px;
    display: flex;
    gap: 8px;
    padding: 8px 12px;
}
.composer-link-row > i {
    color: var(--community-accent);
    flex-shrink: 0;
    font-size: 1.1rem;
}
.composer-link-input,
.composer-link-title {
    background: transparent;
    border: none;
    color: var(--community-text);
    flex: 1;
    font-family: "Satoshi-Regular", sans-serif;
    font-size: 0.88rem;
    outline: none;
}
.composer-link-title { flex: 0.7; color: var(--community-muted); }
.composer-link-close {
    background: none;
    border: none;
    color: var(--community-muted);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 2px;
}

/* Footer */
.composer-footer {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
}
.composer-attach-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.composer-attach-btn {
    align-items: center;
    background: rgba(107, 70, 193, 0.07);
    border: 1.5px solid rgba(107, 70, 193, 0.15);
    border-radius: 999px;
    color: var(--community-accent);
    cursor: pointer;
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.82rem;
    gap: 5px;
    padding: 6px 14px;
    transition: background 0.15s;
}
.composer-attach-btn:hover { background: rgba(107, 70, 193, 0.14); }

.composer-submit-row {
    align-items: center;
    display: flex;
    gap: 8px;
}
.composer-cancel-btn {
    background: transparent;
    border: none;
    color: var(--community-muted);
    cursor: pointer;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.88rem;
    padding: 8px 12px;
    transition: color 0.15s;
}
.composer-cancel-btn:hover { color: var(--community-text); }

.composer-submit-btn {
    align-items: center;
    background: linear-gradient(135deg, #5a3aa0, #6b46c1, #8b5cf6);
    border: none;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.9rem;
    gap: 7px;
    padding: 9px 20px;
    transition: opacity 0.15s, box-shadow 0.2s;
}
.composer-submit-btn:hover:not(:disabled) { box-shadow: 0 6px 18px rgba(107, 70, 193, 0.35); }
.composer-submit-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.composer-error {
    background: rgba(180, 60, 60, 0.08);
    border: 1.5px solid rgba(180, 60, 60, 0.25);
    border-radius: 10px;
    color: #b44;
    font-size: 0.85rem;
    padding: 8px 12px;
}

/* New post highlight animation */
@keyframes feedCardIn {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.feed-card--new {
    animation: feedCardIn 0.4s ease;
    outline: 2px solid rgba(107, 70, 193, 0.3);
    outline-offset: -2px;
}



.feed-list {
    display: grid;
    gap: 12px;
}

.feed-card {
    border-radius: var(--community-radius-xl);
    overflow: hidden;
    padding: 0;
}

.feed-card__header,
.project-post__header,
.comment-card {
    display: grid;
    gap: 14px;
    grid-template-columns: auto minmax(0, 1fr);
}

.feed-card__title-row,
.project-post__title-row,
.comment-card__title-row {
    align-items: start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.project-post__heading {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.feed-card__title-row h2,
.project-post__title-row h2,
.project-post__title-row h3,
.comment-card__title-row h3 {
    margin-bottom: 4px;
}

.project-post__heading h3,
.project-post__heading .project-section__eyebrow,
.project-post__heading .project-post__meta {
    margin: 0;
}

.feed-card__project-link,
.project-inline-link {
    color: var(--community-accent);
    font-family: "Satoshi-Bold", sans-serif;
    text-decoration: none;
}

.feed-card__project-link:hover,
.project-inline-link:hover {
    text-decoration: underline;
}

/* ── Feed card header padding ─────────────────────── */
.feed-card__header {
    padding: 16px 20px 12px;
}

/* ── Author section ───────────────────────────────── */
.feed-card__author {
    min-width: 0;
}

.feed-card__author-top {
    align-items: flex-start;
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.feed-card__author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.feed-card__author-name-row {
    align-items: baseline;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin: 0;
}

.feed-card__author-name {
    color: var(--community-text);
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 1.05rem;
    margin: 0;
}

.feed-card__author-link {
    color: inherit;
    text-decoration: none;
}

.feed-card__author-link:hover {
    text-decoration: underline;
}

.feed-card__avatar-link {
    display: contents;
}

.project-post__author-link {
    color: var(--community-muted);
    text-decoration: none;
}

.project-post__author-link:hover {
    text-decoration: underline;
}

.project-post__avatar-link {
    text-decoration: none;
    color: inherit;
}

.feed-card__author-time {
    align-self: flex-start;
    color: var(--community-muted);
    flex-shrink: 0;
    font-size: 0.82rem;
    margin-left: auto;
    white-space: nowrap;
}

.feed-card__author-headline {
    display: none;
}

.feed-card__author-meta {
    color: var(--community-muted);
    font-size: 0.82rem;
    line-height: 1.2;
    margin: 0;
}

.feed-card__header-actions {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    gap: 6px;
}

.feed-card__follow-btn {
    align-items: center;
    background: transparent;
    border: 1.5px solid var(--community-primary);
    border-radius: 999px;
    color: var(--community-primary);
    cursor: pointer;
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.85rem;
    gap: 5px;
    padding: 6px 14px;
    transition: background 0.15s;
    white-space: nowrap;
}

.feed-card__follow-btn:hover {
    background: rgba(107, 70, 193, 0.08);
}

.feed-card__more-btn {
    align-items: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--community-muted);
    cursor: pointer;
    display: inline-flex;
    font-size: 1.3rem;
    height: 36px;
    justify-content: center;
    padding: 0;
    transition: background 0.15s, color 0.15s;
    width: 36px;
}

.feed-card__more-btn:hover {
    background: rgba(107, 70, 193, 0.07);
    color: var(--community-text);
}

/* ── More menu dropdown ───────────────────────────── */
.feed-card__more-menu {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    display: none;
    min-width: 200px;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 1000;
}

.feed-card__more-menu.is-open {
    display: block;
}

.feed-more-menu__item {
    align-items: center;
    background: transparent;
    border: none;
    color: var(--community-text);
    cursor: pointer;
    display: flex;
    font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.95rem;
    gap: 12px;
    padding: 12px 16px;
    text-align: left;
    transition: background 0.15s;
    width: 100%;
}

.feed-more-menu__item:first-child {
    border-radius: 8px 8px 0 0;
}

.feed-more-menu__item:last-child {
    border-radius: 0 0 8px 8px;
}

.feed-more-menu__item:hover {
    background: rgba(107, 70, 193, 0.06);
}

.feed-more-menu__item i {
    font-size: 1.2rem;
    color: var(--community-muted);
}

.feed-more-menu__item span {
    flex: 1;
}

.feed-more-menu__divider {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    margin: 4px 0;
}

.feed-more-menu__item--danger {
    color: #c0392b;
}

.feed-more-menu__item--danger i {
    color: #c0392b;
}

.feed-more-menu__item--danger:hover {
    background: rgba(192, 57, 43, 0.07);
}

.feed-card--removing {
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

/* ── Body text ────────────────────────────────────── */
.feed-card .feed-card__body {
    color: var(--community-text);
    padding: 0 20px 14px;
    white-space: pre-line;
}

.feed-card__read-more {
    background: transparent;
    border: none;
    color: var(--community-accent);
    cursor: pointer;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: inherit;
    padding: 0;
}

/* ── Project-page image styles (kept) ─────────────── */
.project-cover-card__image,
.project-post__attachments img {
    border-radius: 22px;
    display: block;
    height: auto;
    object-fit: cover;
    width: 100%;
}

.attachment-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.attachment-grid.count-1 {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 0;
}

.video-attachment-list {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.video-attachment-card {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(107, 70, 193, 0.1);
    border-radius: 22px;
    overflow: hidden;
}

.video-attachment-frame {
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-attachment-frame iframe {
    border: 0;
    display: block;
    height: 100%;
    width: 100%;
}

.video-attachment-card .project-link-item {
    border: 0;
    border-top: 1px solid rgba(107, 70, 193, 0.08);
    border-radius: 0;
}

.attachment-grid img {
    height: 100%;
}

.media-frame {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.media-frame img {
    aspect-ratio: inherit;
    height: 100%;
    max-height: 600px;
    object-fit: cover;
    width: 100%;
}

.media-frame--square {
    aspect-ratio: 1 / 1;
}

.media-frame--landscape {
    aspect-ratio: 16 / 9;
}

.media-frame--portrait {
    aspect-ratio: 9 / 16;
    max-height: 580px;
}

.media-frame--classic {
    aspect-ratio: 4 / 3;
}

.project-post .attachment-grid.count-1 .media-frame--portrait {
    justify-self: center;
    max-width: min(100%, 420px);
    width: 100%;
}

.project-post .attachment-grid.count-1 .media-frame--landscape,
.project-post .attachment-grid.count-1 .media-frame--classic,
.project-post .attachment-grid.count-1 .media-frame--square {
    max-height: 560px;
}

/* ── Feed carousel ────────────────────────────────── */
.feed-carousel {
    position: relative;
}

.feed-carousel--single .feed-media-frame {
    border-radius: 0;
    display: flex;
    justify-content: center;
    width: 100%;
}

.feed-carousel__track {
    display: flex;
    overflow-x: scroll;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.feed-carousel__track::-webkit-scrollbar {
    display: none;
}

.feed-carousel__slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
}

.feed-carousel__slide .feed-media-frame {
    border-radius: 0;
    display: flex;
    justify-content: center;
    width: 100%;
}

.feed-media-frame img {
    display: block;
    height: auto;
    margin: 0 auto;
    max-height: min(600px, 70vh);
    max-width: 100%;
    object-fit: contain;
    width: auto;
}

.feed-carousel__btn {
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
    color: var(--community-text);
    cursor: pointer;
    display: inline-flex;
    font-size: 1.1rem;
    height: 40px;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: background 0.15s;
    width: 40px;
    z-index: 2;
}

.feed-carousel__btn--prev {
    left: 12px;
}

.feed-carousel__btn--next {
    right: 12px;
}

.feed-carousel__btn:hover {
    background: #fff;
}

.feed-carousel__dots {
    bottom: 12px;
    display: flex;
    gap: 6px;
    justify-content: center;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
}

.feed-carousel__dot {
    background: rgba(255, 255, 255, 0.55);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    height: 8px;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
    width: 8px;
}

.feed-carousel__dot.is-active {
    background: #fff;
    transform: scale(1.35);
}

/* ── Stats bar ────────────────────────────────────── */
/* ── Divider ──────────────────────────────────────── */
.feed-card__divider {
    border: none;
    border-top: 1px solid rgba(107, 70, 193, 0.09);
    margin: 0 20px;
}

/* ── Action buttons ───────────────────────────────── */
.feed-card__actions {
    padding: 4px 8px 10px;
}

.feed-card__actions-group {
    display: grid;
    gap: 2px;
    grid-template-columns: repeat(4, 1fr);
}

.feed-card__actions-group[hidden] {
    display: none;
}

.feed-action-btn {
    align-items: center;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--community-muted);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    font-family: "Satoshi-Medium", sans-serif;
    font-size: 0.82rem;
    gap: 3px;
    justify-content: center;
    padding: 10px 4px;
    transition: background 0.15s, color 0.15s;
}

.feed-action-btn i {
    font-size: 1.35rem;
}

.feed-action-btn__count {
    color: var(--community-muted);
    font-size: 0.72rem;
    line-height: 1;
    margin-top: -1px;
    opacity: 0.8;
}

.feed-action-btn--like.is-liked .feed-action-btn__count {
    color: var(--community-primary);
    opacity: 1;
}

.feed-action-btn:hover {
    background: rgba(107, 70, 193, 0.07);
    color: var(--community-primary);
}

.feed-action-btn--like.is-liked {
    color: var(--community-primary);
}

.feed-action-btn--like.is-liked i {
    color: var(--community-primary);
}

.feed-action-btn--save.is-saved {
    color: var(--community-accent);
}

/* Share buttons — always visible */
.feed-share-opt {
    display: flex;
}

.feed-action-btn--share.is-active,
.feed-card--share-mode .feed-action-btn--share {
    color: var(--community-primary);
}

.feed-share-opt--linkedin:hover {
    color: #0a66c2;
}

.feed-share-opt--whatsapp:hover {
    color: #25d366;
}

.feed-share-opt--telegram:hover {
    color: #2aabee;
}

.feed-share-opt--copy.is-copied {
    color: #16a34a;
}

.project-link-list {
    display: grid;
}

.project-link-item {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(107, 70, 193, 0.08);
    color: var(--community-text);
    justify-content: space-between;
    padding: 14px 16px;
}

.project-loading,
.project-error {
    justify-items: center;
    min-height: 320px;
    place-content: center;
    text-align: center;
}

.project-loading i {
    animation: community-spin 1s linear infinite;
    color: var(--community-primary);
    font-size: 2rem;
}

.project-hero__content {
    display: grid;
    gap: 18px;
}

.project-breadcrumb {
    background: rgba(255, 255, 255, 0.7);
    color: var(--community-text);
    text-decoration: none;
    width: fit-content;
}

.project-summary {
    font-size: 1.08rem;
    margin: 0;
}

.project-cover-card__image {
    aspect-ratio: 4 / 3;
    min-height: 100%;
}

.project-stats {
    margin-top: 6px;
}

.project-stat {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(107, 70, 193, 0.08);
    border-radius: 18px;
    min-width: 122px;
    padding: 14px 16px;
}

.project-stat strong {
    display: block;
    font-family: "Satoshi-Black", sans-serif;
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.project-section__header {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.project-post,
.comment-card {
    border-top: 1px solid rgba(107, 70, 193, 0.08);
    padding-top: 18px;
}

.project-post:first-child,
.comment-card:first-child {
    border-top: 0;
    padding-top: 0;
}

.project-post__attachments {
    margin-top: 16px;
}

.project-sidebar-card {
    display: grid;
    gap: 14px;
}

.project-owner {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr);
}

.project-owner h3,
.project-owner p,
.project-member span,
.project-member small {
    margin: 0;
}

.project-member {
    background: rgba(255, 255, 255, 0.75);
    border-radius: 22px;
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 12px 14px;
}

.project-member small,
.project-post__meta,
.feed-card__subline,
.comment-card__subline,
.project-mini-card p {
    color: var(--community-muted);
}

.project-mini-card {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(107, 70, 193, 0.08);
    border-radius: 22px;
    display: grid;
    gap: 10px;
    overflow: hidden;
    padding: 14px;
    text-decoration: none;
}

.project-mini-card img {
    aspect-ratio: 16 / 10;
    border-radius: 16px;
    object-fit: cover;
    width: 100%;
}

.project-mini-card h3,
.project-mini-card p {
    margin: 0;
}

.community-error {
    color: #5b21b6;
    font-family: "Satoshi-Bold", sans-serif;
}

.builder-list,
.highlight-list {
    display: grid;
    gap: 14px;
}

.discovery-list {
    display: grid;
    gap: 12px;
}

.community-discovery-search {
    margin-bottom: 0;
}

.builder-card {
    align-items: center;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(107, 70, 193, 0.08);
    border-radius: 20px;
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 14px;
}

.builder-card__avatar {
    align-items: center;
    background: linear-gradient(135deg, #5a3aa0, #8b5cf6);
    border-radius: 50%;
    color: #ffffff;
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.builder-card h3,
.builder-card p,
.builder-card small {
    margin: 0;
}

.builder-card h3 {
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 1rem;
}

.builder-card p,
.builder-card small {
    color: var(--community-muted);
}

.builder-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.builder-card__meta span {
    align-items: center;
    color: var(--community-accent);
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.85rem;
    gap: 6px;
}

.discovery-item {
    align-items: start;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(107, 70, 193, 0.08);
    border-radius: 20px;
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 14px;
    text-decoration: none;
}

.discovery-item__icon {
    align-items: center;
    background: linear-gradient(135deg, rgba(90, 58, 160, 0.14), rgba(139, 92, 246, 0.16));
    border-radius: 16px;
    color: var(--community-accent);
    display: inline-flex;
    font-size: 1.15rem;
    height: 46px;
    justify-content: center;
    width: 46px;
}

.discovery-item__icon--initials {
    border-radius: 50%;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
}

.discovery-item__content,
.discovery-item__content h3,
.discovery-item__content p,
.discovery-item__content small {
    margin: 0;
}

.discovery-item__content h3 {
    color: var(--community-text);
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 1rem;
    margin-bottom: 4px;
}

.discovery-item__content--user {
    align-self: center;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-height: 48px;
    justify-content: center;
}

.discovery-item__title--user {
    line-height: 1.08;
    margin-bottom: 0;
    transform: translateY(1px);
}

.discovery-item__username {
    line-height: 1.05;
}

.discovery-item__content p,
.discovery-item__content small {
    color: var(--community-muted);
}

.discovery-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.discovery-item__meta span {
    align-items: center;
    background: rgba(107, 70, 193, 0.08);
    border: 1px solid rgba(107, 70, 193, 0.08);
    border-radius: 999px;
    color: var(--community-accent);
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.82rem;
    gap: 6px;
    padding: 8px 10px;
}

/* ── User discovery items with follow button ────────────────────────────── */
.discovery-item--user {
    align-items: start;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(107, 70, 193, 0.08);
    border-radius: 20px;
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 14px;
    position: relative;
}

.discovery-item__link {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-column: 1 / 3;
    grid-template-columns: auto minmax(0, 1fr);
    text-decoration: none;
}

.collab-member-card {
    align-items: center;
    display: flex;
    gap: 8px;
}

.collab-member-avatar {
    align-items: center;
    background: linear-gradient(135deg, #6b46c1, #9b5fff);
    border-radius: 50%;
    color: #fff;
    display: flex;
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    height: 32px;
    justify-content: center;
    overflow: hidden;
    width: 32px;
}

.collab-member-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    justify-content: center;
    min-height: 32px;
}

.collab-member-name {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.08;
    transform: translateY(1px);
}

.collab-member-username {
    color: #65557f;
    font-size: 0.75rem;
    line-height: 1.05;
}

.discovery-item__follow-btn {
    align-items: center;
    align-self: center;
    background: var(--community-accent);
    border: 1px solid var(--community-accent);
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.85rem;
    gap: 6px;
    grid-column: 3;
    padding: 8px 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.discovery-item__follow-btn:hover {
    background: rgba(107, 70, 193, 0.9);
    transform: translateY(-1px);
}

.discovery-item__follow-btn.is-following {
    background: rgba(107, 70, 193, 0.12);
    border-color: rgba(107, 70, 193, 0.24);
    color: var(--community-accent);
}

.discovery-item__follow-btn.is-following:hover {
    background: rgba(107, 70, 193, 0.2);
    transform: none;
}

.community-sidebar--right {
    background: var(--community-surface);
    border-left: 1px solid var(--community-border);
    box-shadow: -4px 0 24px rgba(91, 57, 159, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    padding: 28px 20px;
    scrollbar-color: rgba(107,70,193,0.2) transparent;
    scrollbar-width: thin;
}

.community-sidebar--right::-webkit-scrollbar { width: 4px; }
.community-sidebar--right::-webkit-scrollbar-track { background: transparent; }
body.community-body:not(.project-body) .community-sidebar--right {
    align-self: start;
    background: var(--community-surface);
    border: 1px solid var(--community-border);
    border-radius: var(--community-radius-xl);
    box-shadow: var(--community-shadow);
    overflow: hidden;
    padding: 0;
}

body.community-body:not(.project-body) .community-sidebar--right .left-nav__search {
    border-bottom: none;
}

body.community-body:not(.project-body) .community-sidebar--left .chat-list {
    flex: 1 1 auto;
    max-height: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.community-chat-header {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.community-chat-header__button {
    align-items: center;
    background: rgba(107, 70, 193, 0.08);
    border: 1px solid rgba(107, 70, 193, 0.12);
    border-radius: 14px;
    color: var(--community-accent);
    cursor: pointer;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.community-chat-search {
    align-items: center;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(107, 70, 193, 0.1);
    border-radius: 16px;
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px 14px;
}

.community-chat-search input {
    background: transparent;
    border: 0;
    color: var(--community-text);
    font-family: "Satoshi-Regular", sans-serif;
    font-size: 0.96rem;
    outline: none;
    width: 100%;
}

.chat-list {
    display: grid;
    gap: 10px;
    max-height: 820px;
    overflow: auto;
    padding-right: 4px;
}

.chat-item {
    align-items: center;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(107, 70, 193, 0.08);
    border-radius: 18px;
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 12px;
    text-decoration: none;
}

.chat-item--active {
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.14), rgba(139, 92, 246, 0.1));
    border-color: rgba(107, 70, 193, 0.2);
}

.chat-item__avatar {
    align-items: center;
    background: linear-gradient(135deg, #5a3aa0, #8b5cf6);
    border-radius: 50%;
    color: #ffffff;
    display: inline-flex;
    flex-shrink: 0;
    font-family: "Satoshi-Bold", sans-serif;
    height: 48px;
    justify-content: center;
    overflow: hidden;
    width: 48px;
}

.chat-item__avatar img {
    border-radius: 50%;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.chat-item__body,
.chat-item__meta {
    min-width: 0;
}

.chat-item__title,
.chat-item__preview,
.chat-item__time,
.chat-item__badge {
    margin: 0;
}

.chat-item__title {
    color: var(--community-text);
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.96rem;
}

.chat-item__preview,
.chat-item__time {
    color: var(--community-muted);
    font-size: 0.88rem;
}

.chat-item__preview {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-item__meta {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-item__badge {
    align-items: center;
    background: linear-gradient(135deg, #6b46c1, #8b5cf6);
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.78rem;
    justify-content: center;
    min-width: 22px;
    padding: 4px 7px;
}

.project-empty,
.community-empty {
    margin: 0;
}

.feed-card--loading,
.stat-chip--loading {
    opacity: 0.75;
}

@keyframes community-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1180px) {
    .community-layout,
    body.community-body:not(.project-body) .community-layout {
        align-content: start;
        grid-template-columns: minmax(0, 1fr) !important;
        min-height: 0;
    }

    .community-sidebar,
    .project-sidebar {
        position: static;
        top: auto;
    }

    body.community-body:not(.project-body) .community-sidebar--left,
    body.community-body:not(.project-body) .community-sidebar--right {
        align-self: auto;
        align-content: start;
        justify-content: flex-start;
        margin: 0;
        min-height: 0;
        padding-left: 16px;
        padding-right: 16px;
        padding-top: 24px;
        padding-bottom: 24px;
    }

    body.community-body:not(.project-body) .community-sidebar--left {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    body.community-body:not(.project-body) .community-sidebar--left .chat-list {
        overflow-y: auto;
        max-height: 360px;
    }

    body.community-body:not(.project-body) .community-page {
        padding-bottom: 32px;
    }

    body.community-body:not(.project-body) .community-feed-column {
        padding-bottom: 0;
    }

    body.community-body:not(.project-body) .community-sidebar--left {
        border-right: none;
        border-bottom: 1px solid var(--community-border);
        box-shadow: none;
    }

    .community-sidebar--left {
        order: 2;
    }

    .community-feed-column {
        order: 1;
    }

    .community-sidebar--right {
        border-left: none;
        border-top: 1px solid var(--community-border);
        box-shadow: none;
        order: 3;
        position: static;
    }

    .community-sidebar--left {
        order: 3;
    }

    .project-layout,
    .community-hero,
    .project-hero {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 767px) {
    .community-page,
    .project-page {
        padding: 104px 14px 48px;
    }

    .community-hero__content,
    .project-hero__content,
    .community-card,
    .project-sidebar-card,
    .project-section,
    .composer-card,
    .project-loading,
    .project-error,
    .community-hero__panel,
    .project-cover-card {
        border-radius: 22px;
        padding: 18px;
    }

    .feed-card {
        border-radius: 22px;
        padding: 0;
    }

    .community-hero h1,
    .project-hero h1 {
        font-size: 2.4rem;
        max-width: 100%;
    }

    .composer-card,
    .project-post__header,
    .comment-card,
    .project-owner,
    .project-member,
    .builder-card,
    .discovery-item {
        grid-template-columns: minmax(0, 1fr);
    }

    .feed-card__actions {
        grid-template-columns: repeat(4, 1fr);
    }

    .feed-card__follow-btn {
        display: none;
    }

    .composer-card__avatar,
    .feed-avatar,
    .project-owner-avatar {
        height: 48px;
        width: 48px;
    }

    .feed-card__title-row,
    .project-post__title-row,
    .comment-card__title-row,
    .project-section__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .attachment-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .chat-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .chat-item__meta {
        align-items: flex-start;
        flex-direction: row;
        grid-column: 2;
        justify-content: space-between;
    }

    .project-stat {
        width: calc(50% - 6px);
    }
}

/* ══════════════════════════════════════════════════
   Community Header — Auth Area
   ══════════════════════════════════════════════════ */

/* Active nav link highlight */
.community-header .community-nav-link--active {
    color: var(--community-primary, #6b46c1);
    font-family: "Satoshi-Bold", sans-serif;
}

body.community-body.guest-mode .community-header .main-nav,
.community-header.community-header--guest .main-nav {
    display: none;
}

body.community-body.guest-mode .community-header .header-container {
    max-width: min(720px, calc(100vw - 20px));
    width: min(720px, calc(100vw - 20px));
}

.community-header.community-header--guest .header-container {
    max-width: min(720px, calc(100vw - 20px));
    width: min(720px, calc(100vw - 20px));
}

/* Lente di ricerca subito a destra del logo */
.community-header .desktop-search-toggle {
    margin-left: -14px;
    margin-right: 0;
}

/* Auth container */
.community-auth {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    gap: 8px;
}

.community-auth__guest,
.community-auth__user {
    align-items: center;
    display: flex;
    gap: 8px;
}

.community-guest-feed-link {
    align-items: center;
    color: var(--community-text, #221433);
    display: inline-flex;
    font-size: 0.96rem;
    padding: 8px 6px;
    text-decoration: none;
    transition: color 0.15s;
    white-space: nowrap;
}

.community-guest-feed-link:hover {
    color: var(--community-primary, #6b46c1);
}

.community-auth__guest[hidden],
.community-auth__user[hidden],
.mobile-community-login-btn[hidden],
.mobile-community-user[hidden] {
    display: none !important;
}

/* Language toggle (EN / IT) */
.community-lang-toggle {
    align-items: center;
    background: transparent;
    border: 1.5px solid rgba(107, 70, 193, 0.25);
    border-radius: 999px;
    color: var(--community-primary, #6b46c1);
    cursor: pointer;
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.82rem;
    gap: 6px;
    padding: 7px 12px;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.community-lang-toggle:hover {
    background: rgba(107, 70, 193, 0.08);
    border-color: rgba(107, 70, 193, 0.45);
}

.community-lang-toggle i {
    font-size: 1rem;
}

@media (max-width: 900px) {
    .community-lang-toggle {
        display: none;
    }
}

.mobile-lang-toggle i {
    font-size: 1.1rem;
}

/* Login button */
.community-login-btn {
    align-items: center;
    background: transparent;
    border: 1.5px solid var(--community-primary, #6b46c1);
    border-radius: 999px;
    color: var(--community-primary, #6b46c1);
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.88rem;
    gap: 6px;
    padding: 8px 18px;
    text-decoration: none;
    transition: background 0.15s;
    white-space: nowrap;
}

.community-login-btn:hover {
    background: rgba(107, 70, 193, 0.08);
}

/* Sign-up button */
.community-signup-btn {
    align-items: center;
    background: linear-gradient(135deg, #6b46c1, #8b5cf6);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.88rem;
    padding: 8px 18px;
    text-decoration: none;
    transition: opacity 0.15s;
    white-space: nowrap;
}

.community-signup-btn:hover {
    opacity: 0.88;
}

/* Messages / notification icon button */
.community-notif-btn {
    align-items: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--community-muted, #65557f);
    cursor: pointer;
    display: inline-flex;
    font-size: 1.3rem;
    height: 40px;
    justify-content: center;
    padding: 0;
    position: relative;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    width: 40px;
}

.community-notif-btn:hover {
    background: rgba(107, 70, 193, 0.08);
    color: var(--community-primary, #6b46c1);
}

.community-nav-bell-toggle {
    gap: 6px;
    position: relative; /* for badge positioning */
}

.community-bell-badge {
    /* overrides .community-notif-badge absolute to stay inside button */
    position: absolute;
    right: 4px;
    top: 3px;
}

/* Notifications panel — dropdown below bell button */
#community-notif-wrap {
    position: relative;
}

.community-notif-panel {
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(107, 70, 193, 0.12);
    border-radius: 22px;
    box-shadow: 0 16px 50px rgba(91, 57, 159, 0.18);
    min-width: 340px;
    padding: 10px;
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    z-index: 500;
}

.community-notif-panel__header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 8px 10px 10px;
}

.community-notif-panel__title {
    color: var(--community-text, #221433);
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 1rem;
}

.community-notif-panel__mark-all {
    background: none;
    border: none;
    color: var(--community-primary, #6b46c1);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0;
}

.community-notif-panel__mark-all:hover {
    text-decoration: underline;
}

.community-notif-item {
    align-items: flex-start;
    border-radius: 14px;
    color: var(--community-text, #221433);
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    text-decoration: none;
    transition: background 0.12s;
}

.community-notif-item:hover {
    background: rgba(107, 70, 193, 0.06);
}

.community-notif-item--unread {
    background: rgba(107, 70, 193, 0.05);
}

.community-notif-item__avatar {
    align-items: center;
    background: linear-gradient(135deg, #5a3aa0, #8b5cf6);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    flex-shrink: 0;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.75rem;
    height: 34px;
    justify-content: center;
    overflow: hidden;
    position: relative;
    width: 34px;
}

.community-notif-item__avatar img {
    display: block;
    height: 100%;
    inset: 0;
    object-fit: cover;
    position: absolute;
    width: 100%;
}

.community-notif-item__body {
    flex: 1;
    min-width: 0;
}

.community-notif-item__text {
    color: var(--community-text, #221433);
    font-size: 0.88rem;
    line-height: 1.4;
    margin: 0 0 3px;
}

.community-notif-item__text strong {
    font-family: "Satoshi-Bold", sans-serif;
}

.community-notif-item__time {
    color: var(--community-muted, #65557f);
    font-size: 0.78rem;
}

.community-notif-panel__empty {
    color: var(--community-muted, #65557f);
    font-size: 0.88rem;
    padding: 16px 12px;
    text-align: center;
}



.community-notif-badge {
    align-items: center;
    background: linear-gradient(135deg, #6b46c1, #8b5cf6);
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.68rem;
    height: 18px;
    justify-content: center;
    min-width: 18px;
    padding: 0 4px;
    position: absolute;
    right: 2px;
    top: 2px;
}

.community-notif-badge[hidden] {
    display: none !important;
}

/* Profile wrap + toggle */
.community-profile-wrap {
    position: relative;
}

.community-profile-toggle {
    align-items: center;
    background: transparent;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    gap: 6px;
    padding: 4px 8px 4px 4px;
    transition: background 0.15s;
}

.community-profile-toggle:hover,
.community-profile-wrap.is-open .community-profile-toggle {
    background: rgba(107, 70, 193, 0.08);
}

.community-profile-avatar {
    align-items: center;
    background: linear-gradient(135deg, #5a3aa0, #8b5cf6);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.88rem;
    height: 38px;
    justify-content: center;
    overflow: hidden;
    position: relative;
    width: 38px;
}

.community-profile-avatar--lg {
    font-size: 1rem;
    height: 48px;
    width: 48px;
}

.community-profile-avatar img,
.community-profile-avatar video,
.mobile-community-user__avatar img,
.mobile-community-user__avatar video {
    display: block;
    height: 100%;
    inset: 0;
    object-fit: cover;
    position: absolute;
    width: 100%;
}

.community-profile-caret {
    color: var(--community-muted, #65557f);
    font-size: 0.88rem;
    transition: transform 0.2s;
}

.community-profile-wrap.is-open .community-profile-caret {
    transform: rotate(180deg);
}

/* Profile dropdown */
.community-profile-dropdown {
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(107, 70, 193, 0.12);
    border-radius: 22px;
    box-shadow: 0 16px 50px rgba(91, 57, 159, 0.18);
    list-style: none;
    margin: 0;
    min-width: 240px;
    padding: 10px;
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    z-index: 500;
}

.community-profile-user-info {
    align-items: center;
    display: flex;
    gap: 12px;
    padding: 8px 10px 14px;
}

.community-profile-user-name {
    color: var(--community-text, #221433);
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 1rem;
    margin: 0 0 3px;
}

.community-profile-user-hl {
    color: var(--community-muted, #65557f);
    font-size: 0.85rem;
    margin: 0;
}

.community-profile-item {
    align-items: center;
    border-radius: 14px;
    color: var(--community-text, #221433);
    display: flex;
    font-family: "Satoshi-Medium", sans-serif;
    font-size: 0.93rem;
    gap: 10px;
    padding: 11px 14px;
    text-decoration: none;
    transition: background 0.12s;
}

.community-profile-item i {
    color: var(--community-muted, #65557f);
    font-size: 1.15rem;
    flex-shrink: 0;
}

.community-profile-item:hover {
    background: rgba(107, 70, 193, 0.07);
}

.community-profile-item--danger {
    color: #b91c1c;
}

.community-profile-item--danger i {
    color: #b91c1c;
}

.community-profile-sep {
    border-top: 1px solid rgba(107, 70, 193, 0.08);
    margin: 6px 8px;
}

/* Mobile community auth inside mobile menu */
.mobile-community-auth-area {
    border-top: 1px solid rgba(107, 70, 193, 0.1);
    margin-top: 10px;
    padding-top: 14px;
}

.mobile-community-user {
    align-items: center;
    display: flex;
    gap: 14px;
    padding: 8px 0;
}

.mobile-community-user__avatar {
    align-items: center;
    background: linear-gradient(135deg, #5a3aa0, #8b5cf6);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    flex-shrink: 0;
    font-family: "Satoshi-Bold", sans-serif;
    height: 44px;
    justify-content: center;
    overflow: hidden;
    position: relative;
    width: 44px;
}

.mobile-community-user__name {
    color: var(--community-text, #221433);
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 1rem;
    margin: 0 0 4px;
}

.mobile-community-logout {
    color: var(--community-muted, #65557f);
    font-size: 0.88rem;
}

/* Hide on mobile — auth is inside mobile menu */
@media (max-width: 767px) {
    .community-auth {
        display: none;
    }
}

/* ══════════════════════════════════════════════════
   Feed — Comments Panel
   ══════════════════════════════════════════════════ */

@keyframes commentFadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes commentFadeOutUp {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-10px); }
}

.feed-comment--entering {
    animation: commentFadeInDown 0.22s ease both;
    animation-delay: var(--comment-delay, 0ms);
}

.feed-comment--leaving {
    animation: commentFadeOutUp 0.18s ease both;
    animation-delay: var(--comment-delay, 0ms);
}

.feed-comments {
    border-top: 1px solid rgba(107, 70, 193, 0.09);
    padding: 12px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feed-comments[hidden] {
    display: none;
}

/* Comment list */
.feed-comments__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feed-comments__loading,
.feed-comments__empty {
    color: var(--community-muted, #65557f);
    font-size: 0.88rem;
    text-align: center;
    padding: 8px 0;
    margin: 0;
}

/* Single comment item */
.feed-comment {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 10px;
    align-items: flex-start;
    transition: opacity 0.2s;
}

.feed-comment--removing {
    opacity: 0;
    pointer-events: none;
}

.feed-comment__avatar {
    align-items: center;
    background: linear-gradient(135deg, #5a3aa0, #8b5cf6);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.82rem;
    height: 36px;
    justify-content: center;
    width: 36px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.avatar-media {
    display: block;
    height: 100%;
    inset: 0;
    object-fit: cover;
    position: absolute;
    width: 100%;
}

.feed-comment__content {
    min-width: 0;
}

.feed-comment__bubble {
    background: rgba(245, 242, 255, 0.7);
    border-radius: 0 16px 16px 16px;
    padding: 10px 14px;
}

.feed-comment__header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.feed-comment__author {
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.9rem;
    color: var(--community-text, #221433);
}

a.feed-comment__author-link,
a.feed-comment__author {
    text-decoration: none;
    color: var(--community-text, #221433);
}

a.feed-comment__author-link:hover,
a.feed-comment__author:hover {
    text-decoration: underline;
    color: var(--community-primary, #6b46c1);
}

.feed-comment__avatar-link {
    display: contents;
    cursor: pointer;
}

.feed-comment__time {
    font-size: 0.8rem;
    color: var(--community-muted, #65557f);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.feed-comment__edited {
    font-size: 0.78rem;
    color: var(--community-muted, #65557f);
    font-style: italic;
}

.feed-comment__actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s;
}

.feed-comment__bubble:hover .feed-comment__actions,
.feed-comment__bubble:focus-within .feed-comment__actions {
    opacity: 1;
}

.feed-comment__action-btn {
    align-items: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--community-muted, #65557f);
    cursor: pointer;
    display: inline-flex;
    font-size: 1rem;
    height: 28px;
    justify-content: center;
    padding: 0;
    transition: background 0.12s, color 0.12s;
    width: 28px;
}

.feed-comment__action-btn:hover {
    background: rgba(107, 70, 193, 0.1);
    color: var(--community-primary, #6b46c1);
}

.feed-comment__action-btn--danger:hover {
    background: rgba(185, 28, 28, 0.08);
    color: #b91c1c;
}

.feed-comment__body {
    font-size: 0.93rem;
    color: var(--community-text, #221433);
    line-height: 1.5;
    margin: 0;
    word-break: break-word;
}

/* Inline edit form */
.feed-comment__edit-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feed-comment__edit-textarea {
    border-radius: 12px;
    font-size: 0.93rem;
    resize: none;
    width: 100%;
}

.feed-comment__edit-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Composer row */
.feed-comments__composer {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 10px;
    align-items: flex-start;
    margin-top: 4px;
}

.feed-comments__composer-avatar {
    align-items: center;
    background: linear-gradient(135deg, #5a3aa0, #8b5cf6);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.82rem;
    height: 36px;
    justify-content: center;
    width: 36px;
    flex-shrink: 0;
    margin-top: 6px;
    overflow: hidden;
    position: relative;
}

.feed-comments__composer-wrap {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 8px;
    min-width: 0;
}

.feed-comments__input {
    background: rgba(245, 242, 255, 0.7);
    border: 1.5px solid rgba(107, 70, 193, 0.15);
    border-radius: 22px;
    color: var(--community-text, #221433);
    font-family: "Satoshi-Regular", sans-serif;
    font-size: 0.93rem;
    line-height: 1.5;
    min-height: 38px;
    max-height: 240px;
    overflow-x: hidden;
    overflow-y: hidden;
    padding: 8px 16px;
    resize: none;
    transition: border-color 0.15s, background 0.15s;
    width: 100%;
    box-sizing: border-box;
}

.feed-comments__input:focus {
    background: #fff;
    border-color: var(--community-primary, #6b46c1);
    outline: none;
}

.feed-comments__composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 4px;
}

.feed-comments__composer-footer[hidden] {
    display: none;
}

.feed-comments__char-count {
    color: var(--community-muted, #65557f);
    font-size: 0.78rem;
}

.feed-comments__composer-btns {
    display: flex;
    gap: 8px;
}

.feed-comments__cancel-btn {
    background: transparent;
    border: none;
    border-radius: 999px;
    color: var(--community-muted, #65557f);
    cursor: pointer;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.88rem;
    padding: 7px 14px;
    transition: background 0.12s;
}

.feed-comments__cancel-btn:hover {
    background: rgba(107, 70, 193, 0.07);
}

.feed-comments__submit-btn {
    background: linear-gradient(135deg, #6b46c1, #8b5cf6);
    border: none;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.88rem;
    padding: 7px 18px;
    transition: opacity 0.15s;
}

.feed-comments__submit-btn:hover {
    opacity: 0.88;
}

.feed-comments__submit-btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

/* Show-more comments button */
.feed-comments__show-more {
    background: transparent;
    border: none;
    color: var(--community-primary, #6b46c1);
    cursor: pointer;
    display: block;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.85rem;
    margin: 4px 0 0;
    padding: 6px 0;
    text-align: left;
    transition: opacity 0.15s;
    width: 100%;
}

.feed-comments__show-more:hover {
    opacity: 0.7;
}

/* Active comment button on feed card */
.feed-action-btn--comment.is-active {
    color: var(--community-primary, #6b46c1);
}

.feed-action-btn--comment.is-active i {
    color: var(--community-primary, #6b46c1);
}

@media (max-width: 767px) {
    .feed-comments {
        padding: 10px 12px 14px;
    }

    .feed-comment__actions {
        opacity: 1;
    }
}

/* ── Comment replies ──────────────────────────────────────────────────── */

/* "Rispondi" text button in the meta row */
.feed-comment__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 2px;
    padding-left: 2px;
}

.feed-comment__reply-btn {
    background: none;
    border: none;
    color: var(--community-muted, #65557f);
    cursor: pointer;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.8rem;
    padding: 2px 0;
    transition: color 0.15s;
}

.feed-comment__reply-btn:hover {
    color: var(--community-primary, #6b46c1);
}

/* "Mostra X risposte" toggle */
.feed-comment__replies-toggle {
    align-items: center;
    background: none;
    border: none;
    color: var(--community-primary, #6b46c1);
    cursor: pointer;
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.82rem;
    gap: 5px;
    grid-column: 1 / -1;
    margin-left: 46px;
    margin-top: 4px;
    padding: 4px 0;
    transition: opacity 0.15s;
}

.feed-comment__replies-toggle:hover {
    opacity: 0.75;
}

/* Collapsed replies container */
.feed-comment__replies {
    display: flex;
    flex-direction: column;
    gap: 8px;
    grid-column: 1 / -1;
    margin-left: 46px;
    padding-top: 8px;
    border-left: 2px solid rgba(107, 70, 193, 0.12);
    padding-left: 14px;
    margin-top: 2px;
}

.feed-comment__replies[hidden] {
    display: none;
}

/* Reply items — slightly smaller avatar */
.feed-comment--reply .feed-comment__avatar {
    width: 28px;
    height: 28px;
    font-size: 0.68rem;
    flex-shrink: 0;
}

/* Reply inline composer */
.feed-comment__reply-composer {
    display: flex;
    align-items: flex-start;
    width: 100%;
    gap: 10px;
    padding-top: 4px;
}
.feed-comment__reply-composer[hidden] {
    display: none;
}

.feed-comment__reply-avatar {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.68rem !important;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════
   Saved Posts Page
   ══════════════════════════════════════════════════ */

.saved-posts-page {
    min-height: calc(100vh - 200px);
    padding-top: 0;
}

.saved-posts-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 40px 80px;
}

/* Page header */
.saved-posts-header {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.saved-posts-header__left {
    align-items: center;
    display: flex;
    gap: 16px;
}

.saved-posts-header__icon {
    color: var(--community-primary, #6b46c1);
    flex-shrink: 0;
    font-size: 2.2rem;
}

.saved-posts-header__title {
    color: var(--community-text, #221433);
    font-family: "Satoshi-Black", sans-serif;
    font-size: 1.6rem;
    margin: 0 0 4px;
}

.saved-posts-header__sub {
    color: var(--community-muted, #65557f);
    font-size: 0.93rem;
    margin: 0;
}

/* Grid */
.saved-posts-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Loading placeholder */
.saved-posts-loading {
    color: var(--community-muted, #65557f);
    font-size: 0.93rem;
}

/* Empty state */
.saved-posts-empty {
    grid-column: 1 / -1;
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 60px 20px;
    text-align: center;
}

.saved-posts-empty__icon {
    color: var(--community-primary, #6b46c1);
    font-size: 3.5rem;
    opacity: 0.4;
}

.saved-posts-empty h2 {
    color: var(--community-text, #221433);
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 1.3rem;
    margin: 0;
}

.saved-posts-empty p {
    color: var(--community-muted, #65557f);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    max-width: 400px;
}

/* Saved card */
.saved-card {
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(107, 70, 193, 0.1);
    border-radius: 22px;
    box-shadow: 0 4px 20px rgba(107, 70, 193, 0.07);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow 0.2s, opacity 0.22s, transform 0.22s;
}

.saved-card:hover {
    box-shadow: 0 8px 32px rgba(107, 70, 193, 0.14);
}

.saved-card--removing {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.96);
}

/* Card media */
.saved-card__media {
    aspect-ratio: 1 / 1;
    display: block;
    overflow: hidden;
    width: 100%;
}

.saved-card__media img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    width: 100%;
}

.saved-card:hover .saved-card__media img {
    transform: scale(1.04);
}

.saved-card__media--placeholder {
    align-items: center;
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.12), rgba(139, 92, 246, 0.18));
    display: flex;
    justify-content: center;
}

.saved-card__media-initials {
    color: var(--community-primary, #6b46c1);
    font-family: "Satoshi-Black", sans-serif;
    font-size: 2rem;
    opacity: 0.5;
}

/* Card body */
.saved-card__body {
    flex: 1;
    padding: 16px 18px 10px;
}

.saved-card__meta {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.saved-card__avatar {
    align-items: center;
    background: linear-gradient(135deg, #5a3aa0, #8b5cf6);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    flex-shrink: 0;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.8rem;
    height: 38px;
    justify-content: center;
    overflow: hidden;
    position: relative;
    width: 38px;
}

.saved-card__avatar img {
    display: block;
    height: 100%;
    inset: 0;
    object-fit: cover;
    position: absolute;
    width: 100%;
}

.saved-card__author {
    color: var(--community-text, #221433);
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.9rem;
    margin: 0 0 2px;
}

.saved-card__project {
    color: var(--community-muted, #65557f);
    font-size: 0.8rem;
    margin: 0;
}

.saved-card__snippet {
    color: var(--community-text, #221433);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0;
    opacity: 0.85;
}

/* Card footer */
.saved-card__footer {
    align-items: center;
    border-top: 1px solid rgba(107, 70, 193, 0.08);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 14px;
}

.saved-card__open-btn,
.saved-card__project-btn {
    align-items: center;
    background: transparent;
    border: 1.5px solid rgba(107, 70, 193, 0.2);
    border-radius: 999px;
    color: var(--community-primary, #6b46c1);
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.82rem;
    gap: 5px;
    padding: 6px 13px;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.saved-card__open-btn:hover,
.saved-card__project-btn:hover {
    background: rgba(107, 70, 193, 0.08);
    border-color: var(--community-primary, #6b46c1);
}

.saved-card__unsave-btn {
    align-items: center;
    background: transparent;
    border: 1.5px solid rgba(185, 28, 28, 0.2);
    border-radius: 999px;
    color: #b91c1c;
    cursor: pointer;
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.82rem;
    gap: 5px;
    margin-left: auto;
    padding: 6px 13px;
    transition: background 0.15s, border-color 0.15s;
}

.saved-card__unsave-btn:hover {
    background: rgba(185, 28, 28, 0.07);
    border-color: #b91c1c;
}

@media (min-width: 2000px) {
    .saved-posts-wrap {
        max-width: 1700px;
    }

    .saved-posts-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 767px) {
    .saved-posts-wrap {
        padding: 24px 16px 60px;
    }

    .saved-posts-grid {
        grid-template-columns: 1fr;
    }

    .saved-posts-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
/* ──────────────────────────────────────────────────────────
   PROJECT LANDING — UX/UI optimization
   Banner-style hero, identity card, polished action bar,
   stats with icons, sidebar visual hierarchy.
   ────────────────────────────────────────────────────────── */

/* Hero container override (banner pattern: stacked, not grid) */
.project-hero--banner {
    background: transparent;
    border: none;
    box-shadow: none;
    display: block;
    margin-bottom: 28px;
    padding: 0;
    position: relative;
}

/* Back link sits above the banner */
.project-hero__back {
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--community-border);
    border-radius: 999px;
    color: var(--community-text);
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.85rem;
    gap: 8px;
    margin-bottom: 14px;
    padding: 8px 14px;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.project-hero__back:hover {
    box-shadow: 0 8px 20px rgba(91, 57, 159, 0.12);
    transform: translateY(-1px);
}

/* Cover image as full-width banner */
.project-hero__banner {
    border-radius: var(--community-radius-xl);
    height: clamp(180px, 28vw, 320px);
    overflow: hidden;
    position: relative;
}

.project-hero__banner-image {
    display: block;
    height: 100%;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

.project-hero__banner-overlay {
    background: linear-gradient(180deg, rgba(34, 20, 51, 0) 35%, rgba(34, 20, 51, 0.55) 100%);
    inset: 0;
    position: absolute;
}

.project-hero__banner-meta {
    align-items: center;
    bottom: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    left: 22px;
    position: absolute;
    right: 22px;
}

.project-hero__stage,
.project-hero__demo-badge {
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    color: var(--community-accent);
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.78rem;
    gap: 6px;
    letter-spacing: 0.02em;
    padding: 7px 12px;
    text-transform: none;
}

.project-hero__demo-badge {
    background: rgba(255, 220, 110, 0.95);
    color: #5a3a00;
}

/* Identity card overlaps the banner slightly */
.project-hero--banner .project-hero__content {
    margin: -54px 16px 0;
    overflow: visible;
    padding: 26px 28px 28px;
    position: relative;
    z-index: 2;
}

.project-hero--banner .project-hero__content::before {
    display: none;
}

.project-hero--banner + .project-layout {
    margin-left: 16px;
    margin-right: 16px;
}

/* Top row: identity (left) + stats (right) */
.project-hero__top {
    align-items: flex-start;
    display: flex;
    gap: 24px;
    margin-bottom: 18px;
}

.project-hero__top .project-hero__identity {
    flex: 1;
    margin-bottom: 0;
    min-width: 0;
}

.project-hero__identity {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 18px;
}

.project-hero__avatar {
    align-items: center;
    background: linear-gradient(135deg, #5a3aa0 0%, #6b46c1 35%, #7b51d8 68%, #8b5cf6 100%);
    border: 3px solid #fff;
    border-radius: 24px;
    box-shadow: 0 14px 30px rgba(91, 57, 159, 0.28);
    color: #fff;
    display: flex;
    flex-shrink: 0;
    font-family: "Satoshi-Black", sans-serif;
    font-size: 1.5rem;
    height: 80px;
    justify-content: center;
    letter-spacing: 0.04em;
    overflow: hidden;
    text-transform: uppercase;
    width: 80px;
}

.project-hero__avatar img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.project-hero__identity-text {
    flex: 1;
    min-width: 240px;
}

.project-hero--banner h1 {
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    line-height: 1.05;
    margin: 0 0 6px;
    max-width: none;
}

.project-hero--banner .project-summary {
    color: var(--community-text);
    font-family: "Satoshi-Medium", "Satoshi-Regular", sans-serif;
    font-size: 1.02rem;
    margin: 0 0 10px;
    opacity: 0.85;
}

.project-hero__owner-line {
    align-items: center;
    color: var(--community-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.88rem;
    gap: 8px;
    margin: 0;
}

.project-hero__owner-line i {
    color: var(--community-primary);
    margin-right: 2px;
}

.project-hero__owner-link {
    color: var(--community-accent);
    font-family: "Satoshi-Bold", sans-serif;
    text-decoration: none;
}

.project-hero__owner-link:hover {
    text-decoration: underline;
}

.project-hero__dot {
    color: var(--community-muted);
    opacity: 0.5;
}

/* Action bar: clean toolbar */
.project-hero__actions {
    align-items: center;
    border-top: 1px solid var(--community-border);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    padding-top: 18px;
}

.project-hero__actions:empty {
    border-top: 0;
    margin: 0;
    padding: 0;
}

.project-pill--visibility {
    background: rgba(107, 70, 193, 0.08);
    border: 1px solid rgba(107, 70, 193, 0.18);
    border-radius: 999px;
    color: var(--community-accent);
    display: inline-flex;
    align-items: center;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.82rem;
    gap: 6px;
    padding: 9px 13px;
}

/* Button variants for the action bar */
.project-link-button {
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 11px 18px;
    font-size: 0.92rem;
}

.project-link-button--primary {
    background: linear-gradient(135deg, #5a3aa0 0%, #6b46c1 35%, #7b51d8 68%, #8b5cf6 100%);
    box-shadow: 0 12px 26px rgba(107, 70, 193, 0.28);
    color: #fff;
}

.project-link-button--primary.is-following {
    background: rgba(107, 70, 193, 0.12);
    box-shadow: none;
    color: var(--community-accent);
}

.project-link-button--ghost {
    background: rgba(107, 70, 193, 0.06);
    box-shadow: none;
    color: var(--community-accent);
}

.project-link-button--ghost:hover {
    background: rgba(107, 70, 193, 0.12);
}

/* Stats: icon + numbers (scannable) */
.project-hero--banner .project-stats {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    margin: 0 0 18px;
}

.project-hero__top .project-stats {
    display: flex;
    align-items: stretch;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
    width: auto;
}

.project-hero--banner .project-stat {
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(107, 70, 193, 0.1);
    border-radius: 16px;
    display: flex;
    gap: 12px;
    min-width: 0;
    padding: 12px 14px;
}

.project-stat__icon {
    align-items: center;
    background: linear-gradient(135deg, rgba(90, 58, 160, 0.12), rgba(139, 92, 246, 0.18));
    border-radius: 12px;
    color: var(--community-primary);
    display: inline-flex;
    flex-shrink: 0;
    font-size: 1.15rem;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.project-stat__text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    min-width: 0;
}

.project-stat__text strong {
    color: var(--community-text);
    font-family: "Satoshi-Black", sans-serif;
    font-size: 1.15rem;
    margin-bottom: 2px;
}

.project-stat__text span {
    color: var(--community-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* External link buttons row */
.project-hero__links {
    margin: 0;
}

/* Overview content moved into hero */
.project-hero__overview-lede {
    border-top: 1px solid rgba(107, 70, 193, 0.12);
    color: var(--community-text);
    font-family: "Satoshi-Medium", "Satoshi-Regular", sans-serif;
    font-size: 1.02rem;
    line-height: 1.6;
    margin: 16px 0 10px;
    padding-top: 16px;
}

.project-hero__overview-summary {
    color: var(--community-text-muted);
    font-size: 0.97rem;
    line-height: 1.6;
    margin: 0 0 10px;
}

.project-hero__overview-details {
    margin: 0 0 12px;
    padding-left: 20px;
}

.project-hero__overview-tags {
    margin-top: 10px;
}

/* Overview lede paragraph (the longer description) */
.project-section__lede {
    color: var(--community-text);
    font-family: "Satoshi-Medium", "Satoshi-Regular", sans-serif;
    font-size: 1.02rem;
    line-height: 1.6;
    margin: 0 0 14px;
}

/* Section count badge (e.g. number of updates) */
.project-section__count {
    background: rgba(107, 70, 193, 0.1);
    border-radius: 999px;
    color: var(--community-accent);
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.82rem;
    padding: 4px 12px;
}

/* Sidebar eyebrow with leading icon (visual anchor for scanning) */
.project-sidebar-card .project-section__eyebrow {
    align-items: center;
    color: var(--community-accent);
    display: inline-flex;
    gap: 8px;
    margin: 0;
}

.project-sidebar-card .project-section__eyebrow i {
    background: rgba(107, 70, 193, 0.1);
    border-radius: 8px;
    font-size: 1rem;
    padding: 5px;
}

.project-owner__link {
    color: inherit;
    text-decoration: none;
}

.project-owner__link:hover {
    color: var(--community-primary);
}

/* Section header eyebrow with icon in main column */
.project-main-column .project-section__eyebrow {
    align-items: center;
    color: var(--community-accent);
    display: inline-flex;
    gap: 8px;
}

.project-main-column .project-section__eyebrow i {
    color: var(--community-primary);
}

/* Mobile tweaks */
@media (max-width: 767px) {
    .project-hero--banner .project-hero__content {
        margin: -36px 8px 0;
        padding: 22px 18px 22px;
    }

    .project-hero--banner + .project-layout {
        margin-left: 8px;
        margin-right: 8px;
    }

    .project-hero__avatar {
        height: 64px;
        width: 64px;
        font-size: 1.2rem;
        border-radius: 18px;
    }

    .project-hero__banner {
        height: clamp(140px, 38vw, 220px);
    }

    .project-hero__banner-meta {
        bottom: 12px;
        left: 14px;
        right: 14px;
    }

    .project-hero--banner .project-stats {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .project-hero__top {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .project-hero__top .project-stats {
        width: auto;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .project-hero__top .project-stat {
        flex: 1;
        min-width: 120px;
    }
}


/* ══════════════════════════════════════════════════
   Guest mode — non-logged-in community feed view
   ══════════════════════════════════════════════════ */

/* Hide both lateral sidebars */
body.community-body.guest-mode .community-sidebar--left,
body.community-body.guest-mode .community-sidebar--right {
    display: none !important;
}

/* Collapse grid to single centred column */
body.community-body:not(.project-body).guest-mode .community-layout {
    grid-template-columns: 1fr;
    max-width: 720px;
    margin: 0 auto;
}

/* Guest CTA banner */
.guest-feed-cta {
    background: var(--community-surface);
    border: 1px solid var(--community-border);
    border-radius: var(--community-radius-xl, 24px);
    box-shadow: var(--community-shadow);
    margin-bottom: 16px;
    overflow: hidden;
    padding: 40px 32px;
    text-align: center;
}

.guest-feed-cta__eyebrow {
    color: var(--community-primary, #6b46c1);
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.guest-feed-cta__title {
    color: var(--community-text, #221433);
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 1.9rem;
    line-height: 1.2;
    margin: 0 0 10px;
}

.guest-feed-cta__sub {
    color: var(--community-muted, #65557f);
    font-size: 1rem;
    margin: 0 0 28px;
}

.guest-feed-cta__actions {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Login button — outlined */
.guest-feed-cta__btn--login {
    align-items: center;
    background: transparent;
    border: 1.5px solid var(--community-primary, #6b46c1);
    border-radius: 999px;
    color: var(--community-primary, #6b46c1);
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.95rem;
    gap: 7px;
    padding: 11px 26px;
    text-decoration: none;
    transition: background 0.15s;
}

.guest-feed-cta__btn--login:hover {
    background: rgba(107, 70, 193, 0.08);
}

/* Sign-up button — filled */
.guest-feed-cta__btn--signup {
    align-items: center;
    background: linear-gradient(135deg, #6b46c1, #8b5cf6);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.95rem;
    gap: 7px;
    padding: 11px 26px;
    text-decoration: none;
    transition: opacity 0.15s;
}

.guest-feed-cta__btn--signup:hover {
    opacity: 0.88;
}

/* ══════════════════════════════════════════════════
   Guest mode — non-logged-in community feed view
   ══════════════════════════════════════════════════ */

/* Hide both lateral sidebars */
body.community-body.guest-mode .community-sidebar--left,
body.community-body.guest-mode .community-sidebar--right {
    display: none !important;
}

/* Collapse grid to single centred column */
body.community-body:not(.project-body).guest-mode .community-layout {
    grid-template-columns: 1fr;
    max-width: 720px;
    margin: 0 auto;
}

/* Guest CTA banner */
.guest-feed-cta {
    background: var(--community-surface);
    border: 1px solid var(--community-border);
    border-radius: var(--community-radius-xl, 24px);
    box-shadow: var(--community-shadow);
    margin-bottom: 16px;
    overflow: hidden;
    padding: 40px 32px;
    text-align: center;
}

.guest-feed-cta__eyebrow {
    color: var(--community-primary, #6b46c1);
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.guest-feed-cta__title {
    color: var(--community-text, #221433);
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 1.9rem;
    line-height: 1.2;
    margin: 0 0 10px;
}

.guest-feed-cta__sub {
    color: var(--community-muted, #65557f);
    font-size: 1rem;
    margin: 0 0 28px;
}

.guest-feed-cta__actions {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Login button — outlined */
.guest-feed-cta__btn--login {
    align-items: center;
    background: transparent;
    border: 1.5px solid var(--community-primary, #6b46c1);
    border-radius: 999px;
    color: var(--community-primary, #6b46c1);
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.95rem;
    gap: 7px;
    padding: 11px 26px;
    text-decoration: none;
    transition: background 0.15s;
}

.guest-feed-cta__btn--login:hover {
    background: rgba(107, 70, 193, 0.08);
}

/* Sign-up button — filled */
.guest-feed-cta__btn--signup {
    align-items: center;
    background: linear-gradient(135deg, #6b46c1, #8b5cf6);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-family: "Satoshi-Bold", sans-serif;
    font-size: 0.95rem;
    gap: 7px;
    padding: 11px 26px;
    text-decoration: none;
    transition: opacity 0.15s;
}

.guest-feed-cta__btn--signup:hover {
    opacity: 0.88;
}
/* Guest mode — hide like/comment/save; show share only */
body.community-body.guest-mode .feed-action-btn--like,
body.community-body.guest-mode .feed-action-btn--comment,
body.community-body.guest-mode .feed-action-btn--save,
body.community-body.guest-mode .feed-comments {
    display: none !important;
}