/* ============================================================================
   pages/news.css · 本场情报页（#/match/<key>/news）
   ----------------------------------------------------------------------------
   依赖：tokens + base + components（.card/.badge/.btn/.empty/.sk 等）
   结构：比赛头 / 顶部状态条 / AI 摘要卡 / 条目列表（默认收起 3 行）/ 固定页脚
   约束：390×844 基准、320 宽不破版、暗/亮双主题、0 横向溢出、触控≥44px。
   ========================================================================== */

/* 独立整页：隐藏底栏，给固定页脚让出安全区（与比赛页/报告页同口径） */
body:has(.view-news) #tabbar { display: none; }
body:has(.view-news) #views { padding-bottom: calc(var(--s-4) + var(--safe-b)); }

.news-page { padding-bottom: 2px; }

/* ------------------------------ 比赛头 ------------------------------ */
.news-head {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-lg);
  background: var(--surface-1);
  border: 1px solid var(--line-1);
}
.nh-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.nh-num {
  font-size: 10px;
  letter-spacing: var(--ls-label);
  color: var(--txt-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nh-top .card-link { font-size: var(--fs-11); flex: none; }
.nh-teams {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: 8px;
  font-size: var(--fs-17);
  font-weight: var(--fw-semibold);
  color: var(--txt-0);
  letter-spacing: var(--ls-cjk-title);
}
.nh-team { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.nh-name { max-width: 6.4em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nh-vs { flex: none; font-size: var(--fs-11); font-weight: var(--fw-medium); color: var(--txt-3); letter-spacing: .08em; }
.nh-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 7px;
  font-size: var(--fs-11);
  color: var(--txt-2);
}
.nh-meta span { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.nh-meta svg { width: 12px; height: 12px; color: var(--txt-3); }

/* ------------------------------ 顶部状态条 ------------------------------ */
.news-status {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px var(--s-3);
  border-radius: var(--r-sm);
  background: var(--surface-1);
  border: 1px solid var(--line-1);
  font-size: var(--fs-12);
  line-height: var(--lh-3);
  color: var(--txt-1);
}
.news-status > svg { width: 15px; height: 15px; flex: none; }
.news-status .ns-text { flex: 1; min-width: 0; }
.news-status .ns-right {
  flex: none;
  font-size: 10px;
  color: var(--txt-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.news-status--ok { border-color: var(--ok-line); background: var(--ok-soft); color: var(--ok); }
.news-status--ok .ns-right { color: var(--txt-2); }
.news-status--warn { border-color: var(--warn-line); background: var(--warn-soft); color: var(--warn); }
.news-status--warn .ns-right { color: var(--txt-2); }
.news-status--pending { border-color: var(--aurora-teal-line); background: var(--aurora-teal-soft); color: var(--aurora-teal); }
.news-status--pending > svg { animation: pulse-dot 1.8s var(--ease-out) infinite; }
.news-status--pending .ns-right { color: var(--txt-2); }
.news-status--muted { color: var(--txt-2); }
.news-status--lock { color: var(--txt-1); }

/* ------------------------------ AI 摘要卡 ------------------------------ */
.news-digest { padding: var(--s-3) var(--s-4); }
.news-digest .nd-text {
  margin: 7px 0 0;
  font-size: var(--fs-13);
  line-height: var(--lh-4);
  color: var(--txt-1);
  letter-spacing: var(--ls-cjk);
}
.news-digest .nd-foot { margin: 9px 0 0; font-size: 10px; color: var(--txt-3); }

/* 确定度 chip：已确认 / 单一来源 / 待证实（digest 与条目共用） */
.ncer {
  display: inline-flex;
  align-items: center;
  flex: none;
  height: 18px;
  padding: 0 7px;
  border-radius: var(--r-full);
  font-size: 10px;
  font-weight: var(--fw-medium);
  letter-spacing: .02em;
  white-space: nowrap;
}
.ncer--ok { color: var(--ok); background: var(--ok-soft); box-shadow: inset 0 0 0 1px var(--ok-line); }
.ncer--single { color: var(--warn); background: var(--warn-soft); box-shadow: inset 0 0 0 1px var(--warn-line); }
.ncer--unverified { color: var(--txt-2); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ------------------------------ 条目列表 ------------------------------ */
.news-sec-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  padding: 0 4px;
  font-size: var(--fs-11);
  letter-spacing: .06em;
  color: var(--txt-2);
}
.news-sec-title .num { color: var(--txt-3); letter-spacing: 0; }
.news-list { padding: 0 var(--s-4); }
.news-item { border-bottom: 1px solid var(--line-1); }
.news-item:last-child { border-bottom: 0; }

.ni-head {
  position: relative;
  min-height: var(--tap-min);
  padding: 12px 26px 12px 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ni-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: var(--fs-13);
  font-weight: var(--fw-medium);
  line-height: var(--lh-3);
  color: var(--txt-0);
  letter-spacing: var(--ls-cjk);
}
.news-item.is-open .ni-title { display: block; overflow: visible; }
.ni-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-top: 6px;
  font-size: 10px;
  line-height: 1.4;
  color: var(--txt-2);
}
.ni-src {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--link);
  text-decoration: none;
}
.ni-src svg { width: 10px; height: 10px; opacity: .8; }
.ni-time { color: var(--txt-3); font-variant-numeric: tabular-nums; }
.ni-dot { color: var(--txt-3); }
.ni-chev {
  position: absolute;
  right: 0;
  top: 13px;
  display: inline-flex;
  color: var(--txt-3);
  transition: transform var(--dur-2) var(--ease-out);
}
.ni-chev svg { width: 16px; height: 16px; }
.news-item.is-open .ni-chev { transform: rotate(180deg); }

.ni-body { padding: 0 0 12px; }
.ni-sum {
  margin: 0 0 8px;
  font-size: var(--fs-12);
  line-height: var(--lh-4);
  color: var(--txt-1);
}
.ni-impact {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--bg-inset);
  border: 1px solid var(--line-1);
  font-size: var(--fs-12);
  line-height: var(--lh-4);
  color: var(--txt-1);
}
.ni-impact b { display: inline-block; margin-right: 6px; color: var(--brand-text); font-weight: var(--fw-semibold); }
.ni-open {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  font-size: var(--fs-12);
  color: var(--link);
  text-decoration: none;
}
.ni-open svg { width: 13px; height: 13px; }

/* ------------------------------ 空 / 失败态 ------------------------------ */
.news-state { padding: var(--s-5) var(--s-4); }
.news-state .empty { padding: 0; }
.news-state .empty .btn { min-height: var(--tap-min); }
.news-coverage {
  margin: var(--s-3) 0 0;
  text-align: center;
  font-size: 10px;
  line-height: var(--lh-3);
  color: var(--txt-3);
}
.news-retry { display: flex; justify-content: center; margin-top: var(--s-3); }

/* ------------------------------ 固定页脚（AI 免责 + 点击原文提示） ------------------------------ */
.news-foot {
  position: sticky;
  bottom: calc(4px + var(--safe-b));
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: var(--s-2);
  padding: 9px var(--s-3);
  border-radius: var(--r-full);
  background: color-mix(in srgb, var(--bg-2) 88%, transparent);
  border: 1px solid var(--line-1);
  -webkit-backdrop-filter: var(--surface-blur);
  backdrop-filter: var(--surface-blur);
  font-size: 10px;
  letter-spacing: .02em;
  color: var(--txt-2);
}
.news-foot svg { width: 12px; height: 12px; color: var(--txt-3); flex: none; }

/* ------------------------------ 320 宽兜底 ------------------------------ */
@media (max-width: 359px) {
  .nh-teams { font-size: var(--fs-15); }
  .nh-name { max-width: 5.4em; }
  .news-head { padding: var(--s-3); }
  .news-digest { padding: var(--s-3); }
}

/* ------------------------------ 亮色微调 ------------------------------ */
:root[data-theme="light"] .news-head { background: var(--bg-1); }
:root[data-theme="light"] .news-foot { background: color-mix(in srgb, var(--bg-1) 92%, transparent); }
:root[data-theme="light"] .ni-impact { background: var(--bg-1); }
