.sigmo-hub-wrapper {
  --sigmo-border: #e5e7eb;
  --sigmo-muted: #6b7280;
  --sigmo-bg-soft: #f8fafc;
  --sigmo-primary: #2563eb;
  --sigmo-bull: #16a34a;
  --sigmo-bear: #dc2626;
  --sigmo-neutral: #6b7280;
  margin: 20px 0;
}

.sigmo-hub-title {
  margin: 0 0 12px;
}

.sigmo-hub-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 980px) {
  .sigmo-hub-grid {
    grid-template-columns: 0.9fr 1.1fr;
  }
}

.sigmo-hub-card {
  border: 1px solid var(--sigmo-border);
  border-radius: 12px;
  padding: 16px;
  background: #fff;
}

.sigmo-hub-card h3 {
  margin: 0 0 14px;
}

.sigmo-hub-error {
  color: #b91c1c;
  margin: 0;
}

.sigmo-hub-leaderboard {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sigmo-hub-leaderboard-podium-wrap {
  margin-bottom: 12px;
}

.sigmo-hub-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 4px 0;
}

.sigmo-hub-podium-col {
  flex: 1 1 0;
  text-align: center;
  min-width: 0;
}

.sigmo-hub-podium-user {
  margin-bottom: 6px;
}

.sigmo-hub-podium-avatar {
  width: 40px;
  height: 40px;
  margin: 0 auto 6px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #cbd5e1;
  overflow: hidden;
}

.sigmo-hub-podium-avatar.is-first {
  width: 48px;
  height: 48px;
  border-color: #f59e0b;
}

.sigmo-hub-podium-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sigmo-hub-podium-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff !important;
}

