/* ─── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #120530;
  --bg-card:      #2a1155;
  --bg-card-h:    #341668;
  --border:       #3b1a6e;
  --border-h:     #5a30a0;
  --text:         #ede8fa;
  --text-2:       #9088b0;
  --text-3:       #524870;
  --accent:       #a855f7;
  --accent-bg:    rgba(168,85,247,.12);
  --accent-glow:  rgba(168,85,247,.28);
  --green:        #34d399;
  --web2:         #818cf8;
  --web2-bg:      rgba(129,140,248,.12);
  --web3:         #e879f9;
  --web3-bg:      rgba(232,121,249,.12);
  --crit:         #f87171;
  --crit-bg:      rgba(248,113,113,.12);

  --c-web2phish:  #f87171;
  --c-web3phish:  #c084fc;
  --c-nftdefi:    #fbbf24;
  --c-invest:     #fb923c;
  --c-social:     #38bdf8;
  --c-ransom:     #f472b6;
  --c-general:    #64748b;

  --radius:       10px;
  --radius-sm:    6px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ─── Header ───────────────────────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14,4,36,.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 8px rgba(56,189,248,.6));
}
.brand-name {
  font-size: 13px;
  font-family: 'Press Start 2P', monospace;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: .5px;
  text-shadow: 0 0 18px var(--accent-glow);
}
.brand-sub {
  font-size: 10px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'JetBrains Mono', monospace;
}

/* Stats */
.header-stats {
  display: flex;
  gap: 20px;
  margin-left: auto;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stat-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.2;
}
.stat--brand .stat-val { color: #2dd4bf; }
.stat-lbl {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-3);
}

/* Right side */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.last-updated {
  font-size: 11px;
  color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
}

/* Refresh button */
.btn-refresh {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn-refresh:hover { background: var(--accent-bg); box-shadow: 0 0 12px var(--accent-glow); }
.btn-refresh:disabled { opacity: .5; cursor: default; }
.refresh-icon { display: inline-block; }
.spinning { animation: spin .8s linear infinite; }

/* Ticker */
.ticker {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 24px;
  background: rgba(56,189,248,.04);
  border-top: 1px solid rgba(56,189,248,.08);
}
.ticker-dot {
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 2.5s ease infinite;
  box-shadow: 0 0 6px var(--green);
}
.ticker-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 1.5px;
  opacity: .6;
}

/* ─── Controls ─────────────────────────────────────────────────────────────── */
.controls {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 24px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Search */
.search-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.search-ico {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
}
.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 36px 10px 36px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.search-input::placeholder { color: var(--text-3); }
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  line-height: 1;
}
.search-clear:hover { color: var(--text); }

