/* Enable viewport position:sticky by overriding html/body overflow-x: hidden */
html,
body {
    overflow-x: clip !important;
}

/* Home Feed Container - matches .recent-activity from profile page */
.home-feed {
    background: white;
    border: 1px solid #e8edf3;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    max-width: 956px;
    margin: 40px auto 0;
    padding-bottom: 0;
}

.home-feed .activity-posts {
    align-items: center;
}

.home-feed .activity-post {
    /* width: 100%; */
    margin: 0 auto;
}

/* Home Page Header */
.home-header {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(14, 20, 23, 0.08);
    border-radius: 22px;
    box-shadow:
        0 1px 2px rgba(14, 20, 23, 0.04),
        0 18px 44px -30px rgba(6, 48, 63, 0.35);
    max-width: 956px;
    margin: 32px auto;
}

/* A crisp diagonal tint rather than a blurred blob. */
.home-header-glow {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(128deg,
            rgba(2, 98, 130, 0.11) 0%,
            rgba(2, 98, 130, 0.055) 34%,
            rgba(120, 155, 235, 0.05) 62%,
            rgba(225, 147, 47, 0.045) 100%);
}

/* Hairline of brand colour along the very top edge. */
.home-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 2;
    background: linear-gradient(90deg, #026282, #0a7397 42%, #e1932f);
}

.home-header-content {
    position: relative;
    z-index: 1;
    padding: 34px 32px 26px;
}

.home-title {
    font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 600;
    color: #06303f;
    margin: 0 0 12px 0;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.home-subtitle {
    font-size: 15px;
    line-height: 1.65;
    color: #5d6b72;
    margin: 0;
    max-width: 660px;
}

/* Row holding the tabs on the left and the cross-tab teaser on the right. */
.home-tabbar {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 0 32px 26px;
}

/* Teaser - the signal that the other tab has something in it. */
.home-raise-teaser {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 8px 8px 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(2, 98, 130, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.6));
    -webkit-backdrop-filter: blur(14px) saturate(1.5);
    backdrop-filter: blur(14px) saturate(1.5);
    box-shadow: 0 1px 2px rgba(14, 20, 23, 0.04);
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}

.home-raise-teaser:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -14px rgba(6, 48, 63, 0.45);
}

.home-raise-teaser[hidden] {
    display: none;
}

.home-raise-avatars {
    display: inline-flex;
    align-items: center;
}

.home-raise-avatars img {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid #fff;
    background: #e6f1f4;
    margin-left: -9px;
}

.home-raise-avatars img:first-child {
    margin-left: 0;
}

.home-raise-text {
    font-size: 13.5px;
    color: #33424a;
    white-space: nowrap;
}

.home-raise-text strong {
    color: #06303f;
    font-weight: 700;
}

.home-raise-go {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 15px;
    border-radius: 999px;
    background: #026282;
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}

.home-raise-go i {
    font-size: 10px;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-raise-teaser:hover .home-raise-go i {
    transform: translateX(3px);
}

/* Home Tabs - segmented control rather than a full-width underline bar */
.home-tabs {
    display: inline-flex;
    gap: 4px;
    margin: 0;
    padding: 5px;
    border-radius: 999px;
    background: rgba(14, 20, 23, 0.05);
}

.home-tab-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 22px;
    border: none;
    border-radius: 999px;
    background: none;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    color: #5d6b72;
    cursor: pointer;
    transition: background 0.22s ease, color 0.22s ease;
}

.home-tab-btn:hover {
    background: rgba(255, 255, 255, 0.7);
    color: #026282;
}

.home-tab-btn.active {
    background: #026282;
    color: #fff;
    border-bottom-color: transparent;
    box-shadow: 0 6px 16px -10px rgba(2, 98, 130, 0.8);
}

.home-tab-btn i {
    font-size: 15px;
}

@media (max-width: 640px) {
    .home-header-content {
        padding: 26px 20px 20px;
    }

    .home-tabbar {
        margin: 0 20px 20px;
    }

    .home-tabs {
        display: flex;
        width: 100%;
    }

    .home-tab-btn {
        flex: 1;
        padding: 10px 12px;
    }

    .home-raise-teaser {
        width: 100%;
        justify-content: space-between;
    }

    .home-raise-text {
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {

    .home-raise-teaser,
    .home-raise-go i {
        transition: none;
    }

    .home-raise-teaser:hover {
        transform: none;
    }
}

/* Tab Content */
.home-tab-content {
    display: none;
}

.home-tab-content.active {
    display: block;
}

.home-tab-content .home-feed {
    margin-top: 0;
    /* border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: none; */
}

/* Invest & Opportunities Feed Specific */
.invest-feed,
.opportunities-feed {
    min-height: 400px;
}

.invest-feed .cf-bar {
    padding: 0;
    margin: 0 0 20px 0;
    max-width: none;
}

.opportunities-feed .cf-bar {
    padding: 0 20px;
    margin: 0 auto 20px auto;
    max-width: 1200px;
}

/* ── Filter toggle (invest & opportunities tabs) ── */
.invest-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    padding: 11px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #026181;
    background: #fff;
    border: 1px solid #dbe7f0;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 1px 3px rgba(2, 97, 129, 0.06);
    transition: background 0.15s, border-color 0.15s;
    margin-bottom: 10px;
}

.invest-filter-toggle:active {
    background: #f0f7fb;
}

.invest-filter-toggle.active .invest-filter-toggle-chevron {
    transform: rotate(180deg);
}

.invest-filter-toggle-chevron {
    margin-left: auto;
    transition: transform 0.2s ease;
}

.invest-filter-toggle-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    background: #026181;
    border-radius: 9px;
}

/* Collapse pills + action row + search row by default */
.invest-feed .cf-bar:not(.cf-open) .cf-pills-row,
.invest-feed .cf-bar:not(.cf-open) .cf-action-row,
.opportunities-feed .cf-bar:not(.cf-open) .cf-search-row,
.opportunities-feed .cf-bar:not(.cf-open) .cf-pills-row,
.opportunities-feed .cf-bar:not(.cf-open) .cf-action-row {
    display: none;
}

.invest-feed .cf-bar.cf-open .cf-pills-row,
.invest-feed .cf-bar.cf-open .cf-action-row,
.opportunities-feed .cf-bar.cf-open .cf-search-row,
.opportunities-feed .cf-bar.cf-open .cf-pills-row,
.opportunities-feed .cf-bar.cf-open .cf-action-row {
    display: flex;
}

/* Desktop: keep toggle width reasonable, pills inline */
@media (min-width: 769px) {
    .invest-filter-toggle {
        width: auto;
        margin-bottom: 14px;
    }
}