.sigmo-hub-podium-handle {
  font-size: 11px;
  color: var(--sigmo-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sigmo-hub-podium-points {
  font-size: 11px;
  font-weight: 600;
  color: #1d4ed8;
}

.sigmo-hub-podium-streak {
  font-size: 10px;
  color: #0f766e;
}

.sigmo-hub-podium-portfolio {
  font-size: 10px;
  color: #ffffff !important;
}

.sigmo-hub-podium-change {
  font-size: 10px;
  font-weight: 600;
}

.sigmo-hub-podium-change.is-positive {
  color: #15803d;
}

.sigmo-hub-podium-change.is-negative {
  color: #b91c1c;
}

.sigmo-hub-podium-block {
  border-radius: 10px 10px 0 0;
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sigmo-hub-podium-col-1 .sigmo-hub-podium-block {
  height: 68px;
  background: linear-gradient(180deg, #f59e0b, #d97706);
}

.sigmo-hub-podium-col-2 .sigmo-hub-podium-block {
  height: 54px;
  background: linear-gradient(180deg, #94a3b8, #64748b);
}

.sigmo-hub-podium-col-3 .sigmo-hub-podium-block {
  height: 44px;
  background: linear-gradient(180deg, #c08457, #92400e);
}

.sigmo-hub-leaderboard-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--sigmo-border);
  padding: 10px 0;
  gap: 12px;
}

.sigmo-hub-leaderboard-item:last-child {
  border-bottom: none;
}

.sigmo-hub-leaderboard-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sigmo-hub-row-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  color: #334155;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  position: relative;
  z-index: 1;
}

.sigmo-hub-row-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
}

.sigmo-hub-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.sigmo-hub-profile-link:hover .sigmo-hub-user {
  color: #1d4ed8;
}

.sigmo-hub-profile-link-podium {
  flex-direction: column;
  gap: 0;
}

.sigmo-hub-rank {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 16px;
  height: 16px;
  min-width: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
  box-shadow: 0 0 0 2px rgba(7, 23, 44, 0.92);
  line-height: 1;
  z-index: 20;
  pointer-events: none;
}

.sigmo-hub-user {
  font-weight: 600;
}

.sigmo-hub-handle {
  margin-left: 6px;
  color: var(--sigmo-muted);
  font-size: 12px;
}

.sigmo-hub-leaderboard-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 120px;
}

.sigmo-hub-metric {
  display: block !important;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  text-align: right;
}

.sigmo-hub-metric-points {
  font-weight: 700;
  color: #1d4ed8;
}

.sigmo-hub-metric-portfolio {
  font-weight: 700;
  color: #ffffff;
}

.sigmo-hub-metric-change {
  font-weight: 600;
}

.sigmo-hub-metric-change.is-positive {
  color: #22c55e;
}

.sigmo-hub-metric-change.is-negative {
  color: #991b1b;
}

.sigmo-hub-metric-change.is-neutral {
  color: #64748b;
}

.sigmo-hub-badge,
.sigmo-hub-sub-badge {
  font-size: 12px;
  border-radius: 999px;
  padding: 3px 10px;
}

.sigmo-hub-badge {
  background: #dbeafe;
  color: #1d4ed8;
}

.sigmo-hub-sub-badge {
  background: #f3f4f6;
  color: #374151;
}

.sigmo-hub-sub-badge.is-positive {
  background: #dcfce7;
  color: #166534;
}

.sigmo-hub-sub-badge.is-negative {
  background: #fee2e2;
  color: #991b1b;
}

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

.sigmo-hub-post {
  border: 1px solid var(--sigmo-border);
  border-radius: 10px;
  padding: 12px;
  background: var(--sigmo-bg-soft);
}

/* Force dark card styling inside WP builders/themes (Elementor overrides). */
.sigmo-hub-wrapper .sigmo-hub-post,
.sigmo-hub-wrapper .sigmo-hub-comment,
.sigmo-hub-wrapper .sigmo-hub-comments-container .sigmo-hub-comment {
  background: rgba(7, 23, 44, 0.88) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  color: #e2e8f0 !important;
}

/* Extra-specific profile-panel overrides for in-place profile view. */
.sigmo-hub-wrapper .sigmo-hub-profile-panel .sigmo-hub-post,
.sigmo-hub-wrapper .sigmo-hub-profile-panel article.sigmo-hub-post {
  background: rgba(7, 23, 44, 0.88) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  box-shadow: none !important;
}

.sigmo-hub-wrapper .sigmo-hub-profile-panel .sigmo-hub-post-header,
.sigmo-hub-wrapper .sigmo-hub-profile-panel .sigmo-hub-user,
.sigmo-hub-wrapper .sigmo-hub-profile-panel .sigmo-hub-handle,
.sigmo-hub-wrapper .sigmo-hub-profile-panel .sigmo-hub-time,
.sigmo-hub-wrapper .sigmo-hub-profile-panel .sigmo-hub-content,
.sigmo-hub-wrapper .sigmo-hub-profile-panel .sigmo-hub-stats {
  color: #e2e8f0 !important;
}

.sigmo-hub-wrapper .sigmo-hub-content,
.sigmo-hub-wrapper .sigmo-hub-comment-content {
  color: #e2e8f0 !important;
}

.sigmo-hub-post-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.sigmo-hub-post-user-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sigmo-hub-post-avatar {
  width: 24px;
  height: 24px;
  border-radius: 999px !important;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  object-fit: cover;
  overflow: hidden;
  display: block;
  flex-shrink: 0;
}

.sigmo-hub-profile-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 12px;
}

.sigmo-hub-profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  object-fit: cover;
}

.sigmo-hub-profile-back {
  font-size: 12px;
  color: #2563eb;
  text-decoration: none;
}

.sigmo-hub-profile-back-btn {
  border: 1px solid var(--sigmo-border);
  background: var(--sigmo-bg-soft);
  color: #2563eb;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.sigmo-hub-time {
  color: var(--sigmo-muted);
  font-size: 12px;
  white-space: nowrap;
}

.sigmo-hub-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.sigmo-hub-ticker {
  font-size: 12px;
  font-weight: 700;
  background: #e0f2fe;
  color: #075985;
  border-radius: 999px;
  padding: 2px 8px;
}

.sigmo-hub-sentiment {
  font-size: 12px;
  border-radius: 999px;
  padding: 2px 8px;
  color: #fff;
}

.sigmo-hub-sentiment-bullish {
  background: var(--sigmo-bull);
}

.sigmo-hub-sentiment-bearish {
  background: var(--sigmo-bear);
}

