/* =================================================================== */
/* ACTIVITY LOG v2 — Reddit-Style Content Cards                        */
/* =================================================================== */

/* Core utility */
.hidden {
    display: none !important;
}

/* ─── Spoke header extension ─────────────────────────────────────── */
.account-spoke-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.activity-header-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}
.act-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.act-icon-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.act-icon-btn.is-spinning .material-symbols-outlined { animation: spin 0.7s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Main layout (70 / 30 two-pane shell) ─────────────────────── */
.activity-shell.activity-two-pane,
.activity-layout {
    display: grid;
    grid-template-columns: 70% 30%;
    gap: 24px;
    margin-top: 24px;
    align-items: flex-start;
}

.activity-left-pane,
.activity-main-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

/* Left pane gets its own scroll so it only scrolls when hovered */
.activity-left-pane {
    max-height: none;
    overflow-y: visible;
    overscroll-behavior: auto;
    padding-right: 4px;
}

.activity-right-pane,
.activity-side-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    position: sticky;
    top: 96px;
    align-self: start;
}

/* ─── Primary tabs (Posts / Comments / Saved) ───────────────────── */
.activity-main-tabs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(15,17,26,0.85);
    border: 1px solid rgba(148,163,184,0.5);
    box-shadow: 0 10px 30px rgba(15,23,42,0.6);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    width: fit-content;
}

.activity-main-tab {
    border: none;
    background: transparent;
    color: rgba(148,163,184,0.9);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
    font-family: inherit;
    white-space: nowrap;
}

.activity-main-tab .material-symbols-outlined {
    font-size: 0.95rem;
}

.activity-main-tab.is-active {
    background: radial-gradient(circle at top, rgba(167,139,250,0.35), rgba(79,70,229,0.12));
    color: #e5e7eb;
    box-shadow: 0 10px 30px rgba(15,23,42,0.7);
    transform: translateY(-1px);
}

.activity-main-tab:not(.is-active):hover {
    background: rgba(148,163,184,0.15);
    color: #f9fafb;
}

/* ─── Stats Row ──────────────────────────────────────────────────── */
.activity-stats-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    margin-bottom: 22px;
}

.activity-stat-card {
    position: relative;
    background: rgba(15, 17, 26, 0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    backdrop-filter: blur(12px);
    padding: 16px 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
}

.activity-stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,255,255,0.18);
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

.activity-stat-card.is-active {
    border-color: color-mix(in srgb, var(--c,#a78bfa) 55%, transparent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--c,#a78bfa) 30%, transparent),
                0 8px 24px rgba(0,0,0,0.25);
    background: color-mix(in srgb, var(--c,#a78bfa) 8%, rgba(15,17,26,0.8));
}

.activity-stat-card.is-active::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--c,#a78bfa), transparent);
}

.stat-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--c,#a78bfa) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--c,#a78bfa) 25%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c,#a78bfa);
    flex-shrink: 0;
}
.stat-icon-wrap .material-symbols-outlined { font-size: 1.15rem; }

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 1;
}
.stat-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.stat-info span {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 500;
}

.stat-pulse {
    position: absolute;
    bottom: -20px; right: -20px;
    width: 80px; height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--c,#a78bfa) 20%, transparent), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.activity-stat-card.is-active .stat-pulse { opacity: 1; }

/* ─── Filter bar ─────────────────────────────────────────────────── */
.activity-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.activity-search-wrapper {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 17, 26, 0.7);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 0 14px;
    height: 42px;
    backdrop-filter: blur(10px);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.activity-search-wrapper:focus-within {
    border-color: rgba(167, 139, 250, 0.5);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.08);
}
.activity-search-wrapper > .material-symbols-outlined {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.35);
    flex-shrink: 0;
}
.activity-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.92rem;
    font-family: inherit;
}
.activity-search-input::placeholder { color: rgba(255,255,255,0.3); }
.act-search-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.35);
    display: flex;
    align-items: center;
    padding: 0;
    transition: color 0.2s;
    flex-shrink: 0;
}
.act-search-clear:hover { color: #fff; }
.act-search-clear .material-symbols-outlined { font-size: 1.1rem; }

/* Filter chips */
.activity-filter-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.filter-chip {
    padding: 7px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.6);
    font-size: 0.83rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}
.filter-chip:hover {
    background: rgba(255,255,255,0.09);
    color: #fff;
    border-color: rgba(255,255,255,0.22);
}
.filter-chip.is-active {
    background: rgba(167, 139, 250, 0.15);
    border-color: rgba(167, 139, 250, 0.5);
    color: #fff;
}