.invest-cards-container,
.opportunity-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    padding: 20px 0 50px;
    justify-items: center;
}

/* Home page card sizing - responsive */
.invest-cards-container .fund-seeker-card-group,
.opportunity-cards-container .fund-seeker-card-group {
    max-width: 380px;
    width: 100%;
}

@media (max-width: 768px) {

    .invest-cards-container,
    .opportunity-cards-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .invest-cards-container .fund-seeker-card-group,
    .opportunity-cards-container .fund-seeker-card-group {
        max-width: 350px;
    }
}

@media (max-width: 480px) {

    .invest-cards-container .fund-seeker-card-group,
    .opportunity-cards-container .fund-seeker-card-group {
        max-width: 280px;
    }
}

.home-feed h3 {
    color: #026181;
    font-size: 24px;
    margin-bottom: 20px;
    text-align: left;
}

.view-more {
    display: block;
    margin: 24px auto 0;
    padding: 10px 30px;
    background: #026181;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.view-more:hover {
    background-color: #034a61;
}

.no-posts-message {
    text-align: center;
    color: #888;
    padding: 40px 0;
}

/* Post header layout: aligned identically to Profile and PDM styles */
.activity-post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #f0f4f8;
    position: relative;
    z-index: 2;
}

.activity-post-header .activity-post-avatar {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-post-header .activity-post-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    object-fit: cover;
}

.activity-post-header .activity-post-author-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 2px;
    align-items: flex-start;
}

.activity-post-header .activity-post-author {
    font-size: 15px;
    font-weight: 600;
    color: #026181;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.activity-post-header .activity-post-author-info .author-link {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
    color: inherit;
}

.activity-post-header .activity-post-author-info .author-link:hover {
    text-decoration: underline;
}

.activity-post-header .activity-post-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0px;
    width: 100%;
}

.activity-post-header .activity-post-time {
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
    font-weight: 500;
}

.activity-post-header .activity-post-more {
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-self: end;
}

/* Truncate long author names to one line with ellipsis */
.home-feed .activity-post-author {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-feed .activity-post-author .author-link {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
    color: inherit;
}

.activity-post-author .author-link:hover {
    text-decoration: underline;
}

.post-actions-row {
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: stretch;
    gap: 0;
}

/* Action bar buttons (Comment, Link-Up) */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
    cursor: pointer;
    border: none;
    background: none;
    padding: 4px 6px;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.post-actions-row .action-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: none;
    width: 85px;
    gap: 2px;
    font-size: 15px;
    padding: 8px 0;
    overflow: visible;
}

.post-actions-row {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
}

.post-actions-row>* {
    flex: none;
}

.action-btn:hover {
    color: #026181;
}

/* Vote buttons (Hit / Miss) */
.vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    color: #9ca3af;
    transition: color 0.2s ease, transform 0.1s ease;
    border: none;
    background: none;
    padding: 4px 8px;
    border-radius: 6px;
    user-select: none;
    -webkit-user-select: none;
    white-space: nowrap;
}

.post-actions-row .vote-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: none;
    width: 85px;
    gap: 2px;
    font-size: 15px;
    padding: 8px 0;
    overflow: visible;
}

/* Icon container - stacked hollow + filled */
.vote-btn .vote-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    width: 1em;
    height: 1em;
}

.vote-btn .vote-hollow,
.vote-btn .vote-fill {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateZ(0);
}

.pdm-dots .pdm-dot {
    width: 8px;
    height: 8px;
    background: rgba(20, 20, 20, 0.7);
    /* dark default dot */
    border-radius: 50%;
    transition: transform 0.12s ease, background 0.12s ease;
}

.pdm-dots .pdm-dot.active {
    background: #ffffff;
    /* selected = white */
    transform: scale(1.12);
}

/* Collapsible caption in PDM and feed cards */
.post-detail-caption.collapsed {
    max-height: calc(1.5em * 5);
    overflow: hidden;
    position: relative;
}

.activity-post-content.collapsed {
    max-height: calc(1.5em * 4);
    overflow: hidden;
    position: relative;
}

.post-detail-caption.collapsed::after,
.activity-post-content.collapsed::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2em;
    background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    pointer-events: none;
}

.post-detail-caption-toggle,
.caption-toggle {
    display: inline-block;
    margin: 8px 16px;
    color: #026181;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    font-size: 13px;
}

/* Hit (▲): fills bottom → top */
.vote-btn.hit-btn .vote-fill {
    clip-path: inset(100% 0 0 0);
}

/* Miss (▼): fills top → bottom */
.vote-btn.miss-btn .vote-fill {
    clip-path: inset(0 0 100% 0);
}

/* Pressing state - fill animates in */
.vote-btn.hit-btn.pressing .vote-fill {
    clip-path: inset(0);
    color: #026181;
}

.vote-btn.miss-btn.pressing .vote-fill {
    clip-path: inset(0);
    color: #D32F2F;
}

/* Count styles */
.vote-btn .hit-count,
.vote-btn .miss-count {
    font-size: 14px;
    min-width: 12px;
    margin-left: 2px;
}

.post-actions-row .vote-btn .hit-count,
.post-actions-row .vote-btn .miss-count {
    font-size: 15px;
}

/* Hover states */
.vote-btn.hit-btn:hover {
    color: #026181;
}

.vote-btn.miss-btn:hover {
    color: #D32F2F;
}

.vote-btn:hover .vote-icon {
    transform: scale(1.15);
}

/* Active press scale */
.vote-btn:active {
    transform: scale(0.95);
}

/* Voted states - fill fully revealed, colored */
.vote-btn.hit-btn.voted {
    color: #026181;
}

.vote-btn.hit-btn.voted .vote-fill {
    clip-path: inset(0);
    color: #026181;
}

.vote-btn.miss-btn.voted {
    color: #D32F2F;
}

.vote-btn.miss-btn.voted .vote-fill {
    clip-path: inset(0);
    color: #D32F2F;
}

.like-comment {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    color: #9ca3af;
    transition: color 0.2s ease, transform 0.1s ease;
    border: none;
    background: none;
    padding: 2px 4px;
    border-radius: 6px;
    user-select: none;
    -webkit-user-select: none;
}

.like-comment .vote-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    width: 1em;
    height: 1em;
}

.like-comment .vote-hollow,
.like-comment .vote-fill {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateZ(0);
}

.like-comment .vote-hollow {
    color: inherit;
}