.sigmo-hub-sentiment-neutral {
  background: var(--sigmo-neutral);
}

.sigmo-hub-content {
  margin: 0 0 10px;
}

.sigmo-hub-stats {
  display: flex;
  gap: 12px;
  color: var(--sigmo-muted);
  font-size: 12px;
  margin-bottom: 8px;
  align-items: center;
}

.sigmo-hub-like-icon {
  color: #e11d48;
  margin-right: 2px;
}

.sigmo-hub-comments-trigger {
  border: none;
  background: transparent;
  color: #2563eb;
  padding: 0;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
}

.sigmo-hub-comments-trigger:hover {
  color: #1d4ed8;
  background: transparent;
  text-decoration: none;
}

.sigmo-hub-comments-trigger.is-open {
  color: #0f766e;
}

.sigmo-hub-responses {
  border-top: 1px dashed var(--sigmo-border);
  padding-top: 8px;
}

.sigmo-hub-response-preview {
  margin-bottom: 6px;
  font-size: 13px;
}

.sigmo-hub-load-comments {
  margin: 6px 0 8px !important;
}

.sigmo-hub-comments-container {
  display: grid;
  gap: 6px;
}

.sigmo-hub-comment {
  padding: 8px;
  border: 1px solid var(--sigmo-border);
  border-radius: 8px;
  background: #fff;
}

.sigmo-hub-comment-meta {
  font-size: 12px;
  color: var(--sigmo-muted);
  margin-bottom: 4px;
}

.sigmo-hub-comment-content {
  margin: 0;
  font-size: 13px;
}

.sigmo-hub-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.sigmo-hub-feed-header h3 {
  margin: 0;
}

.sigmo-hub-period-tabs {
  display: flex;
  gap: 0;
  padding: 0 16px 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sigmo-hub-period-btn {
  flex: 1 1 0;
  min-width: 0;
  border: 1px solid var(--sigmo-border, rgba(148, 163, 184, 0.35));
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
  text-align: center;
}

.sigmo-hub-period-btn:first-child {
  border-radius: 6px 0 0 6px;
}

.sigmo-hub-period-btn:last-child {
  border-radius: 0 6px 6px 0;
}

.sigmo-hub-period-btn + .sigmo-hub-period-btn {
  border-left: none;
}

.sigmo-hub-period-btn.is-active {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.sigmo-hub-period-btn.is-active + .sigmo-hub-period-btn {
  border-left: 1px solid #93c5fd;
}

.sigmo-hub-timeframe-label {
  display: inline-flex;
}

.sigmo-hub-timeframe-select {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.35) !important;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 4px 26px 4px 10px;
  font-size: 12px;
  line-height: 1.2;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 14px) calc(50% - 1px), calc(100% - 9px) calc(50% - 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.sigmo-hub-timeframe-select:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.6);
}

.sigmo-hub-sort-toggle {
  display: inline-flex;
  gap: 6px;
}

.sigmo-hub-sort-btn {
  border: 1px solid var(--sigmo-border);
  background: #f8fafc;
  color: #334155;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.sigmo-hub-sort-btn.is-active {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.sigmo-hub-loading-more,
.sigmo-hub-comments-loading {
  text-align: center;
  color: var(--sigmo-muted);
  font-size: 12px;
  padding: 8px 0 2px;
}

.sigmo-hub-comments-container {
  display: none;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.sigmo-hub-comments-container.is-open {
  display: grid;
}

.sigmo-hub-skeleton-card {
  position: relative;
  overflow: hidden;
}

.sigmo-hub-skeleton-line {
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  margin-bottom: 8px;
}

.sigmo-hub-skeleton-line:last-child {
  margin-bottom: 0;
}

.sigmo-hub-skeleton-line-title {
  width: 52%;
  height: 12px;
}

.sigmo-hub-skeleton-line-meta {
  width: 38%;
}

.sigmo-hub-skeleton-line-short {
  width: 64%;
}

.sigmo-hub-skeleton-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150px;
  width: 120px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: sigmo-hub-shimmer 1.2s infinite;
}

@keyframes sigmo-hub-shimmer {
  0% {
    left: -150px;
  }
  100% {
    left: 100%;
  }
}