/* Sort select */
.activity-sort-select {
    height: 42px;
    padding: 0 14px;
    background: rgba(15, 17, 26, 0.7);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: rgba(255,255,255,0.8);
    font-size: 0.88rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    backdrop-filter: blur(10px);
    transition: border-color 0.2s ease;
    min-width: 145px;
}
.activity-sort-select:focus { border-color: rgba(167,139,250,0.5); }
.activity-sort-select option { background: #161923; color: #fff; }

/* ─── Feed Panel ─────────────────────────────────────────────────── */
.activity-feed-panel {
    min-height: 340px;
    overflow: hidden;
}

/* ─── Side rails / hub card ─────────────────────────────────────── */
.activity-side-card,
.activity-hub-card {
    border-radius: 16px;
    border: 1px solid rgba(148,163,184,0.35);
    background: radial-gradient(circle at top, rgba(30,64,175,0.4), rgba(15,23,42,0.95));
    box-shadow: 0 18px 45px rgba(15,23,42,0.9);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* Cap height to viewport so internal list can scroll */
    max-height: calc(100vh - 40px);
}

.activity-side-card-header {
    padding: 14px 18px 10px;
    border-bottom: 1px solid rgba(148,163,184,0.35);
}

.activity-side-card-header h3 {
    margin: 0 0 4px;
    font-size: 0.98rem;
    font-weight: 600;
    color: #e5e7eb;
}

.activity-side-card-header p {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(148,163,184,0.9);
}

.activity-side-list {
    /* Grow to fill the card body, scroll internally instead of a fixed 260px cap */
    flex: 1;
    min-height: 80px;
    overflow-y: auto;
    overflow-x: hidden;
}

.activity-hub-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.activity-hub-count-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(148,163,184,0.6);
    font-size: 0.8rem;
    color: #e5e7eb;
}
.activity-hub-count-pill .material-symbols-outlined {
    font-size: 0.95rem;
}

.activity-side-divider {
}

.activity-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    padding: 0 6px;
    margin-left: 4px;
    border-radius: 999px;
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(148,163,184,0.45);
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
    color: rgba(226,232,240,0.9);
}

.activity-main-tab.is-active .activity-tab-count {
    background: rgba(30,64,175,0.9);
    border-color: rgba(129,140,248,0.8);
}

/* ─── Hub sections (collapsible) ────────────────────────────────── */
/* New hub tabs-based layout */
.activity-hub-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 10px 12px 4px;
}

.activity-hub-tab {
    border: none;
    background: rgba(15,23,42,0.85);
    color: rgba(148,163,184,0.9);
    border-radius: 12px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.78rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.activity-hub-tab .material-symbols-outlined {
    font-size: 1rem;
}

.activity-hub-tab .hub-tab-count {
    font-variant-numeric: tabular-nums;
    font-size: 0.7rem;
    background: rgba(15,23,42,0.95);
    padding: 1px 6px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.6);
}

.activity-hub-tab.is-active {
    background: radial-gradient(circle at top, rgba(96,165,250,0.35), rgba(30,64,175,0.45));
    color: #e5e7eb;
    box-shadow: 0 10px 30px rgba(15,23,42,0.8);
    transform: translateY(-1px);
}

.activity-hub-tab.is-active .hub-tab-count {
    border-color: rgba(191,219,254,0.9);
    background: rgba(15,23,42,0.9);
}

.activity-hub-body {
    padding: 4px 0 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    /* Stretch to fill remaining card height so the list can scroll inside */
    flex: 1;
    min-height: 0;
}

.activity-hub-body-header {
    padding: 0 18px 6px;
    font-size: 0.78rem;
    color: rgba(148,163,184,0.9);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.rl-sort-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    /* reset the uppercase / letter-spacing inherited from the header */
    text-transform: none;
    letter-spacing: 0;
}

    height: 1px;
    background: linear-gradient(90deg, rgba(148,163,184,0.1), rgba(148,163,184,0.45), rgba(148,163,184,0.1));
}

/* ═══════════════════════════════════════════════════════════════════ */
/* SKELETON LOADERS                                                   */
/* ═══════════════════════════════════════════════════════════════════ */
.activity-loading-state { padding: 16px 0; }
.skeleton-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 0 20px;
}

.skel {
    border-radius: 6px;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.05) 25%,
        rgba(255,255,255,0.1)  50%,
        rgba(255,255,255,0.05) 75%
    );
    background-size: 400% 100%;
    animation: shimmer 1.6s ease-in-out infinite;
}
@keyframes shimmer {
    0%   { background-position: 100% 50%; }
    100% { background-position:   0% 50%; }
}

/* Story skeleton */
.skel-card {
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(15,17,26,0.4);
    padding: 18px 22px;
}
.skel-card--story {
    display: flex;
    gap: 18px;
    align-items: center;
}
.skel-card-thumb {
    width: 140px;
    height: 80px;
    border-radius: 10px;
    flex-shrink: 0;
}
.skel-card-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.skel-line { height: 12px; }

/* Post skeleton */
.skel-card--post {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.skel-card-footer-skel {
    display: flex;
    gap: 16px;
    margin-top: 4px;
}

/* Width helpers */
.w-20  { width: 20%;  }
.w-30  { width: 30%;  }
.w-40  { width: 40%;  }
.w-50  { width: 50%;  }
.w-60  { width: 60%;  }
.w-70  { width: 70%;  }
.w-80  { width: 80%;  }
.w-100 { width: 100%; }

/* ═══════════════════════════════════════════════════════════════════ */
/* FEED LIST                                                          */
/* ═══════════════════════════════════════════════════════════════════ */
.activity-feed-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 20px;
}