.like-comment .vote-fill {
    color: transparent;
    transition: clip-path 0.5s ease, color 0.2s ease;
    clip-path: inset(100% 0 0 0);
}

.like-comment.hit-btn.voted {
    color: #026181;
}

.like-comment.hit-btn.voted .vote-fill {
    clip-path: inset(0);
    color: #026181;
}

.like-comment:hover {
    color: #026181;
}

.like-comment:hover .vote-icon {
    transform: scale(1.15);
}

.like-comment .like-count {
    font-size: 14px;
    min-width: 12px;
}


.comment-item.comment-reply {
    border-left: none;
    padding-left: 0;
}

.comment-item.comment-reply[data-comment-depth="1"] {
    padding-left: 2rem;
}

/* Avatar (profile picture) should be above connector */
.comment-item .w-8.h-8 {
    position: relative;
    z-index: 1;
    background: #fff;
}

.comment-reply-connector {
    position: absolute;
    left: 0;
    top: -6em;
    width: 2.35rem;
    height: 7rem;
    pointer-events: none;
    z-index: 0;
    display: block;
    color: #8ea3a8;
}

.comment-reply-connector-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    display: block;
    opacity: 1;
    color: inherit;
}

.reply-thread-toggle {
    margin: -0.25rem 0 0.55rem 2rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8ea3a8;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    position: relative;
    overflow: visible;
}

.reply-thread-toggle-connector {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    pointer-events: auto;
    cursor: pointer;
    z-index: 0;
    display: block;
    color: inherit;
}

.comment-item.comment-reply:hover .comment-reply-connector,
.comment-item.comment-reply:hover .comment-reply-connector-svg,
.reply-thread-toggle:hover,
.reply-thread-toggle:hover .reply-thread-toggle-connector,
.reply-thread-toggle:hover .comment-reply-connector-svg,
.reply-thread-toggle-connector:hover,
.reply-thread-toggle-connector:hover .comment-reply-connector-svg {
    color: #026181;
}

.reply-thread-toggle:hover {
    color: #026181;
}

.reply-thread-load-more {
    margin-top: -0.18rem;
}

.comment-input-container,
.reply-input-container {
    position: relative;
}

.mention-input-wrap {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
}

.mention-input-overlay {
    position: absolute;
    inset: 0;
    left: 1px;
    right: 1px;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

.mention-overlay-content {
    display: block;
    min-width: 100%;
    width: max-content;
    white-space: pre;
    color: #1f2937;
    box-sizing: border-box;
    transform: translateX(0);
}

.mention-overlay-content .mention-token {
    color: #026181;
    font-weight: 500;
}

.mention-overlay-content .mention-selected-range {
    background: rgba(2, 97, 129, 0.75);
    color: #ffffff;
}

.mention-overlay-content .mention-selected-range .mention-token {
    color: #ffffff;
}

.mention-overlay-content .mention-trailing-pad {
    display: inline-block;
    width: 12px;
}

.comment-input.mention-input-layer,
.reply-input.mention-input-layer {
    position: relative;
    z-index: 2;
}

.comment-input.mention-rich,
.reply-input.mention-rich {
    color: transparent !important;
    -webkit-text-fill-color: transparent;
    caret-color: #1f2937;
}

.comment-input.mention-input-layer::selection,
.reply-input.mention-input-layer::selection {
    color: transparent;
    background: transparent;
}

.reply-box {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 0.75rem 0.75rem 0.5rem;
    overflow-x: hidden;
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 0;
}

.reply-box.comment-reply {
    padding-left: 2.75rem;
    overflow: visible;
    padding-right: 0 !important;
    width: 100%;
}

.reply-input-container {
    position: relative;
    box-sizing: border-box;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    width: 100%;
    margin-left: 0 !important;
}

.reply-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: visible;
    width: 100%;
    flex-grow: 1;
    min-width: 0;
}



.reply-to-label {
    font-size: 12px;
    line-height: 1.1;
    color: #6b7280;
    padding-left: 2px;
}

.reply-input {
    flex-grow: 1;
    min-width: 0;
    width: 100%;
    padding: 8px 12px 9px;
    height: 36px;
    box-sizing: border-box;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.35;
    font-family: inherit;
    background: white;
    color: #1f2937;
    overflow: visible;
    text-decoration-skip-ink: none;
}

.reply-input:focus {
    outline: none;
    border-color: #026181;
    box-shadow: 0 0 0 2px rgba(2, 97, 129, 0.1);
}

.submit-reply-btn {
    background: #026181;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 13px;
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
    border-radius: 4px;
    transition: background 0.2s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

.submit-reply-btn i {
    font-size: 13px;
    line-height: 1;
    display: block;
}

.submit-reply-btn:hover {
    background: #014a5b;
}

.submit-reply-btn:active {
    transform: scale(0.95);
}

.mention-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: auto;
    bottom: calc(100% + 6px);
    z-index: 40;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    max-height: 180px;
    overflow-y: auto;
}

.mention-suggestion-item {
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #111827;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mention-suggestion-item:hover {
    background: #f3f4f6;
}

.mention-suggestion-avatar {
    width: 30px;
    height: 30px;
    border-radius: 9999px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
}

.mention-suggestion-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mention-suggestion-name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mention-suggestion-slug {
    font-size: 12px;
    color: #6b7280;
}

.mention-link-primary {
    color: #026181;
}

.mention-link-primary:hover {
    color: #014a5b;
}

.comment-author-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.comment-author-link:hover {
    text-decoration: underline;
}

.comment-item {
    position: relative;
}

.comment-specific-options {
    display: none;
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 6;
}

.comment-item:hover .comment-specific-options {
    display: block;
}

.comment-btn .comment-count {
    margin-left: 6px;
    font-size: 14px;
}

.post-actions-row .comment-btn .comment-count {
    margin-left: 1px;
    font-size: 15px;
}

/* Overlay background */
.user-setup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Modal box */
.user-setup-box {
    background: #fff;
    padding: 28px 24px;
    border-radius: 14px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
    animation: modalFadeScale 0.3s ease-out;
}

/* Buttons container */
.user-setup-buttons {
    margin-top: 24px;
    display: flex;
    justify-content: space-around;
}

/* Buttons styling */
.user-setup-buttons .btn {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
}

.btn-setup {
    background-color: #2563eb;
    /* Blue */
    color: #fff;
}

.btn-setup:hover {
    background-color: #1d4ed8;
}

.btn-later {
    background-color: #f3f4f6;
    /* Gray-100 */
    color: #111827;
    /* Gray-900 */
}

.btn-later:hover {
    background-color: #e5e7eb;
}

