/* ============================================================
   ProfitData — News Page Styles (CoinDesk clean feed)
   ============================================================ */

body { padding-top: var(--header-h); background: var(--bg); }

/* ── Feed page ── */
.news-wrap {
  max-width: 680px; margin: 0 auto; padding: 24px 20px;
}

.news-header { margin-bottom: 20px; }
.news-header h1 { font: 700 22px var(--font); color: var(--text); margin: 0 0 4px; }
.news-header p { font: 400 13px var(--font); color: var(--text3); margin: 0; }

/* ── Filters ── */
.news-filters {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin-bottom: 20px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.nf-group { display: flex; gap: 4px; flex-wrap: wrap; }
.nf-pill {
  padding: 5px 14px; border: 1px solid var(--border); border-radius: 20px;
  background: none; color: var(--text2); font: 500 11px var(--font);
  cursor: pointer; transition: all .12s; white-space: nowrap;
}
.nf-pill:hover { color: var(--text); border-color: var(--text3); }
.nf-pill.active { color: var(--text); background: var(--bg3); border-color: var(--text3); }
.nf-select {
  padding: 5px 10px; border: 1px solid var(--border); border-radius: 20px;
  background: none; color: var(--text2); font: 500 11px var(--font); cursor: pointer;
}
.nf-select:focus { outline: none; border-color: var(--accent); }
.nf-search {
  flex: 1; min-width: 140px; padding: 5px 14px;
  border: 1px solid var(--border); border-radius: 20px;
  background: none; color: var(--text); font: 400 12px var(--font); margin-left: auto;
}
.nf-search:focus { outline: none; border-color: var(--accent); }
.nf-search::placeholder { color: var(--text3); }

/* ── Feed ── */
.news-feed { display: flex; flex-direction: column; }
.nf-loading, .nf-empty { text-align: center; padding: 60px 20px; color: var(--text3); font-size: 14px; }

/* ── News item — clean minimal row ── */
.news-item {
  display: flex; flex-direction: column; gap: 8px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit; cursor: pointer;
}
.news-item:first-child { padding-top: 4px; }
.news-item:hover .ni-title { color: var(--accent); }

/* Time — standalone, large */
.ni-time {
  font: 400 14px var(--font); color: var(--text3); letter-spacing: .3px;
}

/* Sentiment + instrument row */
.ni-sentiment {
  display: flex; align-items: center; gap: 8px;
}
.ni-sent-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font: 600 12px var(--font);
}
.ni-sent-dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.ni-sent-positive { color: var(--green); }
.ni-sent-positive .ni-sent-dot { background: var(--green); }
.ni-sent-negative { color: var(--red); }
.ni-sent-negative .ni-sent-dot { background: var(--red); }
.ni-sent-neutral { color: var(--text3); }
.ni-sent-neutral .ni-sent-dot { background: var(--text3); }
.ni-sent-mixed { color: var(--yellow); }
.ni-sent-mixed .ni-sent-dot { background: var(--yellow); }

.ni-inst-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border: 1px solid var(--border); border-radius: 20px;
  font: 500 12px var(--font); color: var(--text);
}
.ni-inst-badge .ni-pct { font-weight: 600; margin-left: 2px; }

/* Title */
.ni-title {
  font: 600 20px var(--font); color: var(--text); line-height: 1.35;
  margin: 0; transition: color .12s;
}

/* Summary */
.ni-summary {
  font: 400 15px/1.65 var(--font); color: var(--text2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; margin: 0;
}

/* Source line (subtle) */
.ni-source-line {
  font: 400 11px var(--font); color: var(--text3);
}

/* Hide old meta elements */
.ni-top { display: contents; }
.ni-meta, .ni-impact, .ni-asset, .ni-dir, .ni-instruments, .ni-tags { display: none; }

/* ── Load more ── */
.news-loadmore { text-align: center; padding: 24px; }
.nf-loadmore-btn {
  padding: 8px 28px; border: 1px solid var(--border); border-radius: 20px;
  background: none; color: var(--text2); font: 500 12px var(--font);
  cursor: pointer; transition: all .12s;
}
.nf-loadmore-btn:hover { background: var(--bg3); color: var(--text); }

/* ════════════════════════════════════════════════════════════
   DETAIL PAGE
════════════════════════════════════════════════════════════ */
.nd-wrap { max-width: 680px; margin: 0 auto; padding: 24px 20px; }
.nd-loading, .nd-error { text-align: center; padding: 60px; color: var(--text3); }

.nd-article { display: flex; flex-direction: column; gap: 16px; }
.nd-breadcrumb { font: 400 12px var(--font); color: var(--text3); }
.nd-breadcrumb a { color: var(--accent); text-decoration: none; }

.nd-impact-bar {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 6px; align-self: flex-start;
}
.nd-impact-badge { font: 700 10px var(--font); text-transform: uppercase; letter-spacing: .4px; }
.nd-dir, .nd-horizon { font: 500 10px var(--font); color: var(--text2); }

.nd-title { font: 700 28px var(--font); color: var(--text); line-height: 1.25; margin: 0; }
.nd-meta {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  font: 400 12px var(--font); color: var(--text3);
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.nd-source { font-weight: 600; color: var(--text2); }
.nd-instruments, .nd-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.ni-inst { font: 600 10px 'JetBrains Mono', monospace; padding: 2px 7px; border-radius: 4px; background: rgba(59,130,246,.08); color: var(--accent); }
.ni-tag { font: 500 10px var(--font); padding: 2px 7px; border-radius: 4px; background: var(--bg3); color: var(--text3); }

.nd-summary { font: 400 16px/1.75 var(--font); color: var(--text); }
.nd-bullets { padding-left: 20px; font: 400 14px/1.8 var(--font); color: var(--text2); }
.nd-bullets li { margin-bottom: 6px; }
.nd-impact-note {
  padding: 14px 18px; border-radius: 8px; background: var(--bg2);
  font: 400 14px/1.65 var(--font); color: var(--text2); border-left: 3px solid var(--accent);
}
.nd-original {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; border: 1px solid var(--border);
  border-radius: 20px; font: 500 12px var(--font); color: var(--text2);
  transition: all .12s; text-decoration: none; align-self: flex-start;
}
.nd-original:hover { background: var(--bg3); color: var(--text); }
.nd-section { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.nd-section h4 { font: 600 14px var(--font); color: var(--text); margin: 0 0 10px; }
.nd-related-link {
  display: block; padding: 10px 14px; border-radius: 6px;
  font: 400 13px/1.4 var(--font); color: var(--text2); text-decoration: none;
  transition: background .1s; margin-bottom: 2px;
}
.nd-related-link:hover { background: var(--bg3); color: var(--text); }
.nd-src { font: 500 10px var(--font); color: var(--text3); margin-left: 8px; }

/* ── Light theme ── */
[data-theme="light"] .nf-select, [data-theme="light"] .nf-search { background: #fff; }
[data-theme="light"] .nd-impact-note { background: var(--bg); }

/* ── Mobile ── */
@media (max-width: 768px) {
  .news-wrap, .nd-wrap { padding: 16px 12px; }
  .ni-title { font-size: 17px; }
  .ni-summary { font-size: 14px; }
  .nd-title { font-size: 22px; }
}