/* Date header separator */
.activity-date-header {
    display: flex;
    align-items: center;
    padding: 14px 4px 8px;
    gap: 14px;
}
.activity-date-header::before,
.activity-date-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.07);
}
.activity-date-header span {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════ */
/* BASE CARD                                                          */
/* ═══════════════════════════════════════════════════════════════════ */
.activity-card {
    background: rgba(15, 17, 26, 0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    backdrop-filter: blur(12px);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(.22,.61,.36,1),
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}
.activity-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.16);
    box-shadow: 0 14px 40px rgba(0,0,0,0.25);
}

.activity-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 20px 22px;
}
a.activity-card-link:hover { color: inherit; }

/* Entrance animation */
.activity-card.is-entering {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    animation: cardIn 0.45s cubic-bezier(.22,.61,.36,1) forwards;
}
@keyframes cardIn {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Shared badge */
.activity-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: color-mix(in srgb, var(--badge-c, #94a3b8) 12%, transparent);
    color: var(--badge-c, #94a3b8);
    border: 1px solid color-mix(in srgb, var(--badge-c, #94a3b8) 20%, transparent);
    flex-shrink: 0;
    white-space: nowrap;
}
.activity-type-badge .material-symbols-outlined {
    font-size: 0.85rem;
}

/* Shared timestamp */
.activity-card-time {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════ */
/* STORY CARD                                                         */
/* ═══════════════════════════════════════════════════════════════════ */
.activity-card--story .activity-card-link {
    display: flex;
    gap: 20px;
    align-items: stretch;
}
.activity-card--story:hover {
    border-color: color-mix(in srgb, #fb7185 40%, transparent);
    box-shadow: 0 14px 40px rgba(251, 113, 133, 0.08);
}

/* Thumbnail */
.story-card-thumb {
    width: 150px;
    min-height: 100px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}
.story-card-thumb-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.4s ease;
}
.activity-card--story:hover .story-card-thumb-img {
    transform: scale(1.06);
}

/* Fallback (no cover) */
.story-card-thumb--fallback {
    background: linear-gradient(135deg, rgba(251,113,133,0.15), rgba(167,139,250,0.15));
    display: flex;
    align-items: center;
    justify-content: center;
}
.story-card-thumb--fallback .material-symbols-outlined {
    font-size: 2.2rem;
    color: rgba(251,113,133,0.4);
}

/* Body */
.story-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    justify-content: center;
}

.story-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.story-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.activity-card--story:hover .story-card-title {
    color: #fb7185;
}

.story-card-author {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.5);
    margin: 0;
}

.story-card-desc {
    font-size: 0.84rem;
    color: rgba(255,255,255,0.4);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════ */
/* POST CARD                                                          */
/* ═══════════════════════════════════════════════════════════════════ */
.activity-card--post:hover {
    border-color: rgba(255,255,255,0.18);
}
/* Type-specific hover glows */
.activity-card--post[data-type="like"]:hover,
.activity-card--post[data-type="cell_like"]:hover {
    border-color: color-mix(in srgb, #f472b6 35%, transparent);
    box-shadow: 0 14px 40px rgba(244, 114, 182, 0.06);
}
.activity-card--post[data-type="watchlist"]:hover {
    border-color: color-mix(in srgb, #38bdf8 35%, transparent);
    box-shadow: 0 14px 40px rgba(56, 189, 248, 0.06);
}
.activity-card--post[data-type="post"]:hover {
    border-color: color-mix(in srgb, #fb923c 35%, transparent);
    box-shadow: 0 14px 40px rgba(251, 146, 60, 0.06);
}

.post-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.post-card-channel {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
    font-weight: 500;
}
.post-card-channel .material-symbols-outlined {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.3);
}

.post-card-author-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
}
.post-card-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.1);
}
.post-card-author-name {
    font-weight: 500;
}

.post-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.activity-card--post:hover .post-card-title {
    color: rgba(255,255,255,0.95);
}

.post-card-content {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.55);
    margin: 0 0 10px;
    line-height: 1.55;
}

/* Optional post image */
.post-card-image {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
    max-height: 220px;
    background: rgba(255,255,255,0.03);
}
.post-card-image img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.post-card-image img[src] {
    opacity: 1;
}

/* Footer stats */
.post-card-footer {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.post-card-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    font-weight: 500;
    transition: color 0.2s ease;
}
.post-card-stat .material-symbols-outlined {
    font-size: 0.95rem;
}
.activity-card--post:hover .post-card-stat {
    color: rgba(255,255,255,0.55);
}
.post-card-stat--saved {
    color: #38bdf8 !important;
}
.post-card-stat--saved .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
}

/* ═══════════════════════════════════════════════════════════════════ */
/* COMMENT CARD                                                       */
/* ═══════════════════════════════════════════════════════════════════ */
.activity-card--comment:hover {
    border-color: color-mix(in srgb, #34d399 35%, transparent);
    box-shadow: 0 14px 40px rgba(52, 211, 153, 0.06);
}

.comment-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.comment-card-on {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.45);
}
.comment-card-on strong {
    color: rgba(255,255,255,0.7);
    font-weight: 600;
}

.comment-card-quote {
    margin: 0 0 10px;
    padding: 12px 16px;
    border-left: 3px solid #34d399;
    background: rgba(52, 211, 153, 0.05);
    border-radius: 0 10px 10px 0;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.72);
    line-height: 1.6;
}

.comment-card-context {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
}
.comment-card-context .material-symbols-outlined {
    font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════════════════════════ */
/* NEXUS CELL / OPERATION CARD                                        */
/* ═══════════════════════════════════════════════════════════════════ */
.activity-card--channel {
    border-left: 3px solid color-mix(in srgb, var(--cell-c, #facc15) 55%, transparent);
}
.activity-card--channel:hover {
    border-color: color-mix(in srgb, var(--cell-c, #facc15) 75%, transparent);
    box-shadow: 0 16px 44px color-mix(in srgb, var(--cell-c, #facc15) 9%, rgba(0,0,0,0.35));
    transform: translateY(-3px);
}
.activity-card--channel .activity-card-link {
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 0;
}

/* ── Top row (icon + header + time) ─────────────────────────────── */
.cell-card-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px 12px;
}

.cell-card-icon-bubble {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--cell-c, #facc15) 22%, transparent),
        color-mix(in srgb, var(--cell-c, #facc15) 7%,  transparent)
    );
    border: 1.5px solid color-mix(in srgb, var(--cell-c, #facc15) 32%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(.34,1.56,.64,1),
                box-shadow  0.3s ease;
}
.activity-card--channel:hover .cell-card-icon-bubble {
    transform: scale(1.12) rotate(-8deg);
    box-shadow: 0 6px 22px color-mix(in srgb, var(--cell-c, #facc15) 28%, transparent);
}
.cell-card-icon-bubble .material-symbols-outlined {
    font-size: 1.55rem;
    color: var(--cell-c, #facc15);
}

.cell-card-header {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cell-card-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
    transition: color 0.2s ease;
}
.activity-card--channel:hover .cell-card-name {
    color: var(--cell-c, #facc15);
}

.cell-card-time {
    font-size: 0.72rem;
    color: #475569;
    flex-shrink: 0;
    padding-top: 4px;
    white-space: nowrap;
}

/* ── Description ─────────────────────────────────────────────────── */
.cell-card-desc {
    margin: 0;
    padding: 0 20px 13px;
    font-size: 0.83rem;
    color: #64748b;
    line-height: 1.55;
}

/* ── Stats row ───────────────────────────────────────────────────── */
.cell-card-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 10px 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.cell-card-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.76rem;
    color: #64748b;
    transition: color 0.2s ease;
}
.cell-card-stat .material-symbols-outlined {
    font-size: 14px;
}
.activity-card--channel:hover .cell-card-stat {
    color: #94a3b8;
}

/* ── Call-to-action footer ───────────────────────────────────────── */
.cell-card-cta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 11px 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--cell-c, #facc15);
    border-top: 1px solid rgba(255,255,255,0.05);
    background: color-mix(in srgb, var(--cell-c, #facc15) 3%, transparent);
    transition: background 0.25s ease, gap 0.25s ease;
}
.activity-card--channel:hover .cell-card-cta {
    background: color-mix(in srgb, var(--cell-c, #facc15) 8%, transparent);
    gap: 10px;
}
.cell-card-cta .material-symbols-outlined {
    font-size: 16px;
    transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
}
.activity-card--channel:hover .cell-card-cta .material-symbols-outlined {
    transform: translateX(6px);
}

/* ═══════════════════════════════════════════════════════════════════ */
/* EMPTY / ERROR STATES                                               */
/* ═══════════════════════════════════════════════════════════════════ */
.activity-empty-state,
.activity-error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 70px 40px;
    gap: 14px;
    text-align: center;
}
.empty-icon-ring {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: emptyPulse 3s ease-in-out infinite;
}
.empty-icon-ring.error { border-color: rgba(245,108,108,0.3); background: rgba(245,108,108,0.05); }
.empty-icon-ring .material-symbols-outlined {
    font-size: 2rem;
    color: rgba(255,255,255,0.2);
}
.empty-icon-ring.error .material-symbols-outlined { color: rgba(245,108,108,0.5); }

@keyframes emptyPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.05); }
    50%      { box-shadow: 0 0 0 12px rgba(255,255,255,0); }
}

.activity-empty-state h3,
.activity-error-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    margin: 0;
}
.activity-empty-state p,
.activity-error-state p {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.4);
    margin: 0;
    max-width: 320px;
    line-height: 1.5;
}

/* ─── Pagination ─────────────────────────────────────────────────── */
.activity-pagination {
    display: flex;
    justify-content: center;
    padding: 20px 25px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.activity-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}
.activity-load-more-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.28);
}
.activity-load-more-btn .material-symbols-outlined { font-size: 1.1rem; }

/* ═══════════════════════════════════════════════════════════════════ */
/* HUB CARD PREVIEW  (page-account.php dashboard)                    */
/* ═══════════════════════════════════════════════════════════════════ */
/* Card-level overrides removed — .hub-card base styles now apply */

/* Add extra right padding so the 7d/30d toggle
   is fully contained inside the card and never gets cut off. */
#card-activity-log .card-header {
    padding-right: 48px;
    box-sizing: border-box;
    min-width: 0;
}
#card-activity-log .activity-summary-header {
    min-width: 0; /* Allow flex row to shrink so toggle stays inside */
}

/* Icon container removed — bare SVG now matches other hub cards */

/* Live dot removed from this card for consistency with other hub cards */

.activity-log-card-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0 !important;
    position: relative;
    z-index: 1;
}
#card-activity-log .card-body { padding: 0; }

/* ─── Mini Stat Buttons (Redesigned) ───────────────────────── */
.activity-mini-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mini-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 6px;
    border: none;
    border-right: 1px solid rgba(255,255,255,0.06);
    background: transparent;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    cursor: default;
    position: relative;
    font-family: inherit;
}
.mini-stat:last-child { border-right: none; }
.mini-stat:hover { background: rgba(255,255,255,0.04); }
.mini-stat .material-symbols-outlined {
    font-size: 1rem;
    color: var(--mc, #94a3b8);
}
.mini-stat strong {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* New icon wrapper inside mini-stats */
.mini-stat-icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--mc, #94a3b8) 12%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}
.mini-stat-icon-wrap .material-symbols-outlined {
    font-size: 0.95rem;
    color: var(--mc, #94a3b8);
}
.mini-stat:hover .mini-stat-icon-wrap {
    transform: scale(1.1);
    background: color-mix(in srgb, var(--mc, #94a3b8) 18%, transparent);
}
.mini-stat.is-active .mini-stat-icon-wrap {
    background: color-mix(in srgb, var(--mc, #94a3b8) 25%, transparent);
    box-shadow: 0 0 12px color-mix(in srgb, var(--mc, #94a3b8) 20%, transparent);
}

.mini-stat-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

/* Preview skeleton */
.preview-skel {
    border-radius: 5px;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 25%,
        rgba(255,255,255,0.08) 50%,
        rgba(255,255,255,0.04) 75%
    );
    background-size: 400% 100%;
    animation: shimmer 1.6s ease-in-out infinite;
}
.preview-skel-icon { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; }
.preview-skel-lines { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.preview-skel-line  { height: 10px; border-radius: 5px; }

/* ─── Preview Section ────────────────────────────────── */
.activity-preview-section {
    display: flex;
    flex-direction: column;
}
.activity-preview-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px 6px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(148,163,184,0.7);
    font-weight: 600;
}
.activity-preview-header .material-symbols-outlined {
    font-size: 0.85rem;
    color: rgba(148,163,184,0.5);
}

/* Preview feed rows */
.activity-log-preview-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.activity-log-preview-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
    cursor: default;
    min-width: 0;
    position: relative;
}
.activity-log-preview-item:last-child { border-bottom: none; }
.activity-log-preview-item:hover {
    background: rgba(255,255,255,0.03);
}

.activity-log-preview-item.is-loading {
    gap: 12px;
    padding: 12px 18px;
    cursor: default;
}
.activity-log-preview-item.is-loading:hover { background: transparent; }

.activity-log-preview-item.is-empty {
    justify-content: center;
    flex-direction: column;
    padding: 28px 20px;
    color: rgba(255,255,255,0.35);
    font-size: 0.83rem;
    gap: 8px;
    font-style: italic;
    text-align: center;
}
.activity-log-preview-item.is-empty .material-symbols-outlined {
    font-size: 1.6rem;
    color: rgba(255,255,255,0.15);
}

/* Icon bubble with colored left accent */
.preview-icon-bubble {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--pc, #94a3b8) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--pc, #94a3b8) 18%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    position: relative;
}
.activity-log-preview-item:hover .preview-icon-bubble {
    transform: scale(1.08);
    background: color-mix(in srgb, var(--pc, #94a3b8) 16%, transparent);
    box-shadow: 0 0 14px color-mix(in srgb, var(--pc, #94a3b8) 15%, transparent);
}
.preview-icon-bubble .material-symbols-outlined {
    font-size: 0.95rem;
    color: var(--pc, #94a3b8);
}

.preview-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.preview-label {
    font-size: 0.84rem;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s ease;
}
.preview-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    color: var(--pc, rgba(255,255,255,0.38));
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    white-space: nowrap;
}

.preview-time {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.28);
    white-space: nowrap;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
}

/* Clickable preview items */
.activity-log-preview-item.is-link { cursor: pointer; }
.activity-log-preview-item.is-link .preview-item-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    width: 100%;
    min-width: 0;
}
.activity-log-preview-item.is-link:hover {
    background: linear-gradient(90deg, color-mix(in srgb, var(--pc,#94a3b8) 6%, transparent), transparent) !important;
}
.activity-log-preview-item.is-link:hover .preview-icon-bubble {
    transform: scale(1.12);
    box-shadow: 0 0 16px color-mix(in srgb, var(--pc,#94a3b8) 22%, transparent);
    border-color: color-mix(in srgb, var(--pc,#94a3b8) 35%, transparent);
}
.activity-log-preview-item.is-link:hover .preview-label { color: #fff; }

/* Entry animation for preview items */
@keyframes previewSlideIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
.activity-log-preview-item:not(.is-loading) {
    animation: previewSlideIn 0.3s ease forwards;
}
.activity-log-preview-item:nth-child(1) { animation-delay: 0s; }
.activity-log-preview-item:nth-child(2) { animation-delay: 0.05s; }
.activity-log-preview-item:nth-child(3) { animation-delay: 0.1s; }
.activity-log-preview-item:nth-child(4) { animation-delay: 0.15s; }

/* ─── Hub dashboard: interactive activity summary card ─────────────── */

/* Header: icon + title + toggle on same row, toggle at far right */
.activity-summary-header {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
    width: 100%;
}
.activity-summary-header .activity-card-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.activity-summary-header .activity-card-header-icon svg {
    width: 20px;
    height: 20px;
}
.activity-summary-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    flex: 1;
    min-width: 0;
}
.activity-summary-header .activity-mode-toggle {
    margin-left: 12px;
    flex-shrink: 0;
}

/* On smaller viewports, allow the header to wrap so the
   7d/30d toggle never gets cut off by the card edge. */
@media (max-width: 640px) {
    .hub-card-activity .activity-summary-header {
        flex-wrap: wrap;
        align-items: flex-start;
        row-gap: 8px;
    }

    .hub-card-activity .activity-summary-header .activity-mode-toggle {
        margin-left: 0;
        width: auto;
        display: flex;
        justify-content: flex-start;
    }
}

/* Options row and tagline removed to reduce card height */

.activity-summary-heading {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.activity-summary-heading h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.activity-summary-heading p {
    margin: 0;
    font-size: 0.76rem;
    color: rgba(148,163,184,0.8);
}

.activity-summary-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.activity-summary-stats .mini-stat {
    border-right-color: rgba(148,163,184,0.12);
    cursor: pointer;
    position: relative;
    padding: 14px 4px;
}
/* Glow line at top when active */
.activity-summary-stats .mini-stat::after {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    border-radius: 0 0 2px 2px;
    background: var(--mc, #a5b4fc);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.activity-summary-stats .mini-stat.is-active::after {
    opacity: 1;
}
.activity-summary-stats .mini-stat:hover {
    background: rgba(15,23,42,0.8);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15,23,42,0.6);
}
.activity-summary-stats .mini-stat.is-active {
    background: radial-gradient(circle at top, color-mix(in srgb, var(--mc,#a5b4fc) 15%, transparent), rgba(15,23,42,0.96));
    border-color: color-mix(in srgb, var(--mc,#a5b4fc) 30%, transparent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--mc,#a5b4fc) 20%, transparent),
                0 8px 24px rgba(15,23,42,0.8);
}
.mini-stat-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(148,163,184,0.8);
    font-weight: 500;
}
.mini-stat-trend {
    font-size: 0.68rem;
    color: rgba(148,163,184,0.7);
    font-weight: 600;
}
.mini-stat-trend.positive {
    color: #4ade80;
}
.mini-stat-trend.negative {
    color: #f97373;
}

.activity-mode-toggle {
    margin-left: 0;
    flex-shrink: 0;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.15s ease;
}
.activity-mode-toggle:hover {
    transform: scale(1.05);
}
.activity-mode-toggle:active {
    transform: scale(0.95);
}
.activity-mode-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(148,163,184,0.4);
    transition: border-color 0.2s ease;
}
.activity-mode-pill:hover {
    border-color: rgba(167,139,250,0.5);
}
.activity-mode-label {
    position: relative;
    z-index: 1;
    padding: 3px 9px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(148,163,184,0.9);
    transition: color 0.2s ease;
    font-weight: 500;
}
.activity-mode-indicator {
    position: absolute;
    inset: 2px 50% 2px 2px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(167,139,250,0.6), rgba(129,140,248,0.9));
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), width 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 2px 8px rgba(129,140,248,0.3);
}
.activity-mode-pill[data-mode="30d"] .activity-mode-indicator {
    transform: translateX(100%);
}

/* ─── Timeline Row ─────────────────────────────────────── */
.activity-timeline-row {
    padding: 14px 18px 12px;
    border-top: 1px solid rgba(129,140,248,0.06);
    border-bottom: 1px solid rgba(129,140,248,0.06);
    background: linear-gradient(180deg, rgba(30,64,175,0.12) 0%, rgba(15,23,42,0.4) 100%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 1;
}
.activity-timeline-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.8rem;
    color: rgba(226,232,240,0.9);
}
.activity-timeline-label {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.7rem;
    color: rgba(167,139,250,0.7);
    font-weight: 600;
}
.activity-timeline-total {
    font-weight: 600;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}
.activity-timeline-bars {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
    align-items: flex-end;
}
.activity-timeline-bar {
    position: relative;
    width: 100%;
    height: 40px;
    border-radius: 6px;
    background: rgba(15,23,42,0.7);
    overflow: hidden;
    transition: transform 0.2s ease;
    cursor: default;
}
.activity-timeline-bar:hover {
    transform: scaleY(1.05);
}
.activity-timeline-bar-fill {
    position: absolute;
    inset: auto 2px 2px 2px;
    height: 0;
    border-radius: 4px;
    background: linear-gradient(to top, rgba(167,139,250,0.85), rgba(129,140,248,0.6));
    transition: height 0.5s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 -2px 8px rgba(167,139,250,0.15);
}
.activity-timeline-bar[data-empty="true"] .activity-timeline-bar-fill {
    background: rgba(51,65,85,0.5);
    box-shadow: none;
}
.activity-timeline-bar-label {
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: rgba(148,163,184,0.7);
    font-weight: 500;
}

/* Tooltip on timeline bar hover */
.activity-timeline-bar .bar-tooltip {
    position: absolute;
    top: -26px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: rgba(15,23,42,0.95);
    border: 1px solid rgba(167,139,250,0.3);
    border-radius: 6px;
    padding: 2px 7px;
    font-size: 0.65rem;
    color: #e2e8f0;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    z-index: 5;
}
.activity-timeline-bar:hover .bar-tooltip {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.activity-summary-preview {
    max-height: 120px;
    overflow-y: hidden;
}
.activity-summary-preview::-webkit-scrollbar {
    width: 4px;
}
.activity-summary-preview::-webkit-scrollbar-track {
    background: transparent;
}
.activity-summary-preview::-webkit-scrollbar-thumb {
    background: rgba(167,139,250,0.2);
    border-radius: 4px;
}

/* ─── Footer ─────────────────────────────────────── */
.activity-summary-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: relative;
    z-index: 1;
}
.activity-footer-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
}
.activity-footer-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.2);
    background: rgba(15,23,42,0.7);
    font-size: 0.75rem;
    color: rgba(226,232,240,0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.activity-footer-pill .material-symbols-outlined {
    font-size: 0.85rem;
    color: rgba(167,139,250,0.6);
}

/* Open Full Log button enhancement */
.activity-summary-footer .hub-card-button.primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.25s ease;
}
.activity-summary-footer .hub-card-button.primary:hover {
    gap: 10px;
}

/* ── Readlist grouped layout ─────────────────────────────── */

/* Sort bar row */
.rl-sort-bar-item {
    list-style: none;
    padding: 8px 12px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.rl-sort-bar {
    display: flex;
    align-items: center;
    gap: 6px;
}
.rl-sort-label {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    margin-right: 2px;
    user-select: none;
}
.rl-sort-btn {
    padding: 3px 11px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.12);
    background: transparent;
    color: rgba(255,255,255,0.45);
    font-size: 11px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    line-height: 1.5;
    font-family: inherit;
}
.rl-sort-btn:hover {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.75);
}
.rl-sort-btn.is-active {
    background: rgba(129,140,248,0.15);
    border-color: rgba(129,140,248,0.5);
    color: #a5b4fc;
}

/* Story group wrapper */
.rl-story-group {
    list-style: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.rl-story-group:last-child { border-bottom: none; }

/* Group header row: [icon]  Story Title / N chapters   2m ago */
.rl-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 4px;
}
.rl-group-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.rl-group-title {
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(255,255,255,0.88);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    transition: color 0.15s;
    display: block;
}
a.rl-group-title:hover { color: #a5b4fc; }
.rl-group-count {
    font-size: 11px;
    color: rgba(129,140,248,0.7);
}
.rl-group-time {
    font-size: 11px;
    color: rgba(255,255,255,0.28);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Chapter list under each group header */
.rl-chapter-list {
    list-style: none;
    margin: 0;
    padding: 0 0 6px 0;
}
.rl-chapter-item { list-style: none; }
.rl-chapter-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 12px 5px 52px;   /* 52px = icon indent */
    gap: 8px;
    text-decoration: none;
    color: rgba(255,255,255,0.58);
    font-size: 12px;
    transition: background 0.15s, color 0.15s;
    border-radius: 0;
}
.rl-chapter-link:hover {
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.85);
}
.rl-chapter-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rl-chapter-time {
    font-size: 11px;
    color: rgba(255,255,255,0.25);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.preview-item-link {
    display: contents;
    text-decoration: none;
    color: inherit;
}
@supports not (display: contents) {
    .preview-item-link {
        display: flex;
        align-items: center;
        gap: 11px;
        width: 100%;
        text-decoration: none;
        color: inherit;
    }
}

/* ═══════════════════════════════════════════════════════════════════ */
/* HUB-STYLE CARD STRUCTURE                                           */
/* Mirrors hub-styles.css so activity cards match the hub feed        */
/* ═══════════════════════════════════════════════════════════════════ */

/* Card entrance animation (matches hub) */
@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.post-card-animate {
    animation: cardEntrance 0.4s ease forwards;
    opacity: 0;
}

/* Base hub post card */
.hub-post-card {
    display: grid;
    grid-template-columns: 40px 1fr;
    background: rgba(15, 17, 26, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}
.hub-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border-color: rgba(74, 144, 226, 0.25);
}

/* Vote column */
.vote-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    gap: 2px;
    background: rgba(0, 0, 0, 0.15);
}
.vote-score {
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    min-width: 20px;
}
.vote-score.upvoted { color: #ff6b35; }

/* Content area */
.post-content-area {
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

/* Post meta row */
.post-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    flex-wrap: wrap;
}
.post-meta-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}
.post-meta-author { font-weight: 500; color: rgba(255, 255, 255, 0.7); }
.post-meta-dot    { color: rgba(255, 255, 255, 0.3); }
.post-meta-time   { color: rgba(255, 255, 255, 0.5); }
.post-channel-link {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 600;
}
.post-channel-link:hover { text-decoration: underline; }
.creator-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(255, 107, 53, 0.2);
    color: #ff6b35;
}
.act-comment-on {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
}
.act-comment-on strong {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

/* Post title */
.post-title-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.post-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: #f1f1f1;
    line-height: 1.3;
}
.post-title-link:hover .post-title {
    color: #4a90e2;
    transition: color 0.2s ease;
}

/* Post body / text content */
.post-body {
    position: relative;
    color: #ddd;
    line-height: 1.5;
    font-size: 0.9rem;
}
.post-text-content { overflow: hidden; }
.post-text-content.is-truncated {
    max-height: 120px;
    mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
}
.post-text-content.is-expanded {
    max-height: none;
    mask-image: none;
    -webkit-mask-image: none;
}

/* Comment quote truncation */
.comment-card-quote.is-truncated {
    max-height: 120px;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
}
.comment-card-quote.is-expanded {
    max-height: none;
    mask-image: none;
    -webkit-mask-image: none;
}

/* Expand / collapse button */
.act-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #4a90e2;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 0;
    margin-top: 2px;
    font-family: inherit;
    transition: color 0.15s;
}
.act-expand-btn:hover { color: #6aaef5; }
.act-expand-btn svg { transition: transform 0.2s ease; flex-shrink: 0; }

/* Post image */
.post-image-container {
    max-height: 500px;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 6px;
}
.post-image {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 6px;
}

/* Actions bar */
.post-actions-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-top: 6px;
    flex-wrap: wrap;
}
.post-action {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.82rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
    font-family: inherit;
}
.post-action:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
}

/* Responsive adjustments for hub cards on activity page */
@media (max-width: 600px) {
    .hub-post-card { grid-template-columns: 32px 1fr; }
    .vote-column { padding: 6px 2px; }
    .post-content-area { padding: 8px 10px; }
    .post-title { font-size: 0.95rem; }
}

/* ═══════════════════════════════════════════════════════════════════ */
/* RESPONSIVE                                                         */
/* ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
    .activity-shell.activity-two-pane,
    .activity-layout {
        grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    }
}
@media (max-width: 900px) {
    .activity-shell.activity-two-pane,
    .activity-layout {
        grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr);
    }
    .activity-filter-chips { display: none; }
}
@media (max-width: 700px) {
    .activity-shell.activity-two-pane,
    .activity-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .activity-side-column,
    .activity-right-pane {
        order: -1;
        /* No sticky on single-column layout */
        position: static;
    }
    .activity-side-card,
    .activity-hub-card {
        max-height: none;
    }
    .activity-side-list {
        min-height: 0;
    }

    /* Story card stacks vertically */
    .activity-card--story .activity-card-link {
        flex-direction: column;
        gap: 14px;
    }
    .story-card-thumb {
        width: 100%;
        min-height: 140px;
        max-height: 180px;
    }

    .activity-feed-list {
        padding: 10px 14px;
        gap: 8px;
    }
}
@media (max-width: 600px) {
    .activity-main-tabs {
        width: 100%;
        justify-content: space-between;
    }
    .activity-main-tab {
        flex: 1;
        justify-content: center;
    }
    .activity-filter-bar { flex-direction: column; align-items: stretch; gap: 8px; }
    .activity-sort-select { width: 100%; }

    .activity-card-link { padding: 16px; }
    .activity-card--channel .activity-card-link { padding: 0; }
    .cell-card-top  { padding: 14px 16px 10px; }
    .cell-card-desc { padding: 0 16px 10px; }
    .cell-card-stats, .cell-card-cta { padding: 9px 16px; }

    .story-card-thumb {
        min-height: 120px;
        max-height: 160px;
    }

    .post-card-header { gap: 6px; }
    .post-card-footer { gap: 12px; }

    .activity-date-header { padding: 10px 0 6px; }

    .skel-card--story { flex-direction: column; }
    .skel-card-thumb { width: 100%; height: 100px; }
}
@media (max-width: 420px) {
    .activity-feed-list { padding: 8px 10px; }
}