/* Animation */
@keyframes modalFadeScale {
    0% {
        opacity: 0;
        transform: scale(0.85);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}



/* ============================================================
   Home Page Two-Column Layout (feed + profile card sidebar)
   ============================================================ */

.home-layout-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
    max-width: 1360px;
    margin: 40px auto 0;
    padding: 0 35px;
    box-sizing: border-box;
}

.home-main-column {
    flex: 1;
    min-width: 0;
    max-width: 956px;
}

/* Zero out the per-element margins – the wrapper handles outer spacing */
.home-main-column .home-header,
.home-main-column .home-feed {
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    margin-bottom: 20px;
}

/* Feed posts grid - bottom spacing (scoped to home main column so profile pages unaffected) */
.home-main-column #activity-posts {
    padding-bottom: 20px;
}

/* Right sidebar column - Sticky Sidebar */
.home-side-column {
    width: 300px;
    flex-shrink: 0;
    position: -webkit-sticky !important;
    position: sticky !important;
    top: var(--xv-sidebar-sticky-top, 10px) !important;
    align-self: flex-start !important;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 10;
    transition: top 0.15s ease-out;
}

.home-side-column .xv-card .xv-card-name {
    font-size: 17px;
    line-height: 1.25;
    word-break: break-word;
    overflow-wrap: break-word;
}

.home-side-column .xv-card-desc {
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}

/* Override card wrapper for flow layout (not absolute) */
.home-side-column .profile-card-wrapper {
    position: static;
    width: 100%;
    right: auto;
    pointer-events: auto;
    z-index: auto;
}

.home-side-column .profile-card {
    position: static;
    width: 100%;
    right: auto;
}

@media (max-width: 1200px) {
    .home-layout-wrapper {
        padding: 0 16px;
    }
}

/* Hide sidebar only on mobile / tablet screens */
@media (max-width: 991px) {
    .home-side-column {
        display: none !important;
    }
}

@media (max-width: 640px) {
    .home-layout-wrapper {
        padding: 0 8px;
    }
}

/* ===========================
   Fund Seeker Cards (Invest Tab)
   =========================== */

.fund-seeker-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.fund-seeker-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

.fund-seeker-card-image {
    height: 140px;
    background: linear-gradient(135deg, #026181 0%, #03869e 50%, #014d5f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.fund-seeker-card-image img {
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
    border: none;
    box-shadow: none;
    display: block;
}

.fund-seeker-card-image .no-picture {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.8);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.fund-seeker-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.fund-seeker-company-info {
    margin-bottom: 12px;
    min-width: 0;
}

.fund-seeker-company-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1a1a2e;
    margin: 0 0 4px 0;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

.fund-seeker-description {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fund-seeker-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.fund-seeker-tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    white-space: nowrap;
}

.fund-seeker-tag-category {
    background: #e0f2fe;
    color: #026181;
}

.fund-seeker-tag-stage {
    background: #f3f4f6;
    color: #6b7280;
}

.fund-seeker-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    padding: 14px 0 16px 0;
    border-top: 1px solid #f0f0f3;
    margin-bottom: 16px;
}

.fund-seeker-metric {
    min-width: 0;
}

.fund-seeker-metric-label {
    font-size: 0.75rem;
    color: #9ca3af;
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.fund-seeker-metric-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #026181;
    margin: 0;
    word-break: break-word;
}

.fund-seeker-actions {
    margin-top: auto;
    display: flex;
    gap: 8px;
}

.fund-seeker-actions .fund-seeker-view-btn,
.fund-seeker-actions .fund-seeker-request-btn {
    flex: 1;
}

.fund-seeker-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    background: #026181;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    text-decoration: none;
}

.fund-seeker-view-btn:hover {
    background: #014d5f;
}

.fund-seeker-view-btn:active {
    transform: scale(0.98);
}

.fund-seeker-view-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.fund-seeker-request-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    background: #27ae60;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    text-decoration: none;
}

.fund-seeker-request-btn:hover {
    background: #229954;
}

.fund-seeker-request-btn:active {
    transform: scale(0.98);
}

.fund-seeker-request-btn i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ===== Comment Section ===== */
.activity-post-comments {
    position: relative;
    width: 100%;
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 0 18px;
    display: flex;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, padding 0.3s ease;
}

.activity-post-comments.active {
    max-height: 480px;
    padding: 10px 18px;
}

/* Modal specific override to ensure comments are visible and avoid double scrollbars */
.pdm-comments-wrapper {
    max-height: none !important;
    overflow: visible !important;
    border-top: none !important;
    padding: 0 !important;
}

.pdm-comments-wrapper .comments-list {
    max-height: none !important;
    overflow: visible !important;
    padding-bottom: 20px !important;
}

.comments-list {
    width: 100%;
    flex-grow: 1;
    overflow-y: auto;
    padding: 5px 0;
    max-height: 300px;
    overflow-anchor: none;
    scroll-behavior: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.comments-list::-webkit-scrollbar {
    width: 4px;
}

.comments-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.comments-list::-webkit-scrollbar-track {
    background: transparent;
}

#comment-options-modal.active {
    display: flex !important;
    z-index: 99999 !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: fixed !important;
    inset: 0 !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ── Carousel embedded inside PDM left panel ── */
.carousel-container.pdm-carousel-embedded {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    background: #F0F0F0 !important;
    padding: 0px !important;
    overflow: hidden !important;
    contain: paint;
    /* Match the modal's left side curve */
    border-top-left-radius: 12px !important;
    border-bottom-left-radius: 12px !important;
}

/* The moved carousel still has the feed card's .activity-post-media class, so remove its padding in the modal */
.post-detail-overlay .activity-post-media.pdm-carousel-embedded {
    padding: 0 !important;
    overflow: hidden !important;
}

/* Global clipping boundary for all feed carousels */
.carousel-view {
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
    border-radius: inherit;
}

.carousel-view::-webkit-scrollbar {
    display: none;
}

.post-detail-media {
    background: #F0F0F0 !important;
}

/* carousel-view fills the whole panel */
.carousel-container.pdm-carousel-embedded .carousel-view {
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    contain: paint;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-top-left-radius: 12px !important;
    border-bottom-left-radius: 12px !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    isolation: isolate;
    background: #F0F0F0 !important;
}

.carousel-container.pdm-carousel-embedded .carousel-view::-webkit-scrollbar {
    display: none;
}

.carousel-container.pdm-carousel-embedded .carousel-track {
    display: flex;
    width: max-content;
    min-width: 0;
    height: 100%;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto;
}

.carousel-container.pdm-carousel-embedded .carousel-item {
    flex: 0 0 var(--carousel-slide-px, 100%) !important;
    width: var(--carousel-slide-px, 100%) !important;
    min-width: var(--carousel-slide-px, 100%) !important;
    max-width: var(--carousel-slide-px, 100%) !important;
    height: 100% !important;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    background: #F0F0F0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    overflow: hidden;
    box-sizing: border-box !important;
    transform: none !important;
    outline: none !important;
    backface-visibility: visible !important;
}

.post-detail-media .carousel-container.pdm-carousel-embedded img.carousel-item,
.post-detail-media .carousel-container.pdm-carousel-embedded video.carousel-item,
.pdm-carousel-embedded img.carousel-item,
.pdm-carousel-embedded video.carousel-item {
    width: var(--carousel-slide-px, 100%) !important;
    max-width: var(--carousel-slide-px, 100%) !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    scroll-snap-align: start !important;
    scroll-snap-stop: always !important;
    border-radius: 0 !important;
    display: block !important;
}

/* ── Feed post card carousel nav buttons ── */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.15s ease, transform 0.15s ease;
    line-height: 0;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 40px;
    height: 40px;
}

