/* ===== Topbar discover button ===== */
.topbar-discover{ display: none; }
.topbar-discover svg{ width: 20px; height: 20px; }

/* ===== Discover sliding panel (mobile) ===== */
.discover-panel{
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9998;
  display: none;
}
.discover-panel.open{ display: flex; }
.discover-overlay{
  position: absolute; inset: 0; background: rgba(0,0,0,0.35);
}
.discover-panel-inner{
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 300px; max-width: 85vw;
  background: var(--paper);
  display: flex; flex-direction: column;
  box-shadow: -4px 0 20px rgba(7,17,32,0.12);
  animation: slideInRight 0.2s ease;
}
@keyframes slideInRight{
  from{ transform: translateX(100%); }
  to{ transform: translateX(0); }
}
.discover-header{
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.discover-header h3{ font-size: 16px; }
.discover-close{
  background: none; border: none; font-size: 26px; cursor: pointer;
  color: var(--ink-dim); line-height: 1; padding: 2px;
}
.discover-close:hover{ color: var(--ink); }
.discover-body{
  flex: 1; overflow-y: auto; padding: 12px 18px;
}
.discover-section{ margin-bottom: 24px; }
.discover-section-title{ font-size: 13px; color: var(--ink-dim); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
.discover-user{ display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.discover-user-info{ flex: 1; display: flex; flex-direction: column; }
.discover-user-name{ font-size: 13.5px; font-weight: 600; color: var(--ink); }
.discover-user-meta{ font-size: 11.5px; color: var(--ink-dim); }
.discover-trend{ display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.discover-trend-count{ font-size: 11.5px; color: var(--ink-dim); }

/* ===== Sidebar (desktop only) ===== */
.sidebar-right{ position: sticky; top: 78px; max-height: calc(100vh - 78px); overflow-y: auto; display: flex; flex-direction: column; gap: 16px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.sidebar-right::-webkit-scrollbar{ width: 4px; }
.sidebar-right::-webkit-scrollbar-thumb{ background: var(--border); border-radius: 4px; }
.side-card{
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
}
.side-card-title{ font-size: 14px; margin-bottom: 14px; color: var(--ink); }
.suggested{ display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.suggested-info{ display: flex; flex-direction: column; flex: 1; }
.suggested-name{ font-size: 13.5px; font-weight: 600; color: var(--ink); }
.suggested-meta{ font-size: 11.5px; color: var(--ink-dim); }
.follow-btn{ padding: 6px 14px; font-size: 12.5px; }
.follow-btn.following{ background: var(--signal-soft); color: var(--ink); border-color: var(--signal-soft); }
.side-trends{ display: flex; flex-direction: column; gap: 14px; }
.side-trends .side-card-title{ margin-bottom: 4px; }
.trend-card{
  display: flex; flex-direction: column; gap: 4px;
  border-radius: 8px; padding: 12px;
  text-decoration: none; transition: background 0.15s;
  border: 1px solid var(--border);
}
.trend-card:hover{ background: var(--hover); }
.trend-post-card{ background: var(--paper); min-height: 100px; }
.trend-article-card{ background: var(--paper); min-height: 64px; }
.trend-card-author{ display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-dim); }
.avatar-sm{ width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #fff; font-weight: 600; flex-shrink: 0; }
.trend-post-body{ display: flex; gap: 10px; align-items: flex-start; }
.trend-card-content{ font-size: 13px; color: var(--ink); line-height: 1.4; margin: 0; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.trend-card-img{ width: 56px; height: 56px; border-radius: 6px; flex-shrink: 0; background-size: cover; background-position: center; background-color: var(--border); }
.trend-card-label{ font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--signal); font-weight: 600; }
.trend-card-title{ font-size: 13px; color: var(--ink); font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.trend-card-stat{ font-size: 11px; color: var(--ink-dim); }
.discover-trend{ padding: 0; }
.discover-trend .trend-card{ margin-bottom: 8px; }
.discover-section .trend-card{ margin-bottom: 10px; }
.discover-section .trend-card:last-child{ margin-bottom: 0; }

@media(max-width:980px){
  .topbar-discover{ display: flex; }
  .sidebar-desktop{ display: none; }
}
