/* 页面专属样式：topics（热点与选题）。类名统一以 tp- 开头。 */

/* ---------- 三个入口 ---------- */
.tp-entries { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.tp-entry { display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s, background .15s; }
.tp-entry:hover { border-color: #bcd8f0; }
.tp-entry.active { border-color: var(--brand-2); background: linear-gradient(160deg, #f1f8ff 0%, #ffffff 70%); box-shadow: 0 10px 28px rgba(74, 126, 176, .16), inset 0 3px 0 var(--brand-2); }
.tp-entry-no { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--soft-2); color: #5b85aa; font-weight: 700; font-size: 14px; letter-spacing: .5px; }
.tp-entry.active .tp-entry-no { background: var(--brand-2); color: #fff; }
.tp-entry-text { flex: 1; min-width: 0; }
.tp-entry-text strong { display: block; font-size: 16.5px; color: #264763; line-height: 1.35; }
.tp-entry-text small { display: block; font-size: 13px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.tp-entry-count { flex: none; font-size: 13px; color: var(--muted); white-space: nowrap; }
.tp-entry-count b { font-size: 26px; line-height: 1; color: var(--brand-ink); margin-right: 3px; font-variant-numeric: tabular-nums; }
.tp-section-head { margin-top: 0; }

/* ---------- 热点：左新闻、右已保存 ---------- */
.tp-hot { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.tp-news .card-title h3 small, .tp-saved .card-title h3 small { font-size: 13px; }
.tp-news-status { background: var(--soft); border: 1px solid var(--soft-2); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; color: var(--ink-2); }
.tp-news-status-line { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.tp-news-status-line i { font-style: normal; color: var(--faint); }
.tp-news-status-line b { font-weight: 600; }
.tp-news-sources { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 9px; }
.tp-src { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 10px; border-radius: 13px; background: #fff; border: 1px solid var(--line-2); font-size: 13px; color: var(--ink-2); }
.tp-src i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.tp-src em { font-style: normal; color: var(--muted); }
.tp-src.ok i { background: #45b188; }
.tp-src.ok em { color: var(--ok); }
.tp-src.bad { background: var(--warn-bg); border-color: #f3dfb8; color: #8a5a12; }
.tp-src.bad i { background: #d9962f; }
.tp-src.bad em { color: #8a5a12; font-weight: 600; }
.tp-src.off { color: var(--muted); background: var(--gray-bg); border-color: transparent; }
.tp-src-manage { font-size: 13px; margin-left: 4px; }
.tp-src-warn { margin-top: 8px; }
.tp-news-toolbar { margin: 14px 0 2px; }
.tp-news-toolbar .input.search { min-width: 180px; flex: 1; max-width: 260px; }
.tp-news-list { list-style: none; margin: 0; padding: 0; }
.tp-news-item { display: flex; gap: 14px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid #eef4fa; }
.tp-news-item:last-child { border-bottom: 0; }
.tp-news-title { font-size: 15px; line-height: 1.5; font-weight: 600; color: #2c4d6a; }
.tp-news-title:hover { color: var(--brand); }
.tp-ext { font-size: 12px; color: var(--faint); font-weight: 400; }
.tp-news-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 13px; color: var(--muted); margin-top: 3px; }
.tp-news-actions { display: flex; gap: 6px; align-items: center; flex: none; padding-top: 1px; }
.tp-news-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid #eef4fa; }

/* ---------- 选题卡片 ---------- */
.tp-toolbar { margin-bottom: 14px; }
.tp-toolbar .input.search { min-width: 200px; }
.tp-saved .tp-toolbar .input.search { min-width: 140px; flex: 1; }
.tp-saved .tp-toolbar .select { min-width: 104px; }
.tp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 16px; }
.tp-cards.one { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.tp-card { display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px 14px; min-width: 0; }
.tp-saved .tp-card { box-shadow: none; background: #fbfdff; padding: 14px 16px 12px; }
.tp-card-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tp-card h3 { font-size: 16px; line-height: 1.45; }
.tp-card-title { text-align: left; color: #2c4d6a; font-weight: 600; line-height: 1.45; }
.tp-card-title:hover { color: var(--brand); }
.tp-card-summary { font-size: 14px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.tp-card-summary.pending { color: #b98a4a; }
.tp-mini { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 2px 10px; margin: 0; font-size: 13.5px; }
.tp-mini dt { color: var(--muted); }
.tp-mini dd { margin: 0; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tp-card-src { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 13px; color: var(--muted); }
.tp-card-note { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tp-card-ips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13.5px; }
.tp-ipchip { background: #eaf3fd; color: #3d6f9d; font-weight: 600; }
.tp-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin-top: auto; padding-top: 11px; border-top: 1px dashed var(--line-2); }
.tp-planned-n { color: var(--ok); font-weight: 600; }
.tp-empty { padding: 30px 16px; }

/* ---------- 选题详情抽屉 ---------- */
.tp-detail { display: flex; flex-direction: column; gap: 14px; }
.tp-detail .kv { font-size: 14.5px; gap: 8px 14px; }
.tp-url { word-break: break-all; }
.tp-status-select { width: auto; min-width: 100px; background-color: #fff; }
.tp-planned { align-items: center; padding: 9px 0; }
.tp-angles .section-head { margin: 8px 0 10px; }
.tp-ai-off { margin-bottom: 12px; }
.tp-ipgroup { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 16px; margin-bottom: 12px; }
.tp-ipgroup-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tp-ipgroup-head b { display: block; font-size: 15.5px; color: #2c4d6a; line-height: 1.35; }
.tp-ipgroup .empty { margin-top: 10px; padding: 14px; }
.tp-angle { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fbfdff; margin-top: 10px; }
.tp-angle.is-off { opacity: .62; }
.tp-angle-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tp-angle h4 { font-size: 15.5px; line-height: 1.45; color: #2c4d6a; margin: 8px 0 6px; }
.tp-angle-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; font-size: 14px; padding: 3px 0; color: var(--ink-2); }
.tp-angle-row > span { color: var(--muted); }
.tp-angle-row.warn { background: var(--warn-bg); border-radius: 8px; padding: 6px 9px; margin: 5px -9px 0; color: #7a5010; }
.tp-angle-row.warn > span { color: #8a5a12; font-weight: 600; }
.tp-angle-linked { font-size: 13.5px; color: var(--ok); margin-top: 8px; }
.tp-angle-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 11px; }

/* ---------- 新闻来源管理 ---------- */
.tp-sources-intro ul { margin: 6px 0 0; padding-left: 20px; }
.tp-sources-intro li { margin: 4px 0; line-height: 1.65; }
.tp-sources .section-head { margin-top: 20px; }
.tp-col-state { width: 90px; }
.tp-col-last { width: 230px; }
.tp-col-ops { width: 210px; }
.tp-sources .table td { vertical-align: middle; }
.tp-sources .tp-src { margin-bottom: 2px; }
.tp-source-actions { text-align: right; }
.tp-source-actions .btn { margin-left: 4px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .tp-hot { grid-template-columns: minmax(0, 1fr); }
  .tp-cards.one { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}
@media (max-width: 820px) {
  .tp-entries { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .tp-entry { padding: 12px 14px; }
  .tp-cards, .tp-cards.one { grid-template-columns: minmax(0, 1fr); }
  .tp-news-item { flex-direction: column; gap: 8px; }
  .tp-news-toolbar .input.search { max-width: none; }
  .tp-angle-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .tp-source-actions { white-space: normal; }
  .tp-detail .kv.wide { grid-template-columns: 76px minmax(0, 1fr); }
  .tp-status-select { min-width: 84px; }
}