.carousel-btn:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.08);
}

.carousel-btn.prev {
    left: 34px;
}

.carousel-btn.next {
    right: 34px;
}

/* Hide the original carousel nav buttons when embedded inside PDM */
.carousel-container.pdm-carousel-embedded .carousel-btn {
    display: none !important;
}

/* ── Feed post card slide indicator dots ── */
.carousel-dots {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    gap: 6px;
    align-items: center;
    z-index: 10;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 999px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    cursor: pointer;
    background: rgba(20, 20, 20, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.carousel-dot.active {
    background: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.95);
    transform: scale(1.25);
}

/* Hide feed dots when carousel is inside PDM (PDM has its own .pdm-dots) */
.carousel-container.pdm-carousel-embedded .carousel-dots {
    display: none !important;
}

/* ── PDM SVG circle nav buttons ── */
.pdm-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.15s ease, transform 0.15s ease;
    line-height: 0;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.pdm-nav:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.08);
}

.pdm-nav-prev {
    left: 14px;
}

.pdm-nav-next {
    right: 14px;
}

.pdm-more-menu {
    position: absolute;
    top: 58px;
    right: 16px;
    z-index: 30;
    display: none;
    min-width: 210px;
}

.pdm-more-menu.active {
    display: block;
}

.pdm-more-menu .more-menu-content {
    padding: 6px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.pdm-more-menu .more-menu-item {
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #0f172a;
    white-space: nowrap;
}

.pdm-more-menu .more-menu-item:hover {
    background: rgba(241, 245, 249, 0.9);
}

.pdm-header-more {
    padding: 8px;
    border-radius: 9999px;
    transition: background 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.pdm-header-more:hover {
    background: rgba(241, 245, 249, 0.95);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.post-detail-overlay .pdm-header-more.activity-post-more::after {
    content: none !important;
    display: none !important;
}

.pdm-header-more-icon {
    display: block;
    margin-top: -2px;
    margin-right: 1px;
    font-size: 20px;
    line-height: 1;
    color: #94a3b8;
    letter-spacing: -2px;
    pointer-events: none;
}

.pdm-no-media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #555;
    font-size: 4rem;
}


/* ===== Post Detail Modal (Instagram-style) ===== */
.post-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

html.no-scroll,
body.no-scroll {
    overflow: hidden !important;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

/* Chrome, Safari, Edge - hide scrollbar completely */
html.no-scroll::-webkit-scrollbar,
body.no-scroll::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
}

.post-detail-overlay.active {
    opacity: 1;
    visibility: visible;
}

:root {
    --pdm-sidebar-width: 500px;
}

.post-detail-modal {
    display: flex;
    gap: 0;
    width: auto;
    max-width: 95vw;
    height: 88vh;
    max-height: 720px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    position: relative;
}

/* Close button */
.post-detail-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: opacity 0.15s ease;
}

.post-detail-close:hover {
    opacity: 1;
}

/* ── Left: Media Panel ── */
.post-detail-media {
    flex: 0 0 auto;
    flex-shrink: 0;
    height: 100%;
    width: auto;
    max-width: none;
    background: #F0F0F0;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    position: relative;
    overflow: hidden;
    border-top-left-radius: 12px !important;
    border-bottom-left-radius: 12px !important;
}

/* Template-based aspect ratios for the media side.
   This ensures the container perfectly matches the content ratio regardless of modal height. */
.pdm-template-square .post-detail-media {
    aspect-ratio: 1 / 1;
}

.pdm-template-portrait .post-detail-media {
    aspect-ratio: 4 / 5;
}

.pdm-template-tall .post-detail-media {
    aspect-ratio: 9 / 16;
}

/* Slide indicator dots */
.pdm-dots {
    position: absolute;
    bottom: 38px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.pdm-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.171);
    transition: background 0.2s;
}

.pdm-dot.active {
    background: #fff;
}

/* ── Right: Sidebar ── */
.post-detail-sidebar {
    flex: 0 0 var(--pdm-sidebar-width);
    width: var(--pdm-sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-left: 1px solid #efefef;
    background: #fff;
    height: 100%;
    /* Sidebar itself does not scroll; the inner scroll container handles scrolling so
       header and bottom areas remain fixed. */
    overflow: hidden;
}

/* Sidebar header */
.post-detail-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #efefef;
    flex-shrink: 0;
}

.post-detail-header .pdm-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #fff;
}

.post-detail-header .pdm-author {
    font-weight: 600;
    font-size: 14px;
    color: #026181;
    text-decoration: none;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-detail-header .pdm-author:hover {
    text-decoration: underline;
}

.post-detail-header .pdm-time {
    font-size: 12px;
    color: #8e8e8e;
    flex-shrink: 0;
}

/* Caption area - scrollable with normal scrollbar */
.post-detail-caption {
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #262626;
    border-bottom: 1px solid #efefef;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    cursor: default;
}

.post-detail-caption::-webkit-scrollbar {
    width: 8px;
}

.post-detail-caption::-webkit-scrollbar-track {
    background: transparent;
}

.post-detail-caption::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 4px;
}

.post-detail-caption::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* Glass-style overlay for dots so they stay visible on any media */
.pdm-dots {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 999px;
}

