/**
 * news.css — 新闻中心视图专属样式
 * ============================================================================
 * 命名空间 nw-,复用 big5.css 的 :root token(不新增颜色,不新增字体)。
 * 设计取向:快讯是"扫读"型内容 —— 一屏内看到尽量多条,而不是大图卡片流。
 * 所以主体用紧凑列表而非网格,标题给足行宽,元信息压到一行小字。
 */

/* ── 筛选工具条 ────────────────────────────────────────────────────────── */
.nw-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.nw-seg {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--muted);
}

.nw-seg button {
  padding: 0.4rem 0.85rem;
  font: 500 0.8125rem/1 var(--font-body);
  color: var(--fg-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}

.nw-seg button + button { border-left: 1px solid var(--border); }
.nw-seg button:hover    { color: var(--fg-secondary); background: rgba(255, 255, 255, 0.04); }

.nw-seg button.is-active {
  color: var(--accent);
  background: var(--accent-muted);
}

.nw-search {
  flex: 1 1 12rem;
  min-width: 10rem;
  padding: 0.45rem 0.7rem;
  font: 400 0.8125rem/1.3 var(--font-body);
  color: var(--fg);
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.nw-search::placeholder { color: var(--fg-muted); }
.nw-search:focus {
  outline: none;
  border-color: var(--border-hover);
  box-shadow: var(--glow-sm);
}

/* ── 日期切片条 ────────────────────────────────────────────────────────── */
.nw-days {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
}

.nw-day {
  flex: 0 0 auto;
  padding: 0.35rem 0.7rem;
  font: 500 0.75rem/1.2 var(--font-mono);
  color: var(--fg-muted);
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s var(--ease);
}

.nw-day:hover { color: var(--fg-secondary); border-color: var(--border-hover); }

.nw-day.is-active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-muted);
}

.nw-day__n {
  margin-left: 0.35rem;
  font-size: 0.6875rem;
  opacity: 0.7;
}

/* ── 快讯列表 ──────────────────────────────────────────────────────────── */
.nw-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
}

.nw-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.85rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.nw-item:hover {
  background: var(--card-solid);
  border-color: var(--border-hover);
  border-left-color: var(--accent);
}

.nw-item__title {
  margin: 0 0 0.35rem;
  font: 600 0.9375rem/1.45 var(--font-body);
  color: var(--fg);
}

/* 原文标题(zh 缺失时作为主标题显示)用稍弱的字重,提示这是未译原文 */
.nw-item__title.is-raw {
  font-weight: 500;
  color: var(--fg-secondary);
}

.nw-item__sum {
  margin: 0 0 0.5rem;
  font: 400 0.8125rem/1.55 var(--font-body);
  color: var(--fg-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nw-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font: 500 0.6875rem/1 var(--font-mono);
  color: var(--fg-muted);
}

.nw-item__time { color: var(--fg-secondary); }
.nw-item__dot  { opacity: 0.4; }

/* ── TAG 徽章:三级关联强度用不同视觉重量区分 ──────────────────────────── */
.nw-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  font: 500 0.6875rem/1.3 var(--font-body);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  white-space: nowrap;
}

/* primary:主体球队 —— 最强,实色边框 */
.nw-tag--primary {
  color: var(--accent);
  background: var(--accent-muted);
  border-color: rgba(245, 158, 11, 0.35);
}

/* mentioned:被提及 —— 中等,仅底色 */
.nw-tag--mentioned {
  color: var(--viz-home);
  background: rgba(111, 168, 232, 0.12);
}

/* derived:推导(联赛/主题) —— 最弱,纯文字加淡框 */
.nw-tag--derived {
  color: var(--fg-muted);
  background: transparent;
  border-color: var(--border);
}

/* ── 可信度徽章 ────────────────────────────────────────────────────────── */
.nw-cred {
  padding: 0.15rem 0.4rem;
  font: 600 0.625rem/1.3 var(--font-mono);
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
}

.nw-cred--official { color: var(--viz-good);     background: rgba(78, 203, 78, 0.14); }
.nw-cred--report   { color: var(--viz-warning);  background: rgba(255, 201, 77, 0.14); }
.nw-cred--rumor    { color: var(--viz-critical); background: rgba(238, 131, 130, 0.14); }

/* 语言标记:提示这条还没翻译 */
.nw-lang {
  padding: 0.1rem 0.35rem;
  font: 600 0.625rem/1.3 var(--font-mono);
  color: var(--fg-muted);
  background: var(--muted);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

/* ── 状态占位 ──────────────────────────────────────────────────────────── */
.nw-state {
  padding: 2.5rem 1rem;
  text-align: center;
  font: 400 0.875rem/1.6 var(--font-body);
  color: var(--fg-muted);
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
}

.nw-state strong { color: var(--fg-secondary); font-weight: 600; }

/* ── 统计条 ────────────────────────────────────────────────────────────── */
.nw-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 0.75rem;
}

.nw-stat {
  padding: 0.7rem 0.85rem;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.nw-stat__v {
  font: 700 1.375rem/1.1 var(--font-display);
  color: var(--accent);
}

.nw-stat__k {
  margin-top: 0.2rem;
  font: 500 0.6875rem/1.3 var(--font-body);
  color: var(--fg-muted);
}

/* ── 详情弹窗 ──────────────────────────────────────────────────────────── */
.nw-modal {
  width: min(46rem, calc(100vw - 2rem));
  max-height: min(85vh, 48rem);
  padding: 0;
  color: var(--fg);
  background: var(--bg-alt);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.nw-modal::backdrop { background: rgba(0, 0, 0, 0.7); }

.nw-modal__hd {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--muted);
}

.nw-modal__title {
  margin: 0;
  font: 600 1.0625rem/1.4 var(--font-body);
  color: var(--fg);
}

.nw-modal__sub {
  margin: 0.35rem 0 0;
  font: 500 0.6875rem/1.4 var(--font-mono);
  color: var(--fg-muted);
}

.nw-x {
  flex: 0 0 auto;
  width: 1.9rem;
  height: 1.9rem;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--fg-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nw-x:hover { color: var(--fg); border-color: var(--border-hover); }

.nw-modal__bd {
  padding: 1.1rem 1.25rem 1.4rem;
  overflow-y: auto;
  max-height: calc(85vh - 6rem);
}

.nw-blk { margin-bottom: 1.1rem; }
.nw-blk:last-child { margin-bottom: 0; }

.nw-blk__k {
  margin: 0 0 0.4rem;
  font: 600 0.6875rem/1 var(--font-mono);
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nw-blk__v {
  margin: 0;
  font: 400 0.875rem/1.65 var(--font-body);
  color: var(--fg-secondary);
}

.nw-blk__v a { color: var(--viz-home); word-break: break-all; }

.nw-tagrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.nw-out {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.45rem 0.9rem;
  font: 600 0.8125rem/1 var(--font-body);
  color: var(--accent-fg);
  background: var(--accent);
  border-radius: var(--radius-md);
  text-decoration: none;
}

.nw-out:hover { filter: brightness(1.08); }

/* ── 移动端 ────────────────────────────────────────────────────────────── */
@media (max-width: 40rem) {
  .nw-item          { padding: 0.7rem 0.8rem; }
  .nw-item__title   { font-size: 0.875rem; }
  .nw-search        { flex-basis: 100%; }
  .nw-modal__hd     { padding: 0.9rem 1rem; }
  .nw-modal__bd     { padding: 0.9rem 1rem 1.2rem; }
}
