/* ==========================================================================
   News — your sources and topics, read in one place
   ========================================================================== */
.news-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 10px 0 20px; }
.news-sep { width: 1px; height: 18px; background: var(--border); margin: 0 3px; }
.news-chip {
  border: 1px solid var(--border); background: var(--bg); border-radius: 999px;
  padding: 5px 12px; font: inherit; font-size: 13px; color: var(--text-soft); cursor: pointer;
}
.news-chip:hover { border-color: var(--border-strong); }
.news-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--text); font-weight: 600; }
.news-chip.ghost { margin-left: auto; color: var(--text-faint); }

.news-card { display: flex; flex-direction: column; min-width: 0; }
.news-shot {
  display: block; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  background: var(--bg-hover); margin-bottom: 9px; position: relative;
}
.news-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-noimg {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 10px;
  font-size: 12.5px; font-weight: 700; color: var(--text-faint); text-align: center;
  letter-spacing: .02em;
}
.news-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--text-faint); margin-bottom: 4px;
}
.news-src { font-weight: 700; color: var(--text-soft); }
.news-hits { display: inline-flex; gap: 4px; }
.news-hits span {
  background: var(--accent-soft); color: var(--accent); border-radius: 999px;
  padding: 1px 7px; font-weight: 700; font-size: 10.5px;
}
.news-h {
  font-size: 15px; font-weight: 650; line-height: 1.35; color: var(--text);
  text-decoration: none; display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.news-h:hover { color: var(--accent); }
.news-sum {
  font-size: 13px; color: var(--text-faint); line-height: 1.5; margin: 5px 0 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card.seen .news-h { color: var(--text-faint); font-weight: 600; }
.news-card.seen .news-shot { opacity: .55; }

/* the lead story gets the room */
.news-lead { margin-bottom: 26px; }
.news-lead .news-card.big .news-shot { aspect-ratio: 21 / 9; margin-bottom: 12px; }
.news-lead .news-h { font-size: 23px; font-weight: 700; line-height: 1.25; -webkit-line-clamp: 3; }
.news-lead .news-sum { font-size: 14.5px; -webkit-line-clamp: 3; }

.news-grid {
  display: grid; gap: 22px 18px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.news-empty, .news-blank { color: var(--text-faint); font-size: 14px; text-align: center; padding: 44px 0; }
.news-blank p { margin: 0 0 16px; }

/* picking sources and topics */
.modal.wide { width: min(680px, calc(100vw - 32px)); max-height: 84vh; overflow-y: auto; }
.news-topics { margin: 4px 0 14px; }
.news-topics form, #nwFeedAdd { display: flex; gap: 8px; margin-bottom: 10px; }
.news-topics input, #nwFeedUrl {
  flex: 1; border: 1px solid var(--border-strong); border-radius: 10px; padding: 8px 12px;
  font: inherit; font-size: 14px; outline: none; background: var(--bg); color: var(--text);
}
.news-topics input:focus, #nwFeedUrl:focus { border-color: var(--accent); }
#nwTopicList { display: flex; flex-wrap: wrap; gap: 6px; }
.news-cats {
  display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  margin-top: 16px;
}
.news-cat-h {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 7px;
}
.news-feed {
  display: flex; align-items: flex-start; gap: 8px; padding: 4px 0;
  font-size: 13.5px; cursor: pointer;
}
.news-feed input { margin-top: 2px; flex: none; }
.news-feed.bad span { color: var(--text-faint); }
.news-feed i { font-style: normal; font-size: 11px; color: #d64545; }

/* choosing sources, on the app's own page */
.news-find { display: flex; gap: 8px; margin: 8px 0 12px; }
.news-find input {
  flex: 1; border: 1px solid var(--border-strong); border-radius: 10px; padding: 9px 12px;
  font: inherit; font-size: 14px; outline: none; background: var(--bg); color: var(--text);
}
.news-find input:focus { border-color: var(--accent); }
.news-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.field-label.sub { margin-top: 22px; }
.news-found-h {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-faint); margin: 12px 0 6px;
}
.news-feed.found { align-items: center; justify-content: space-between; gap: 12px; }
.news-feed.found span { display: flex; flex-direction: column; min-width: 0; }
.news-feed i {
  font-style: normal; font-size: 11px; color: var(--text-faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.news-feed.found .btn-ghost { flex: none; padding: 5px 11px; font-size: 13px; }