.pdm-dots {
    padding: 6px 10px;
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.pdm-dots .pdm-dot {
    width: 8px;
    height: 8px;
    background: rgba(20, 20, 20, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.pdm-dots .pdm-dot.active {
    background: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.95);
    transform: scale(1.25);
}

.pdm-nav-prev,
.pdm-nav-next {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-detail-caption:empty {
    display: none;
}

.post-detail-caption .category,
.post-detail-caption .hashtag {
    font-size: 13px;
}

/* Actions (hit/miss) now at bottom above input */
.post-detail-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-top: 1px solid #efefef;
    flex-shrink: 0;
    background: #fff;
}

.post-detail-actions .vote-btn {
    font-size: 13px;
    padding: 6px 14px;
}

/* Comments area - scrollable */
.post-detail-comments {
    padding: 8px 16px;
}

/* The scrollable area containing caption + comments */
.post-detail-scroll {
    flex: 1 1 auto;
    min-height: 0;
    /* allow flex children to shrink in Firefox */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.post-detail-comments::-webkit-scrollbar {
    width: 4px;
}

.post-detail-comments::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.post-detail-comments::-webkit-scrollbar-track {
    background: transparent;
}

/* Comment input at bottom - remove top border if actions provide it */
.post-detail-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid #f3f3f3;
    flex-shrink: 0;
    background: #fff;
}

.post-detail-input .comment-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 8px 0;
    background: transparent;
    color: #262626;
}

.post-detail-input .comment-input::placeholder {
    color: #8e8e8e;
}

.post-detail-input .comment-submit {
    background: none;
    border: none;
    color: #026181;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 6px 4px;
    opacity: 0.5;
    transition: opacity 0.15s ease;
}

.post-detail-input .comment-submit:hover {
    opacity: 1;
}

/* Empty state */
.post-detail-comments-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 8px;
    color: #8e8e8e;
    font-size: 14px;
    padding: 40px 20px;
    text-align: center;
}

.post-detail-comments-empty i {
    font-size: 32px;
    opacity: 0.4;
}


/* Hide inline comment section on main feed cards since PDM is used */
.activity-post .activity-post-comments {
    display: none !important;
}

.activity-post.pdm-source-hidden {
    visibility: hidden;
    pointer-events: none;
}

.pdm-header-category {
    font-size: 11px;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 12px;
    color: #64748b;
    font-weight: 500;
}

/* ── PDM Responsiveness ── */
@media (max-width: 1200px) {
    :root {
        --pdm-sidebar-width: 400px;
    }

    .post-detail-modal {
        max-height: 600px;
    }
}

@media (max-width: 900px) {
    :root {
        --pdm-sidebar-width: 350px;
    }

    .post-detail-modal {
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .post-detail-modal {
        flex-direction: column;
        width: 95vw;
        width: 95dvw;
        height: 95vh;
        height: 95dvh;
        max-width: 95vw;
        max-width: 95dvw;
        max-height: 95vh;
        max-height: 95dvh;
        border-radius: 12px;
        background: #fff;
    }

    .post-detail-close {
        top: 8px;
        right: 8px;
        color: #fff;
        background: rgba(0, 0, 0, 0.4);
        border-radius: 50%;
        width: 30px;
        height: 30px;
        font-size: 20px;
    }

    :root {
        --pdm-sidebar-width: 100%;
    }

    .post-detail-media {
        flex: 0 0 50% !important;
        max-width: 100% !important;
        width: 100% !important;
        height: 50% !important;
        max-height: 50% !important;
        aspect-ratio: auto !important;
        border-top-left-radius: 12px !important;
        border-top-right-radius: 12px !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }

    .carousel-container.pdm-carousel-embedded .carousel-view {
        border-top-left-radius: 12px !important;
        border-bottom-left-radius: 0 !important;
        border-top-right-radius: 12px !important;
        border-bottom-right-radius: 0 !important;
    }

    .post-detail-sidebar {
        flex: 0 0 50% !important;
        width: 100% !important;
        height: 50% !important;
        max-height: 50% !important;
        border-left: none;
        border-top: 1px solid #efefef;
    }
}

/* ── Deal Room subtab info icon + tooltip ── */
.dr-info-wrap {
    position: absolute;
    top: 6px;
    right: 4px;
    display: inline-flex;
    align-items: center;
}

.dr-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    color: #8fa8b4;
    cursor: help;
    transition: color 0.18s ease;
    flex-shrink: 0;
}

.dr-info-icon:hover,
.dr-info-icon:focus-visible {
    color: #4dd4f0;
    outline: none;
}

.dr-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    min-width: 220px;
    max-width: 280px;
    background: #0d1f29;
    color: #e8f0f3;
    border-radius: 10px;
    padding: 11px 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12.5px;
    line-height: 1.5;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.28),
        0 1px 4px rgba(0, 0, 0, 0.18);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.18s ease,
        visibility 0.18s ease,
        transform 0.18s ease;
    transform: translateX(-50%) translateY(4px);
    z-index: 999;
    white-space: normal;
}

/* Arrow */
.dr-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #0d1f29;
}

.dr-tooltip strong {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.01em;
}

.dr-tooltip em {
    font-style: normal;
    color: #4dd4f0;
    font-weight: 600;
}

/* Show on hover or focus */
.dr-info-wrap:hover .dr-tooltip,
.dr-info-icon:focus-visible~.dr-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Responsive: flip below on small screens if near top */
@media (max-width: 640px) {
    .dr-tooltip {
        min-width: 190px;
        font-size: 12px;
    }
}

/* Feed Sort Filter Bar */
.feed-sort-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 7px;
    background: #fff;
    border: 1px solid rgba(14, 20, 23, 0.08);
    border-radius: 16px;
    box-shadow:
        0 1px 2px rgba(14, 20, 23, 0.04),
        0 10px 26px -22px rgba(6, 48, 63, 0.3);
    margin-bottom: 22px;
}

.feed-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 24px 9px 17px;
    position: relative;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: #5d6b72;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.feed-sort-btn i {
    font-size: 12.5px;
    opacity: 0.85;
}

.feed-sort-btn:hover {
    background: rgba(2, 98, 130, 0.08);
    color: #026282;
}

/* Flat fill - the active state should read instantly, not shimmer. */
.feed-sort-btn.active {
    background: #026282;
    border-color: #026282;
    color: #fff;
    box-shadow: none;
}

.feed-sort-btn.active i {
    opacity: 1;
}

.feed-sort-btn.active:hover {
    background: #013f55;
    border-color: #013f55;
    color: #fff;
}

/* Icon flourish on press - one shot each, character per sort mode. */
.feed-sort-btn.is-playing[data-sort="hot"] i {
    animation: xv-flame 0.62s cubic-bezier(0.22, 1, 0.36, 1);
    transform-origin: 50% 85%;
}