/* Filter tabs */
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.ftab {
  background: #3d1a70;
  border: 1px solid #5a30a0;
  color: var(--text-2);
  padding: 7px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all .2s;
  white-space: nowrap;
  font-family: inherit;
}
.ftab:hover { background: #4a2080; border-color: var(--border-h); color: var(--text); }
.ftab.active { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }
.ftab--web2.active { background: var(--web2-bg); border-color: var(--web2); color: var(--web2); }
.ftab--web3.active { background: var(--web3-bg); border-color: var(--web3); color: var(--web3); }
.ftab--crit.active { background: var(--crit-bg); border-color: var(--crit); color: var(--crit); }
.ftab--fav       { color: #d4a017; border-color: rgba(212,160,23,.4); }
.ftab--fav:hover { background: rgba(212,160,23,.1); border-color: #d4a017; color: #e8b420; }
.ftab--fav.active  { background: rgba(212,160,23,.15); border-color: #d4a017; color: #e8b420; }
.fbadge {
  background: rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
}

/* ─── Category Filter Chips ─────────────────────────────────────────────────── */
.cat-chips-row { padding: 0 var(--page-pad); margin-bottom: 8px; }
.cat-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cat-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all .2s;
  white-space: nowrap;
  font-family: inherit;
}
.cat-chip:hover { border-color: var(--border-h); color: var(--text); }
.cat-chip-count {
  background: rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
}

/* ─── Collapsible category sections ─────────────────────────────────────────── */
.cat-header { cursor: pointer; user-select: none; }
.cat-header:hover .cat-title { opacity: .85; }
.cat-chevron {
  font-size: 14px;
  color: var(--text-3);
  transition: transform .2s;
  flex-shrink: 0;
  margin-left: 6px;
}
.cat-chevron--collapsed { transform: rotate(-90deg); }
.cat-section.collapsed .article-grid { display: none; }
.cat-section.collapsed { margin-bottom: 16px; }

/* ─── Views ────────────────────────────────────────────────────────────────── */
.view-loading, .view-error, .view-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  gap: 14px;
  color: var(--text-2);
  text-align: center;
}
.spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
.loading-sub { font-size: 13px; color: var(--text-3); }
.err-icon, .empty-icon { font-size: 48px; }
.view-error h3, .view-empty h3 { color: var(--text); font-size: 18px; }
.view-error p, .view-empty p { font-size: 14px; }
.view-error button, .view-empty button {
  margin-top: 8px;
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}
.view-error button:hover, .view-empty button:hover { background: rgba(56,189,248,.2); }

/* ─── Social Media Section ─────────────────────────────────────────────────── */
.social-section {
  max-width: 1440px;
  margin: 28px auto 0;
  padding: 0 24px;
}

.social-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.social-live-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 2.5s ease infinite;
  box-shadow: 0 0 6px var(--green);
}
.social-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.social-plat-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 10px;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.social-plat-badge--x       { background: rgba(255,255,255,.07); color: #e7e9ea; border: 1px solid rgba(255,255,255,.18); }
.social-plat-badge--reddit  { background: rgba(255,99,0,.12);    color: #ff6314; border: 1px solid rgba(255,99,0,.25); }
.social-plat-badge--linkedin{ background: rgba(10,102,194,.12);  color: #5ba4d4; border: 1px solid rgba(10,102,194,.25); cursor: help; }
.social-meta {
  font-size: 11px;
  color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
}
.social-chevron {
  font-size: 16px;
  color: var(--text-3);
  transition: transform .25s ease;
  user-select: none;
  margin-right: 4px;
}
.social-section.collapsed .social-chevron { transform: rotate(-90deg); }
.social-grid-wrap {
  overflow: hidden;
  transition: max-height .35s ease, opacity .25s ease;
  max-height: 2000px;
  opacity: 1;
}
.social-section.collapsed .social-grid-wrap {
  max-height: 0;
  opacity: 0;
}

.social-tab-row {
  margin-left: auto;
  display: flex;
  gap: 6px;
}
.sftab {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 5px 12px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.sftab:hover { border-color: var(--border-h); color: var(--text); }
.sftab.active { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }
.sfbadge {
  background: rgba(255,255,255,.08);
  border-radius: 8px;
  padding: 0 6px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
}

/* Social card grid */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.social-loading {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-3);
  font-size: 13px;
  padding: 20px 0;
}

/* Social post card */
.social-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .2s, background .2s, transform .2s;
  animation: fadeUp .3s ease both;
  position: relative;
  overflow: hidden;
}
.social-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}
.social-card--x::before      { background: #e7e9ea; }
.social-card--reddit::before  { background: #ff6314; }
.social-card--linkedin::before{ background: #0a66c2; }
.social-card:hover {
  border-color: var(--border-h);
  background: var(--bg-card-h);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
}

.social-card-top {
  display: flex;
  align-items: center;
  gap: 7px;
}
.social-platform-ico { font-size: 13px; flex-shrink: 0; }
.social-handle {
  font-size: 12px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.social-handle--x       { color: #c8cdd3; }
.social-handle--reddit  { color: #ff7043; }
.social-handle--linkedin{ color: #5ba4d4; }
.social-desc-tag {
  font-size: 10px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.social-time {
  font-size: 10px;
  color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
  margin-left: auto;
}

.social-post-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.social-post-body {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.social-view-link {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: .85;
  transition: opacity .18s;
  align-self: flex-start;
}
.social-view-link:hover { opacity: 1; }

/* divider between social section and main content */
.social-divider {
  max-width: 1440px;
  margin: 24px auto 0;
  padding: 0 24px;
  border: none;
  border-top: 1px solid var(--border);
}

@media (max-width: 580px) {
  .social-grid { grid-template-columns: 1fr; }
  .social-tab-row { margin-left: 0; }
}

/* ─── Main Content ─────────────────────────────────────────────────────────── */
.content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 24px 40px;
}

/* ─── Category Section ─────────────────────────────────────────────────────── */
.cat-section { margin-bottom: 52px; }

/* ChainPatrol-priority section gets a featured treatment */
.cat-section--featured {
  background: linear-gradient(135deg, rgba(45,212,191,.04) 0%, transparent 60%);
  border: 1px solid rgba(45,212,191,.15);
  border-radius: 12px;
  padding: 20px 20px 24px;
  margin-bottom: 52px;
}
.cat-section--featured .cat-header {
  border-bottom-color: rgba(45,212,191,.25);
}
.cat-section--featured .cat-title { color: #2dd4bf; }
.cat-section--featured .cat-count {
  border-color: rgba(45,212,191,.3);
  color: #2dd4bf;
}
.chainpatrol-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #2dd4bf;
  background: rgba(45,212,191,.12);
  border: 1px solid rgba(45,212,191,.3);
  padding: 2px 9px;
  border-radius: 10px;
  font-family: 'JetBrains Mono', monospace;
}

.cat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}
.cat-header:hover .cat-chevron { color: var(--text-2); }
.cat-section.collapsed .cat-header {
  margin-bottom: 0;
  border-bottom-color: transparent;
}
.cat-section--featured .cat-header:hover .cat-title { color: #2dd4bf; }
.cat-bar {
  width: 4px;
  height: 24px;
  border-radius: 2px;
  flex-shrink: 0;
}
.cat-icon { font-size: 20px; }
.cat-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}
.cat-count {
  font-size: 11px;
  color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 10px;
}
.cat-desc {
  font-size: 12px;
  color: var(--text-3);
  margin-left: auto;
  max-width: 300px;
  text-align: right;
}
.cat-refresh-meta {
  font-size: 11px;
  color: rgba(45,212,191,.6);
  white-space: nowrap;
  padding: 2px 8px;
  border: 1px solid rgba(45,212,191,.2);
  border-radius: 20px;
  background: rgba(45,212,191,.06);
}

/* ─── Article Grid ─────────────────────────────────────────────────────────── */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

/* ─── Article Card ─────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .22s, background .22s, transform .22s, box-shadow .22s;
  animation: fadeUp .3s ease both;
}
.card:hover {
  border-color: var(--border-h);
  background: var(--bg-card-h);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,.45);
}
.card-top-bar { height: 3px; flex-shrink: 0; }

.card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

/* Card meta row */
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.card-meta-read { margin-left: auto; }
.source-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.source-badge.web2  { background: var(--web2-bg); color: #60a5fa; border: 1px solid rgba(59,130,246,.3); }
.source-badge.web3  { background: var(--web3-bg); color: #c4b5fd; border: 1px solid rgba(167,139,250,.3); }
.source-badge.video { background: rgba(129,140,248,.12); color: #818cf8; border: 1px solid rgba(129,140,248,.3); }
.severity-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-family: 'JetBrains Mono', monospace;
}
.sev-critical { background: rgba(248,113,113,.15); color: #f87171; border: 1px solid rgba(248,113,113,.3); }
.sev-high     { background: rgba(251,146,60,.15);  color: #fb923c; border: 1px solid rgba(251,146,60,.3); }
.sev-medium   { background: rgba(100,116,139,.15); color: #94a3b8; border: 1px solid rgba(100,116,139,.3); }
.card-date {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}

/* Card title */
.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-title a {
  color: inherit;
  text-decoration: none;
  transition: color .18s;
}
.card-title a:hover { color: var(--accent); }

/* Card description (fallback) */
.card-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Article summary bullets */
.card-summary {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.card-summary li {
  font-size: 12.5px;
  color: var(--text-2);
  padding-left: 16px;
  position: relative;
  line-height: 1.45;
}
.card-summary li::before {
  content: '▸';
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--accent);
  opacity: 0.75;
  font-size: 11px;
}

/* Card footer */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}
.cat-tags { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; min-width: 0; }
.cat-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
  white-space: nowrap;
}
.read-more {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid rgba(56,189,248,.3);
  border-radius: 4px;
  transition: all .18s;
  white-space: nowrap;
}
.read-more:hover { background: var(--accent-bg); border-color: var(--accent); }

/* ── Video card — thumbnail + watch button ───────────────────────────────── */
.card--video { overflow: hidden; }
.card-thumbnail-wrap {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
  flex-shrink: 0;
}
.card-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s;
}
.card-thumbnail-wrap:hover .card-thumbnail { transform: scale(1.03); }
.card-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
  background: rgba(0,0,0,.3);
  opacity: 0;
  transition: opacity .18s;
}
.card-thumbnail-wrap:hover .card-play-overlay { opacity: 1; }
.watch-btn {
  flex-shrink: 0;
  font-size: 12px;
  color: #818cf8;
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid rgba(129,140,248,.3);
  border-radius: 4px;
  transition: all .18s;
  white-space: nowrap;
}
.watch-btn:hover { background: rgba(129,140,248,.12); border-color: #818cf8; }

/* Not Useful button */
.not-useful-btn {
  flex-shrink: 0;
  font-size: 11px;
  font-family: inherit;
  color: #c4956a;
  background: #2e1408;
  border: 1px solid #5c2e10;
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
}
.not-useful-btn:hover {
  background: #3d1c0a;
  border-color: #8b4513;
  color: #d4a880;
}

/* Not Useful in post panels */
.post-card-actions .not-useful-btn,
.linkedin-meta .not-useful-btn {
  margin-left: auto;
}

/* Favorite lock button */
.fav-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 4px 5px;
  border-radius: var(--radius-sm);
  color: var(--text-3);
  transition: color .18s, transform .15s;
  margin-left: 2px;
}
.fav-btn:hover { color: #f59e0b; transform: scale(1.15); }
.fav-btn.active { color: #f59e0b; filter: drop-shadow(0 0 6px rgba(245,158,11,.55)); }

/* ─── Sidebar ───────────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 200px;
  height: 100vh;
  background: #3d1a52;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow: hidden;
}
.sidebar-top {
  padding: 18px 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  background: #6b3090;
}
.sidebar-brand-icon { font-size: 18px; }
.sidebar-brand-name { font-size: 15px; font-weight: 600; color: var(--text-2); letter-spacing: .3px; }
.sidebar-nav { padding: 14px 10px; }
.sidebar-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text-2);
  cursor: pointer;
  font-size: 12.5px;
  font-family: inherit;
  text-align: left;
  line-height: 1.35;
  transition: all .2s;
}
.sidebar-nav-item:hover {
  background: var(--accent-bg);
  border-color: var(--accent);
  color: var(--accent);
}
.sidebar-nav-icon { font-size: 18px; flex-shrink: 0; }
.sidebar-nav-label { font-weight: 500; }
/* Trending button gets an orange accent */
.sidebar-nav-item--trending:hover {
  background: rgba(251,146,60,.12);
  border-color: #fb923c;
  color: #fb923c;
}
/* Format Posts button — sky blue accent */
.sidebar-nav-item--formats:hover {
  background: rgba(56,189,248,.12);
  border-color: #38bdf8;
  color: #38bdf8;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 6px; }

/* Sidebar collapse */
.sidebar { transition: transform .3s ease; }
body.sidebar-collapsed .sidebar { transform: translateX(-200px); }

/* Toggle tab — stays against right edge of sidebar, slides to left:0 when closed */
.sidebar-toggle {
  position: fixed;
  top: 18px;
  left: 200px;
  width: 20px;
  height: 44px;
  background: #0d0326;
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 6px 6px 0;
  z-index: 201;
  cursor: pointer;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: left .3s ease, color .15s;
}
.sidebar-toggle:hover { color: var(--accent); border-color: var(--border-h); }
.sidebar-toggle-icon { font-size: 9px; transition: transform .3s ease; line-height: 1; }
body.sidebar-collapsed .sidebar-toggle      { left: 0; }
body.sidebar-collapsed .sidebar-toggle-icon { transform: rotate(180deg); }

/* Shift app content to the right of the sidebar */
#app { margin-left: 200px; transition: margin-left .3s ease; }
body.sidebar-collapsed #app { margin-left: 0; }

/* Post link box (shown below each post draft, not counted in char limit) */
.post-link-box {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px 9px;
  border-top: 1px dashed;
  overflow: hidden;
}
.post-link-box--twitter  { border-color: #222; background: #000; }
.post-link-box--linkedin { border-color: #e2e0da; background: #f7f6f3; }
.post-link-icon { font-size: 10px; flex-shrink: 0; }
.post-link-href {
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.post-link-box--twitter  .post-link-href { color: #1d9bf0; }
.post-link-box--linkedin .post-link-href { color: #0a66c2; }
.post-link-href:hover { text-decoration: underline; }
.post-link-label { font-size: 9px; flex-shrink: 0; }
.post-link-box--twitter  .post-link-label { color: #444; }
.post-link-box--linkedin .post-link-label { color: #999; }

/* ─── Posts Overlay ─────────────────────────────────────────────────────────── */
.posts-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: stretch;
}
.posts-backdrop {
  flex: 1;
  background: rgba(8,6,19,.7);
  backdrop-filter: blur(4px);
  cursor: pointer;
  min-width: 0;
}
.posts-panel {
  width: min(1160px, 100vw);
  max-width: 100vw;
  height: 100vh;
  background: var(--bg);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: -12px 0 48px rgba(0,0,0,.6);
  flex-shrink: 0;
}
/* Panel header */
.posts-panel-hdr {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  background: var(--bg-card);
  flex-wrap: wrap;
}
.posts-panel-hdr-left  { display: flex; align-items: center; gap: 12px; }
.posts-panel-title     { font-size: 17px; font-weight: 700; color: var(--text); }
.posts-panel-badge {
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid rgba(168,85,247,.3);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.posts-panel-hdr-right { display: flex; align-items: center; gap: 8px; }
.posts-regen-btn {
  background: var(--accent-bg);
  border: 1px solid rgba(168,85,247,.4);
  color: var(--accent);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  transition: background .18s;
  white-space: nowrap;
}
.posts-regen-btn:hover { background: rgba(168,85,247,.22); }
/* Trending panel variants — orange fire theme */
.posts-panel-hdr--trending { background: linear-gradient(135deg, rgba(251,146,60,.08) 0%, transparent 100%); border-bottom-color: rgba(251,146,60,.25); }
.posts-panel-badge--trending { background: rgba(251,146,60,.15); color: #fb923c; border-color: rgba(251,146,60,.35); }
.posts-regen-btn--trending { background: rgba(251,146,60,.12); border-color: rgba(251,146,60,.4); color: #fb923c; }
.posts-regen-btn--trending:hover { background: rgba(251,146,60,.22); }
.posts-close-btn {
  background: rgba(248,113,113,.08);
  border: 1px solid rgba(248,113,113,.3);
  color: #f87171;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  transition: background .18s;
  white-space: nowrap;
}
.posts-close-btn:hover { background: rgba(248,113,113,.18); }

/* Panel scrollable body */
.posts-panel-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }

/* Section wrappers */
.posts-section { display: flex; flex-direction: column; }

/* Section headers — sticky */
.posts-section-hdr {
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 10;
}
.posts-section-hdr--twitter { background: #000000; border-bottom: 1px solid #252525; }
.posts-section-hdr--linkedin { background: #f3f2ef; border-bottom: 1px solid #d6d5cf; }

.posts-section-platform { font-size: 15px; font-weight: 700; }
.posts-section-platform--linkedin { color: #1a1a1a; }
.posts-section-hdr--twitter .posts-section-platform { color: #e7e9ea; }

.posts-section-count {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
}
.posts-section-count--twitter { background: #1a1a1a; color: #666; border: 1px solid #2e2e2e; }
.posts-section-count--linkedin { background: #e4e3df; color: #666; border: 1px solid #c8c6c0; }

.posts-section-note { font-size: 10.5px; margin-left: auto; }
.posts-section-note--twitter  { color: #444; }
.posts-section-note--linkedin { color: #999; }

/* Section grids */
.posts-grid {
  padding: 16px 24px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
  align-content: start;
}
.posts-grid--twitter  { background: #0a0a0a; flex: 1; }
.posts-grid--linkedin { background: #f3f2ef; flex: 1; }

.posts-loading { color: var(--text-3); font-size: 13px; padding: 20px; text-align: center; grid-column: 1/-1; }
.posts-empty   { font-size: 13px; padding: 24px; text-align: center; grid-column: 1/-1; }
.posts-grid--twitter  .posts-empty { color: #444; }
.posts-grid--linkedin .posts-empty { color: #aaa; }

/* ── Twitter post cards ── */
.post-card--twitter {
  background: #111;
  border: 1px solid #222;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .18s, opacity .2s, transform .2s;
}
.post-card--twitter:hover { border-color: #383838; }

.post-card-header {
  padding: 10px 12px 9px;
  border-bottom: 1px solid #1c1c1c;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.post-card-source { font-size: 10.5px; color: #555; white-space: nowrap; flex-shrink: 0; padding-top: 1px; }
.post-card-title  {
  font-size: 11.5px;
  color: #888;
  text-decoration: none;
  flex: 1; min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}
.post-card-title:hover { color: #1d9bf0; }
.post-delete-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 4px;
  transition: color .15s, background .15s;
  line-height: 1;
}
.post-delete-btn:hover { color: #f87171; background: rgba(248,113,113,.14); }

.thread-badge { font-size: 10px; color: #1d9bf0; padding: 4px 14px 3px; background: rgba(29,155,240,.08); border-bottom: 1px solid #1a2a35; }

.tweet-bubbles { padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 6px; }
.tweet-bubble {
  background: #000;
  border: 1px solid #1e1e1e;
  border-radius: 10px;
  padding: 10px 12px 8px;
  position: relative;
}
.tweet-bubble--reply { margin-left: 18px; }
.thread-connector    { width: 2px; height: 8px; background: #282828; margin-left: 20px; }
.thread-label        { position: absolute; top: 6px; right: 8px; font-size: 9px; color: #444; font-family: 'JetBrains Mono', monospace; }

.tweet-text {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #e7e9ea;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}
.tweet-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid #181818;
}
.tweet-chars { font-size: 10.5px; color: #3d3d3d; font-family: 'JetBrains Mono', monospace; }
.tweet-chars--over { color: #f87171; }

.post-card-actions { padding: 8px 12px 12px; }
.post-copy-btn {
  background: none;
  border: 1px solid #2a2a2a;
  color: #666;
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 11.5px;
  font-family: inherit;
  width: 100%;
  transition: all .15s;
}
.post-copy-btn:hover { border-color: #1d9bf0; color: #1d9bf0; background: rgba(29,155,240,.08); }

/* ── LinkedIn post cards ── */
.post-card--linkedin {
  background: #fff;
  border: 1px solid #dddbd5;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .18s, box-shadow .18s, opacity .2s, transform .2s;
}
.post-card--linkedin:hover { border-color: #0a66c2; box-shadow: 0 2px 10px rgba(10,102,194,.12); }

.post-card-header--linkedin { background: #fff; border-bottom: 1px solid #eae9e4; }
.post-card-source--linkedin { color: #aaa; }
.post-card-title--linkedin  { color: #444; }
.post-card-title--linkedin:hover { color: #0a66c2; }
.post-delete-btn--linkedin  { color: #ccc; }
.post-delete-btn--linkedin:hover { color: #cc0000; background: rgba(204,0,0,.08); }

.linkedin-text {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 13.5px;
  color: rgba(0,0,0,.88);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  padding: 14px 14px 10px;
  flex: 1;
}
.linkedin-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 12px;
  border-top: 1px solid #eae9e4;
  gap: 10px;
}
.linkedin-chars     { font-size: 10.5px; color: #aaa; font-family: 'JetBrains Mono', monospace; }
.linkedin-chars--over { color: #cc0000; }
.post-copy-btn--linkedin {
  background: none;
  border: 1px solid #d0cec8;
  color: #666;
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 11.5px;
  font-family: inherit;
  transition: all .15s;
}
.post-copy-btn--linkedin:hover { border-color: #0a66c2; color: #0a66c2; background: rgba(10,102,194,.07); }

/* ─── Footer ───────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.9;
}
.footer-sources {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  opacity: .6;
  margin-top: 6px;
}

/* ─── Animations ───────────────────────────────────────────────────────────── */
@keyframes spin  { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:.4; transform:scale(.75); } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; padding: 12px 16px; gap: 12px; }
  .header-right  { order: 3; width: 100%; justify-content: space-between; }
  .header-stats  { gap: 14px; }
  .cat-desc      { display: none; }
  .controls      { padding: 16px 16px 0; }
  .content       { padding: 20px 16px 32px; }
  .posts-section-note { display: none; }
  .posts-grid { grid-template-columns: 1fr; padding: 12px 16px 20px; }
}
@media (max-width: 768px) {
  .sidebar { width: 56px; }
  .sidebar-brand-name { display: none; }
  .sidebar-nav-label  { display: none; }
  .sidebar-nav-item   { justify-content: center; padding: 10px; }
  #app { margin-left: 56px; }
  .sidebar-toggle { left: 56px; }
  body.sidebar-collapsed .sidebar-toggle { left: 0; }
}
@media (max-width: 580px) {
  .article-grid  { grid-template-columns: 1fr; }
  .stat--hidden-sm { display: none; }
  .last-updated  { display: none; }
  .ticker-text   { display: none; }
  .sidebar { display: none; }
  #app { margin-left: 0; }
  .posts-panel { width: 100vw; }
  .posts-backdrop { display: none; }
}

/* ─── Draft Posts Feature ───────────────────────────────────────────────────── */

/* Sidebar draft button — teal accent */
.sidebar-nav-item--draft:hover {
  background: rgba(45,212,191,.12);
  border-color: #2dd4bf;
  color: #2dd4bf;
}

/* Badge on sidebar draft button */
.sidebar-draft-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2dd4bf;
  color: #080613;
  font-size: 9px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  padding: 1px 5px;
  border-radius: 8px;
  min-width: 16px;
  line-height: 1.4;
  margin-left: 4px;
  vertical-align: middle;
}

/* Draft button on article cards */
.draft-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 4px 5px;
  border-radius: var(--radius-sm);
  color: var(--text-3);
  transition: color .18s, transform .15s;
  margin-left: 2px;
  opacity: .6;
}
.draft-btn:hover { color: #2dd4bf; transform: scale(1.15); opacity: 1; }
.draft-btn.active { color: #2dd4bf; opacity: 1; filter: drop-shadow(0 0 5px rgba(45,212,191,.5)); }

/* Draft panel header — teal theme */
.posts-panel--draft {}
.posts-panel-hdr--draft {
  background: linear-gradient(135deg, rgba(45,212,191,.07) 0%, transparent 100%);
  border-bottom-color: rgba(45,212,191,.25);
}
.posts-panel-badge--draft {
  background: rgba(45,212,191,.12);
  color: #2dd4bf;
  border: 1px solid rgba(45,212,191,.3);
}

/* Draft empty state */
.draft-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  gap: 14px;
  text-align: center;
  flex: 1;
}
.draft-empty-icon { font-size: 52px; }
.draft-empty h3   { font-size: 18px; color: var(--text); }
.draft-empty p    { font-size: 14px; color: var(--text-2); max-width: 340px; line-height: 1.6; }
.draft-empty strong { color: #2dd4bf; }

/* Draft accordion container */
.draft-accordion {
  padding: 16px 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Draft item (one per queued article) */
.draft-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
  transition: border-color .18s;
}
.draft-item:hover { border-color: rgba(45,212,191,.2); }

/* Accordion header row */
.draft-item-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  transition: background .18s;
}
.draft-item-hdr:hover { background: rgba(45,212,191,.04); }

.draft-item-bar {
  width: 4px;
  height: 34px;
  border-radius: 2px;
  flex-shrink: 0;
}
.draft-item-cat-icon { font-size: 18px; flex-shrink: 0; }
.draft-item-info     { flex: 1; min-width: 0; }
.draft-item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  transition: color .15s;
}
.draft-item-title:hover { color: #2dd4bf; }
.draft-item-meta  { display: flex; gap: 10px; margin-top: 2px; }
.draft-item-source {
  font-size: 11px;
  color: var(--text-3);
}
.draft-item-date {
  font-size: 11px;
  color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
}
.draft-item-remove {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 4px;
  transition: color .15s, background .15s;
  line-height: 1;
}
.draft-item-remove:hover { color: #f87171; background: rgba(248,113,113,.1); }
.draft-item-chevron {
  font-size: 12px;
  color: var(--text-3);
  flex-shrink: 0;
}

/* Expanded body (Twitter + LinkedIn sections stacked) */
.draft-item-body { border-top: 1px solid var(--border); }

/* Section wrapper (Twitter / LinkedIn) */
.draft-section { display: flex; flex-direction: column; }

/* Section headers — sticky within the accordion item */
.draft-section-hdr {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 4;
}
.draft-section-hdr--tw {
  background: #000;
  color: #e7e9ea;
  border-bottom: 1px solid #1e1e1e;
}
.draft-section-hdr--li {
  background: #f3f2ef;
  color: #1a1a1a;
  border-top: 1px solid #d6d5cf;
  border-bottom: 1px solid #d6d5cf;
}
.draft-section-note {
  font-size: 10px;
  font-weight: 400;
  color: #555;
}
.draft-section-note--li { color: #999; }

/* Section body backgrounds */
.draft-section-body--tw { background: #0a0a0a; padding-bottom: 14px; }
.draft-section-body--li { background: #f3f2ef; padding-bottom: 14px; }

/* Tone chip row */
.draft-tone-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px 8px;
}
.draft-tone-chip {
  background: none;
  padding: 5px 13px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 11.5px;
  font-family: inherit;
  transition: all .15s;
  white-space: nowrap;
  font-weight: 500;
}
/* Twitter chips */
.draft-tone-chip--tw             { border: 1px solid #2a2a2a; color: #666; }
.draft-tone-chip--tw:hover       { border-color: #555; color: #e7e9ea; background: #1a1a1a; }
.draft-tone-chip--tw.selected    { border-color: #1d9bf0; color: #1d9bf0; background: rgba(29,155,240,.1); }
/* LinkedIn chips */
.draft-tone-chip--li             { border: 1px solid #d0cec8; color: #666; }
.draft-tone-chip--li:hover       { border-color: #0a66c2; color: #333; background: rgba(10,102,194,.05); }
.draft-tone-chip--li.selected    { border-color: #0a66c2; color: #0a66c2; background: rgba(10,102,194,.08); }

/* Post preview area */
.draft-tone-preview    { padding: 0 14px; }
.draft-tone-preview--li {}

.draft-tone-text {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #e7e9ea;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  background: #000;
  border: 1px solid #1e1e1e;
  border-radius: 10px;
  padding: 12px 14px;
}
.draft-tone-text--li {
  color: rgba(0,0,0,.88);
  background: #fff;
  border-color: #e0deda;
  font-size: 13.5px;
  line-height: 1.65;
}

.draft-tone-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  margin-bottom: 2px;
}
.draft-tone-meta--li {}

.draft-tone-chars {
  font-size: 10.5px;
  color: #3d3d3d;
  font-family: 'JetBrains Mono', monospace;
}
.draft-tone-chars.over   { color: #f87171; }
.draft-tone-chars--li    { color: #aaa; }
.draft-tone-chars--li.over { color: #cc0000; }

.draft-tone-copy {
  background: none;
  border: 1px solid #2a2a2a;
  color: #666;
  padding: 5px 14px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 11.5px;
  font-family: inherit;
  transition: all .15s;
}
.draft-tone-copy:hover          { border-color: #1d9bf0; color: #1d9bf0; background: rgba(29,155,240,.08); }
.draft-tone-copy--li            { border-color: #d0cec8; color: #666; }
.draft-tone-copy--li:hover      { border-color: #0a66c2; color: #0a66c2; background: rgba(10,102,194,.07); }

/* Responsive adjustments */
@media (max-width: 900px) {
  .draft-accordion { padding: 12px 16px 40px; }
}
@media (max-width: 580px) {
  .draft-accordion { padding: 10px 10px 40px; }
  .draft-tone-chips { padding: 8px 10px 6px; }
  .draft-tone-preview { padding: 0 10px; }
}

/* ─── Article Bin & Post Bin Feature ────────────────────────────────────────── */

/* Sidebar divider between nav groups */
.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 10px;
  opacity: .6;
}

/* Sidebar bin buttons — red accent on hover */
.sidebar-nav-item--bin:hover {
  background: rgba(248,113,113,.12);
  border-color: #f87171;
  color: #f87171;
}

/* Bin count badge (red pill) */
.sidebar-bin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dc2626;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  padding: 1px 5px;
  border-radius: 8px;
  min-width: 16px;
  line-height: 1.4;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── Card delete button (✕, shows on hover) ────────────────────────────────── */
.card { position: relative; }
.card-delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  background: rgba(8,6,19,.9);
  border: 1px solid rgba(248,113,113,.25);
  color: rgba(248,113,113,.5);
  border-radius: 50%;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s, color .15s, border-color .15s, background .15s;
  z-index: 5;
  padding: 0;
}
.card:hover .card-delete-btn { opacity: 1; }
.card-delete-btn:hover {
  background: rgba(220,38,38,.2);
  border-color: #f87171;
  color: #fff;
  opacity: 1;
}

/* ── Bin panel — shared ─────────────────────────────────────────────────────── */
.posts-panel--bin {}

/* Panel header — red/rose theme */
.posts-panel-hdr--bin {
  background: linear-gradient(135deg, rgba(248,113,113,.06) 0%, transparent 100%);
  border-bottom-color: rgba(248,113,113,.2);
}
.posts-panel-badge--bin {
  background: rgba(248,113,113,.12);
  color: #f87171;
  border: 1px solid rgba(248,113,113,.3);
}

/* Empty Bin header button */
.bin-empty-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(248,113,113,.08);
  border: 1px solid rgba(248,113,113,.3);
  color: #f87171;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  transition: background .18s;
  white-space: nowrap;
}
.bin-empty-btn:hover { background: rgba(248,113,113,.2); }

/* Bin empty state */
.bin-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  gap: 14px;
  text-align: center;
  flex: 1;
}
.bin-empty-icon { font-size: 52px; opacity: .5; }
.bin-empty-state h3   { font-size: 18px; color: var(--text); }
.bin-empty-state p    { font-size: 14px; color: var(--text-2); max-width: 380px; line-height: 1.65; }
.bin-empty-state strong { color: #f87171; }
.bin-empty-sub { font-size: 12px !important; color: var(--text-3) !important; margin-top: -4px; }

/* Bin list */
.bin-list {
  padding: 16px 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Bin row */
.bin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .18s;
  animation: fadeUp .2s ease both;
}
.bin-row:hover { border-color: rgba(248,113,113,.18); }

.bin-row-bar {
  width: 3px;
  height: 30px;
  border-radius: 2px;
  flex-shrink: 0;
}
.bin-row-icon {
  font-size: 15px;
  flex-shrink: 0;
}
.bin-row-platform {
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
  color: #c8cdd3;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}
.bin-row-platform--li { color: #5ba4d4; }

.bin-row-info { flex: 1; min-width: 0; }
.bin-row-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  transition: color .15s;
}
a.bin-row-title:hover { color: var(--accent); }

.bin-row-meta {
  display: flex;
  gap: 10px;
  margin-top: 3px;
  flex-wrap: wrap;
  align-items: center;
}
.bin-row-source {
  font-size: 10.5px;
  color: var(--text-3);
}
.bin-row-time {
  font-size: 10.5px;
  color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
}
.bin-row-expiry {
  font-size: 10px;
  color: rgba(248,113,113,.45);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}

/* Restore button — teal */
.bin-restore-btn {
  flex-shrink: 0;
  background: rgba(45,212,191,.08);
  border: 1px solid rgba(45,212,191,.3);
  color: #2dd4bf;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 11.5px;
  font-family: inherit;
  white-space: nowrap;
  transition: all .15s;
}
.bin-restore-btn:hover { background: rgba(45,212,191,.2); border-color: #2dd4bf; }

/* Permanent delete button — white ✕ on red circle */
.bin-perm-del-btn {
  flex-shrink: 0;
  background: #dc2626;
  border: none;
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, transform .1s;
  padding: 0;
}
.bin-perm-del-btn:hover { background: #b91c1c; transform: scale(1.1); }

/* Responsive */
@media (max-width: 900px) {
  .bin-list { padding: 12px 16px 40px; }
}
@media (max-width: 580px) {
  .bin-list { padding: 10px 10px 40px; }
  .bin-row  { flex-wrap: wrap; gap: 8px; }
  .bin-row-expiry { display: none; }
}

/* ─── Today's Threat Spotlight ──────────────────────────────────────────────── */
.spotlight-section {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 4px;
}

.spotlight-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 12px 16px;
  background: rgba(248,113,113,.06);
  border: 1px solid rgba(248,113,113,.22);
  border-radius: var(--radius);
}

.spotlight-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f87171;
  box-shadow: 0 0 8px #f87171;
  flex-shrink: 0;
  animation: spotlight-pulse 1.6s ease-in-out infinite;
}

@keyframes spotlight-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px #f87171; }
  50%       { opacity: .4; box-shadow: 0 0 2px #f87171; }
}

.spotlight-title {
  font-size: 14px;
  font-weight: 700;
  color: #f87171;
  letter-spacing: -.2px;
}

.spotlight-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #f87171;
  background: rgba(248,113,113,.14);
  border: 1px solid rgba(248,113,113,.3);
  border-radius: 4px;
  padding: 2px 7px;
  font-family: 'JetBrains Mono', monospace;
}

.spotlight-sub {
  font-size: 11px;
  color: var(--text-3);
  margin-left: auto;
}

.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
}

.spotlight-card {
  background: var(--bg-card);
  border: 1px solid rgba(248,113,113,.18);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #f87171, transparent);
}

.spotlight-card.sev--critical {
  border-color: rgba(248,113,113,.32);
  box-shadow: 0 0 18px rgba(248,113,113,.07);
}
.spotlight-card.sev--critical:hover {
  border-color: rgba(248,113,113,.55);
  box-shadow: 0 0 28px rgba(248,113,113,.14);
}

.spotlight-card.sev--high::before {
  background: linear-gradient(90deg, #fb923c, transparent);
}
.spotlight-card.sev--high {
  border-color: rgba(251,146,60,.28);
}
.spotlight-card.sev--high:hover {
  border-color: rgba(251,146,60,.52);
  box-shadow: 0 0 20px rgba(251,146,60,.1);
}

.spotlight-card.sev--medium::before {
  background: linear-gradient(90deg, #fbbf24, transparent);
}
.spotlight-card.sev--medium {
  border-color: rgba(251,191,36,.22);
}

.spotlight-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.spotlight-sev-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}
.spotlight-sev-badge.sev--critical { color: #f87171; background: rgba(248,113,113,.14); border: 1px solid rgba(248,113,113,.28); }
.spotlight-sev-badge.sev--high     { color: #fb923c; background: rgba(251,146,60,.14);  border: 1px solid rgba(251,146,60,.28);  }
.spotlight-sev-badge.sev--medium   { color: #fbbf24; background: rgba(251,191,36,.12);  border: 1px solid rgba(251,191,36,.24);  }

.spotlight-cat  { font-size: 10px; color: var(--text-2); }
.spotlight-date { font-size: 10px; color: var(--text-3); margin-left: auto; font-family: 'JetBrains Mono', monospace; }

.spotlight-title-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  line-height: 1.45;
  display: block;
  transition: color .15s;
}
.spotlight-title-link:hover { color: #f87171; }

.spotlight-desc {
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.5;
}

.spotlight-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(248,113,113,.1);
}

.spotlight-source { font-size: 10px; color: var(--text-3); }

.spotlight-draft-btn {
  font-size: 11px;
  padding: 3px 9px;
  background: rgba(248,113,113,.1);
  border: 1px solid rgba(248,113,113,.24);
  border-radius: var(--radius-sm);
  color: #f87171;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.spotlight-draft-btn:hover,
.spotlight-draft-btn.active {
  background: rgba(248,113,113,.2);
  border-color: rgba(248,113,113,.5);
}

/* Sidebar spotlight button */
.sidebar-nav-item--spotlight .sidebar-nav-icon {
  filter: drop-shadow(0 0 5px rgba(248,113,113,.7));
}

@media (max-width: 700px) {
  .spotlight-grid { grid-template-columns: 1fr; }
  .spotlight-sub  { display: none; }
}

/* ─── Format Posts Panel ─────────────────────────────────────────────────── */

/* Panel header — sky blue theme */
.posts-panel-hdr--formats {
  background: linear-gradient(135deg, rgba(56,189,248,.07) 0%, transparent 100%);
  border-bottom-color: rgba(56,189,248,.2);
}
.posts-panel-badge--formats {
  background: rgba(56,189,248,.12);
  color: #38bdf8;
  border-color: rgba(56,189,248,.3);
}

/* Category section headers */
.posts-section-hdr--formats {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.posts-section-hdr--formats .posts-section-platform {
  color: var(--text);
  font-size: 14px;
}
.posts-section-count--formats {
  background: rgba(56,189,248,.1);
  color: #38bdf8;
  border: 1px solid rgba(56,189,248,.25);
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
}
.posts-section-desc--formats {
  font-size: 10.5px;
  color: var(--text-3);
  margin-left: auto;
}

/* Cards grid */
.posts-grid--formats {
  background: var(--bg);
  flex: 1;
  padding: 16px 24px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
  align-content: start;
}

/* Format card */
.format-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .18s, opacity .2s, transform .2s;
}
.format-card:hover { border-color: var(--border-h); }

/* Card header */
.format-card-hdr {
  padding: 10px 12px 9px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.format-card-source {
  font-size: 10.5px;
  color: var(--text-3);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 1px;
}
.format-card-title {
  font-size: 11.5px;
  color: var(--text-2);
  text-decoration: none;
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}
.format-card-title:hover { color: #38bdf8; }

/* Platform toggle bar */
.format-platform-bar {
  display: flex;
  gap: 4px;
  padding: 8px 12px 0;
}
.format-plat-btn {
  font-size: 11px;
  font-family: inherit;
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-3);
  transition: all .15s;
}
.format-plat-btn:hover  { border-color: #38bdf8; color: #38bdf8; }
.format-plat-btn.active {
  background: rgba(56,189,248,.12);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Post text */
.format-post-text {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: var(--text);
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  padding: 10px 12px 8px;
  flex: 1;
}

/* Card footer */
.format-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 11px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.format-chars {
  font-size: 10.5px;
  color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
}
.format-chars--over { color: #f87171; }
.format-copy-btn {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-3);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
  transition: all .15s;
}
.format-copy-btn:hover {
  border-color: #38bdf8;
  color: #38bdf8;
  background: rgba(56,189,248,.07);
}

/* Section empty state */
.format-section-empty {
  color: var(--text-3);
  font-size: 13px;
  padding: 20px;
  text-align: center;
  grid-column: 1/-1;
}

/* Collapsible format sections */
.fcat-hdr-clickable {
  cursor: pointer;
  user-select: none;
}
.fcat-hdr-clickable:hover {
  background: rgba(255,255,255,.03);
}
.fcat-chevron {
  font-size: 13px;
  color: var(--text-3);
  transition: transform .2s;
  flex-shrink: 0;
  display: inline-block;
  margin-right: 2px;
}
.fcat-chevron--collapsed { transform: rotate(-90deg); }
.fcat-grid--collapsed { display: none; }