.feed-sort-btn.is-playing[data-sort="new"] i {
    animation: xv-tick 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}

.feed-sort-btn.is-playing[data-sort="top"] i {
    animation: xv-raise 0.66s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: 50% 90%;
}

/* fire: flares up and settles */
@keyframes xv-flame {
    0% {
        transform: scale(1) rotate(0deg);
        filter: none;
    }

    28% {
        transform: scale(1.32) rotate(-7deg);
        filter: drop-shadow(0 0 7px rgba(225, 147, 47, 0.95));
    }

    52% {
        transform: scale(1.08) rotate(5deg);
        filter: drop-shadow(0 0 5px rgba(225, 147, 47, 0.6));
    }

    76% {
        transform: scale(1.18) rotate(-3deg);
        filter: drop-shadow(0 0 6px rgba(225, 147, 47, 0.75));
    }

    100% {
        transform: scale(1) rotate(0deg);
        filter: none;
    }
}

/* clock: the hands run a full turn */
@keyframes xv-tick {
    0% {
        transform: rotate(0deg) scale(1);
    }

    20% {
        transform: rotate(90deg) scale(1.12);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* trophy: lifted, then a small settle */
@keyframes xv-raise {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
    }

    30% {
        transform: translateY(-6px) scale(1.22) rotate(-8deg);
    }

    55% {
        transform: translateY(0) scale(1) rotate(6deg);
    }

    75% {
        transform: translateY(-2px) scale(1.08) rotate(-3deg);
    }

    100% {
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .feed-sort-btn.is-playing i {
        animation: none !important;
    }
}

@media (max-width: 640px) {
    .feed-sort-bar {
        gap: 2px;
        padding: 6px;
    }

    .feed-sort-btn {
        flex: 1;
        justify-content: center;
        padding: 9px 10px;
        font-size: 13px;
    }
}

/* Custom Feed Video Controls */
.feed-video-controls-left {
    position: absolute;
    bottom: 25px;
    left: 32px;
    z-index: 10;
    display: flex;
}

.feed-video-controls-right {
    position: absolute;
    bottom: 20px;
    right: 30px;
    z-index: 10;
    display: flex;
}

/* Revert to original tighter spacing inside the PDM */
.pdm-carousel-embedded .feed-video-controls-left {
    bottom: 12px;
    left: 12px;
}

.pdm-carousel-embedded .feed-video-controls-right {
    bottom: 12px;
    right: 12px;
}

.feed-volume-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    border-radius: 24px;
    background: transparent;
    transition: background 0.2s;
    padding: 10px 4px 4px 4px;
}

.feed-volume-container:hover {
    background: rgba(0, 0, 0, 0.45);
}

.feed-volume-slider {
    width: 6px;
    height: 0;
    background: transparent;
    outline: none;
    border-radius: 4px;
    cursor: pointer;
    writing-mode: vertical-lr;
    direction: rtl;
    margin-bottom: 12px;
    opacity: 0;
    transition: opacity 0.2s, height 0.2s;
    pointer-events: none;
    accent-color: #026181;
}

.feed-volume-container:hover .feed-volume-slider {
    opacity: 1;
    height: 80px;
    pointer-events: auto;
}

.feed-video-btn {
    background: rgba(0, 0, 0, 0.35);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.feed-volume-container:hover .feed-video-btn {
    background: transparent;
}

.feed-video-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Custom Feed Video Scrubber Progress Bar */
.feed-video-progress-container {
    position: sticky;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 14px;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: flex-end;
    padding-bottom: 2px;
    margin-top: -14px;
    /* Overlay on top of the track without expanding height */
    /* Rounded corners are inherited from .carousel-view */
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
}

.feed-video-progress-track {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.35);
    position: relative;
    transition: height 0.1s ease;
}

.feed-video-progress-container:hover .feed-video-progress-track {
    height: 5px;
}

.feed-video-progress-fill {
    height: 100%;
    width: 0%;
    background: #026181;
    position: absolute;
    left: 0;
    top: 0;
}

.feed-video-progress-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #026181;
    border: 1.5px solid #ffffff;
    opacity: 0;
    transition: opacity 0.1s ease;
    pointer-events: none;
    z-index: 12;
}

.feed-video-progress-container:hover .feed-video-progress-thumb {
    opacity: 1;
}

/* Already-requested card: same shape as the action, settled colouring */
.fund-seeker-request-btn.is-sent,
.fund-seeker-request-btn.is-sent:hover {
    background: #eef2f5;
    color: #4b5563;
    box-shadow: inset 0 0 0 1px #d7dde3;
    cursor: default;
}

.fund-seeker-request-btn.is-sent:active {
    transform: none;
}

.fund-seeker-request-btn.is-sent i {
    color: #16a34a;
}

/* ==========================================================================
   Crowdfund tab

   The deal room's teal, restated as literal values the way the rest of
   home.css does. The card's job differs from an invest card's: it has to show
   how far a raise has got and how little is left, so progress and scarcity
   carry the visual weight rather than the headline number.

   As on the profile, received money is solid and accepted-but-unsettled money
   is hatched. The two are never merged into one bar.
   ========================================================================== */

.crowd-feed {
    min-height: 400px;
}

/* ---- filter row ---- */

.crowd-bar {
    padding: 4px 0 16px;
    border-bottom: 1px solid #eef2f3;
}

.crowd-bar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.crowd-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 240px;
    min-width: 0;
    padding: 0 14px;
    border: 1px solid rgba(14, 20, 23, 0.14);
    border-radius: 999px;
    background: #fff;
    color: #8a959b;
}

.crowd-search:focus-within {
    border-color: transparent;
    outline: 2px solid #026282;
    outline-offset: 1px;
}

.crowd-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 10px 0;
    font-size: 13.5px;
    color: #123240;
    background: none;
}

.crowd-select {
    padding: 10px 34px 10px 14px;
    border: 1px solid rgba(14, 20, 23, 0.14);
    border-radius: 999px;
    background: #fff;
    font-size: 13.5px;
    font-weight: 600;
    color: #026282;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' stroke='%23026282' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
}

.crowd-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 15px;
    border: 1px solid rgba(14, 20, 23, 0.14);
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 600;
    color: #5d6b72;
    cursor: pointer;
    user-select: none;
}

.crowd-toggle input {
    accent-color: #026282;
    cursor: pointer;
}

.crowd-toggle:has(input:checked) {
    background: #e6f1f4;
    border-color: #d0e5eb;
    color: #026282;
}

/* Both selects here become enhanced dropdowns, so they size as flex children
   of the row and take the row's pill shape. */
.crowd-bar-row .nsel {
    flex: 0 1 200px;
    min-width: 160px;
}

.crowd-bar-row .nsel-trigger {
    border-radius: 999px;
    padding: 7px 13px;
}

.crowd-results-count {
    margin-top: 12px;
    font-size: 12.5px;
    color: #8a959b;
}

/* Category icon inside the Invest tab's filter dropdown. */
.cf-option-icon {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 7px;
    background: #e6f1f4;
    color: #026282;
}

.cf-option-icon .material-symbols-outlined {
    font-size: 15px;
    line-height: 1;
}

/* ---- card grid ---- */

.crowd-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding: 24px 0;
}

.crowd-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(14, 20, 23, 0.1);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(14, 20, 23, 0.04), 0 8px 20px -16px rgba(14, 20, 23, 0.28);
    transition:
        transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.crowd-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 2px 6px rgba(14, 20, 23, 0.05), 0 16px 32px -24px rgba(14, 20, 23, 0.32);
}

.crowd-cover {
    position: relative;
    height: 140px;
    background: #06303f;
}

.crowd-cover.is-solid {
    background: linear-gradient(135deg, #06303f, #026282);
}

.crowd-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.crowd-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 48, 63, 0.05), rgba(6, 48, 63, 0.6));
}

.crowd-badges {
    position: absolute;
    left: 14px;
    bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.crowd-badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.92);
    color: #06303f;
    backdrop-filter: blur(6px);
}

/* Amber marks the one genuinely time-critical thing on the card. */
.crowd-badge.is-urgent {
    background: rgba(225, 147, 47, 0.94);
    color: #fff;
}

.crowd-status {
    position: absolute;
    top: 12px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.92);
    color: #0a7397;
    backdrop-filter: blur(6px);
}

.crowd-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.crowd-status.is-funded {
    background: #06303f;
    color: #fff;
}

.crowd-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px;
}

.crowd-head {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.crowd-logo {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 11px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: #e6f1f4;
    color: #026282;
}

.crowd-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.crowd-head-text {
    min-width: 0;
}

.crowd-title {
    margin: 0;
    font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #06303f;
    overflow-wrap: anywhere;
}

.crowd-company {
    display: block;
    font-size: 12.5px;
    color: #5d6b72;
    overflow-wrap: anywhere;
}

.crowd-tagline {
    margin: 12px 0 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: #33424a;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- progress ---- */

.crowd-bar-track {
    display: flex;
    height: 8px;
    margin-top: 16px;
    border-radius: 999px;
    overflow: hidden;
    background: #e6f1f4;
}

.crowd-bar-received,
.crowd-bar-committed {
    height: 100%;
}

.crowd-bar-received {
    background: #026282;
}

.crowd-bar-committed {
    background-image: repeating-linear-gradient(135deg,
            #0a7397 0 5px,
            rgba(255, 255, 255, 0.45) 5px 10px);
    background-size: 14px 14px;
}

.crowd-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.crowd-metric {
    min-width: 0;
}

.crowd-metric-value {
    display: block;
    font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #06303f;
    overflow-wrap: anywhere;
}

.crowd-metric-label {
    display: block;
    font-size: 11px;
    color: #8a959b;
    overflow-wrap: anywhere;
}

/* The cheapest slot still open - what makes the raise feel reachable. Sits on
   auto margin so cards with differing tagline lengths still line their
   footers up across the grid row. */
.crowd-entry {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin-top: auto;
    padding: 10px 13px;
    border-radius: 11px;
    background: #f5f8f9;
}

.crowd-entry-label {
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
    color: #8a959b;
}

.crowd-entry-value {
    font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #026282;
}

.crowd-entry-equity {
    font-size: 12.5px;
    color: #5d6b72;
}

.crowd-entry.is-empty {
    justify-content: center;
    font-size: 12.5px;
    color: #8a959b;
}

.crowd-cta {
    display: block;
    margin-top: 10px;
    padding: 11px 16px;
    border-radius: 999px;
    background: #06303f;
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.crowd-cta:hover {
    background: #013f55;
    color: #fff;
}

.crowd-cta.is-ghost {
    background: #fff;
    color: #026282;
    box-shadow: inset 0 0 0 1px rgba(14, 20, 23, 0.14);
}

.crowd-cta.is-ghost:hover {
    background: #e6f1f4;
    color: #026282;
}

.crowd-cta.is-backed {
    background: #e6f1f4;
    color: #026282;
    cursor: default;
}

@media (max-width: 768px) {
    .crowd-cards-container {
        grid-template-columns: 1fr;
    }

    .crowd-bar-row {
        flex-direction: column;
        align-items: stretch;
    }

    .crowd-select,
    .crowd-toggle {
        width: 100%;
    }

    .crowd-toggle {
        justify-content: center;
    }
}

/* ── Scoped Opportunities Search & Sort Row ── */
.opportunities-feed .cf-search-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: center;
    width: 100%;
}

.opportunities-feed .cf-search-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.opportunities-feed .cf-search-wrap .cf-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    width: 18px;
    height: 18px;
}

.opportunities-feed .cf-search-input {
    width: 100%;
    padding: 12px 16px 12px 46px;
    font-size: 0.95rem;
    border: 1px solid #dbe7f0;
    border-radius: 12px;
    outline: none;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(2, 97, 129, 0.04);
    transition: all 0.2s ease;
    color: #002230;
    font-family: inherit;
    box-sizing: border-box;
}

.opportunities-feed .cf-search-input:focus {
    border-color: #026181;
    box-shadow: 0 4px 12px rgba(2, 97, 129, 0.08);
}

.opportunities-feed .cf-search-clear {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.opportunities-feed .cf-search-clear:hover {
    color: #ef4444;
}

.opportunities-feed .cf-sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.opportunities-feed .cf-sort-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4b5563;
}

.opportunities-feed .cf-sort-select {
    padding: 10px 32px 10px 16px;
    font-size: 0.9rem;
    border: 1px solid #dbe7f0;
    border-radius: 12px;
    background: #ffffff;
    color: #026181;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(2, 97, 129, 0.04);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%23026181' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 20px;
    transition: all 0.2s ease;
}

.opportunities-feed .cf-sort-select:focus {
    border-color: #026181;
    box-shadow: 0 4px 12px rgba(2, 97, 129, 0.08);
}

@media (max-width: 768px) {
    .opportunities-feed .cf-search-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .opportunities-feed .cf-sort-wrap {
        justify-content: space-between;
    }

    .opportunities-feed .cf-sort-select {
        flex: 1;
    }
}