/* ============================================================================
   v14-news.css —— 10 版资讯流（0912 定稿）：列头 / 时间流 / 条目三态 / 新到胶囊 / 事件弹窗。
   精确值来源：定稿画布 Main.dc.html 实测（UI规格.md「资讯流」表）。暗色差异在 theme-dark.css §16。
   2026-09-16 测试站反馈优化 §D：去日期分组头与时长、来源标 + 博主名、弹窗视频两 Tab、要点三列网格 + 分割线。
   11 版（2026-09-23，锚 docs/迭代/2026-09-23-11版整体需求/ Part C）：资讯流改看板下方通栏容器卡、与看板同一滚动容器；
   条目 = 左封面 200×112（16:9 裁切，视频播放 + 时长角标；缺封面按来源兜底）+ 右「时间 · 来源标 · 博主 / 标题两行 / 导读两行」；
   日期组头「今天 9月23日 周三 · N 条」吸顶贴顶，当前吸顶那条右侧出「↑ 回到顶部」；弹窗宽改 min(796, 100% − 300)。
   ========================================================================== */

/* ============ 列头 + 时间流容器（11 版：不再自滚，随 #board-scroll 整区滚动） ============ */
.nw-head { flex: none; display: flex; align-items: center; gap: 7px; height: 28px; padding: 8px 16px 0; box-sizing: content-box; }
.nw-head .h3-title { font-size: 15px; font-weight: 800; letter-spacing: -.15px; }
.nw-head-s { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nw-stream { position: relative; padding: 0 16px 10px; }

/* 日期分组头：吸顶贴住滚动口上缘（容器顶内边距 0）；「今天 / 昨天 + M月D日 周X」或「M月D日 + 周X」+ 右侧「N 条」 */
.nw-day { position: sticky; top: 0; z-index: 5; background: var(--card); display: flex; align-items: baseline; gap: 6px; padding: 6px 0 2px; }
.nw-day-t { font-size: 13px; font-weight: 700; color: var(--ink); }
.nw-day-s { font-size: 11px; color: var(--ink-3); }
.nw-day-n { margin-left: auto; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
/* 「↑ 回到顶部」：只挂在当前吸顶的那一条日期头（四轮），列已下滚才出现 */
.nw-top {
  align-self: center; margin-left: 10px; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px 0 7px;
  border-radius: var(--r-pill); background: var(--green-soft); color: var(--green-d); font-size: 11px; font-weight: 700;
  transition: background var(--t-fast); animation: mg-fade .16s ease both;
}
.nw-top:hover { background: var(--green-ring); }

/* 时间轴 */
.nw-group { position: relative; padding-left: 14px; }
.nw-group::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; border-radius: 1px; background: var(--line-2); }

/* 条目：左封面 + 右文字列 */
.nw-item {
  position: relative; display: flex; gap: 14px; align-items: flex-start; width: 100%;
  padding: 8px 8px 8px 10px; border-radius: 12px; text-align: left; transition: background var(--t-fast);
}
.nw-item:hover { background: var(--soft-2); }
.nw-item.is-cur { background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); }
.nw-dot { position: absolute; left: -12px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--line-hover); }
.nw-item.is-unread .nw-dot { background: var(--red); }
.nw-item.is-fresh .nw-dot { background: var(--green); box-shadow: 0 0 0 0 var(--green-ring); animation: nw-ring 1.4s ease-out 2; }
.nw-item.is-fresh { animation: nw-flash 2.6s ease 1; }
@keyframes nw-ring { to { box-shadow: 0 0 0 7px rgba(11, 168, 74, 0); } }
@keyframes nw-flash { 0%, 70% { box-shadow: inset 0 0 0 999px var(--green-soft); } 100% { box-shadow: inset 0 0 0 999px rgba(0, 0, 0, 0); } }

/* 封面：16:9 固定框 object-fit:cover（原图 4:3 / 16:9 / 3:2 不一，统一裁切）；缺席或加载失败换来源兜底图（news.js） */
.nw-thumb { position: relative; flex: none; width: 200px; height: 112px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--soft); }
.nw-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nw-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%;
  background: rgba(15, 19, 27, .55); border: 1px solid rgba(255, 255, 255, .35); display: grid; place-items: center; color: #fff;
}
.nw-play svg { width: 14px; height: 14px; display: block; }
.nw-dur {
  position: absolute; right: 6px; bottom: 6px; height: 18px; padding: 0 6px; border-radius: 5px;
  background: rgba(15, 19, 27, .72); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center;
  font-variant-numeric: tabular-nums;
}

/* 文字列：meta 行（时间 · 博主；12 版 A 去平台来源标）→ 标题两行 → 导读两行；clamp 元素不带 padding（坑④） */
.nw-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; padding-top: 2px; }
.nw-meta { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nw-time { font-size: 11px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 博主名（contract source_name）：时间之后，单行省略（坑⑦：flex 子项显式 min-width:0） */
.nw-author { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.nw-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; font-weight: 700; line-height: 1.45; letter-spacing: -.15px; color: var(--ink); }
.nw-sum { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.nw-item.is-read .nw-title { color: var(--ink-2); }

/* 可用宽 W < 640（边栏在流内且视口 828–1051）：封面 120×68、标题 13；≤720 另见 mobile.css */
@media (min-width: 828px) and (max-width: 1051px) {
  .nw-thumb { width: 120px; height: 68px; }
  .nw-title { font-size: 13px; }
}

/* 平台来源标（.src-tag 三色）12 版 A 退役：资讯流与弹窗不再显示 YouTube / 腾讯新闻 / 公众号，博主名保留 */

/* 加载更早 / 空 / 失败 / 骨架 */
.nw-more {
  display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%; height: 32px;
  margin-top: 8px; border-radius: 9px; border: 1px dashed var(--line-hover);
  font-size: 12px; font-weight: 700; color: var(--ink-3);
}
.nw-more:hover { color: var(--ink); border-color: var(--ink-3); }
.nw-empty { margin-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 12px; text-align: center; color: var(--ink-3); }
.nw-empty-t { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.nw-empty-s { font-size: 11px; color: var(--ink-3); line-height: 1.6; }
.nw-state { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 0; }
.nw-state-t { font-size: 12.5px; color: var(--ink-3); }
.nw-retry { height: 30px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); font-size: 12px; font-weight: 700; color: var(--ink); }
.nw-skel { height: 74px; margin-top: 10px; border-radius: 10px; background: linear-gradient(90deg, var(--soft-2) 25%, var(--soft) 37%, var(--soft-2) 63%); background-size: 480px 100%; animation: mg-shimmer 1.3s infinite linear; }

/* 「↑ N 条新资讯」胶囊：粘在时间流顶部下方 36（日期头之下），列已下滚且有新到才出现 */
.nw-pill-host { position: sticky; top: 36px; z-index: 6; height: 0; display: flex; justify-content: center; pointer-events: none; }
.nw-pill {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 5px; height: 28px;
  padding: 0 12px 0 10px; border-radius: var(--r-pill); background: var(--green-solid); color: #fff;
  font-size: 12px; font-weight: 700; box-shadow: var(--sh-cta); animation: mg-fade .2s ease both;
}

/* ============ 事件弹窗（右侧拉起；资讯列不动、可连续点） ============ */
.news-ovl {
  position: absolute; top: 0; bottom: 0; right: 0; z-index: 80; display: flex;
  width: min(796px, calc(100% - 300px));   /* 11 版：左侧至少留 300 给资讯条目连续点 */
}
.nw-pop {
  position: relative; height: 100%; width: 100%; background: var(--card);
  border-left: 1px solid var(--line); box-shadow: -18px 0 44px rgba(20, 23, 27, .16);
  display: flex; flex-direction: column; animation: mg-push .22s var(--ease) both;
}
.nw-pop-head { flex: none; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px 0 22px; border-bottom: 1px solid var(--line); }
/* 12 版 A：弹窗头只留「博主 · MM-DD HH:MM」+ ✕（不再有「资讯流」标题与平台来源段）；窄屏单行省略。
   字色 ink-2（画布 Main.html 弹窗帧；原三段式为 ink-3 次要信息，现为头部唯一文字） */
.nw-pop-src { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.nw-pop-x { flex: none; margin-left: auto; width: 36px; height: 36px; border-radius: 50%; background: var(--soft); color: var(--ink-2); display: grid; place-items: center; transition: background var(--t-fast), color var(--t-fast); }
.nw-pop-x:hover { color: var(--ink); background: var(--line); }
.nw-pop-body { flex: 1; min-height: 0; overflow-y: auto; padding: 24px 28px 60px; }
.nw-art { max-width: 880px; margin: 0 auto; }
/* 标题顶格（原来源标 / 类型 / 时间那行已并入弹窗头） */
.nw-art-h1 { margin-top: 0; font-size: 22px; font-weight: 800; letter-spacing: -.01em; line-height: 1.45; color: var(--ink); }

/* 视频详情两 Tab（原视频 / AI 总结）：文本 Tab，选中绿字 700 + 2px 绿光标；两面板常驻 DOM */
.nw-tabs { margin-top: 14px; display: flex; align-items: center; gap: 18px; }
/* 2026-09-17 B1：标题 + Tab 固定头——在可滚正文内 sticky；负外边距抵消正文内边距让底色铺满，背景显式取卡底（暗色同令牌），否则滚动时正文透出 */
/* top 取负的正文上内边距：sticky 约束的是外边距盒，负外边距会让固定位置下沉同样的量，实测 top:0 时固定头停在滚动口下方 24px、上方露出滚过的正文 */
.nw-art-head { position: sticky; top: -24px; z-index: 2; margin: -24px -28px 0; padding: 24px 28px 12px; background: var(--card); border-bottom: 1px solid var(--line); }
.nw-pane { margin-top: 12px; }                                   /* 两面板同一位置显隐（u-hidden），各自与固定头留距 */
.nw-pane > .nw-art-sec:first-child { margin-top: 6px; }
.nw-art-head + .nw-art-lead, .nw-art-head + .nw-art-body, .nw-art-head + .nw-art-empty { margin-top: 16px; }
.nw-tab { position: relative; display: inline-flex; align-items: center; height: 38px; padding: 0; font-size: 13px; font-weight: 600; color: var(--ink-3); transition: color var(--t-fast); }
.nw-tab.is-on { color: var(--green-d); font-weight: 700; }
.nw-tab-bar { position: absolute; left: 0; right: 0; bottom: 5px; height: 2px; border-radius: 2px; background: transparent; transition: background var(--t-fast); }
.nw-tab.is-on .nw-tab-bar { background: var(--green); }
.nw-pane .nw-player { margin-top: 6px; }

.nw-player { margin-top: 16px; position: relative; border-radius: var(--r-lg); overflow: hidden; background: linear-gradient(135deg, #1B2130, #0F131B); }
.nw-player video, .nw-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.nw-player.is-ph { display: grid; place-items: center; }
.nw-ph-t { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .82); }
.nw-art-lead { margin-top: 12px; font-size: 15px; line-height: 1.8; color: var(--ink); }
.nw-art-body { margin-top: 12px; font-size: 15px; line-height: 1.8; color: var(--ink); }
.nw-art-body p + p { margin-top: 14px; }
.nw-art-body img { display: block; max-width: 100%; height: auto; }
/* 栏目标题（AI 导读 / 要点 / 内容梳理）= 正文内最大一级（2026-09-16 二轮：17px，仅此处用绿色竖线；正文 h2/h3 不再用竖线） */
.nw-art-sec { margin-top: 24px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nw-art-sec-t { font-size: 17px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.nw-art-sec-s { font-size: 12px; color: var(--ink-3); }

/* 要点：三列网格（绿点 | 时间戳 | 文本）顶对齐；条间 1px 淡分割线；全部无时间戳（文章）时两列 */
.nw-pts { margin-top: 6px; display: flex; flex-direction: column; }
.nw-pts li { display: grid; grid-template-columns: 6px minmax(44px, auto) 1fr; column-gap: 10px; align-items: start; padding: 8px 0; font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.nw-pts.is-nots li { grid-template-columns: 6px 1fr; }
.nw-pts li + li { border-top: 1px solid var(--line-2); }
.nw-pt-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); margin-top: 8px; }
.nw-pt-ts { align-self: start; text-align: left; white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--green-d); font-variant-numeric: tabular-nums; line-height: 22px; padding: 0; }   /* 行高 = 文本行（13px × 1.7），基线同一行 */
.nw-pt-x { min-width: 0; overflow-wrap: break-word; }
/* 12 版 A：正文末尾统一一个「查看原文 ↗」34 高胶囊（左对齐，13 / 700 绿字、1px --line 边），文案不按平台区分；视频放在两 Tab 面板之后（两 Tab 都可见） */
.nw-art-link { margin-top: 22px; }
.nw-art-link a {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--card);
  font-size: 13px; font-weight: 700; color: var(--green-d); text-decoration: none; transition: border-color var(--t-fast);
}
.nw-art-link a:hover { border-color: var(--line-hover); }
.nw-art-foot { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); line-height: 1.65; }

/* 摘要未就绪（summary_status != ready）：占位，不用 RSS 广告简介冒充导读（§12k） */
.nw-sum-ph, .nw-art-lead.is-pending { color: var(--ink-3); font-style: normal; }
.nw-pt-ts.is-plain { cursor: default; color: var(--ink-3); }

/* 封面（本站媒体对象；外站图不作兜底，§12k） */
.nw-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }

/* ---------- 2026-09-14 运维回执呈现项：导读引言块 / AI 尾注弱化 / 失败态文案 / 播放器底色 ---------- */
.nw-art-lead.is-standfirst { margin-top: 16px; padding: 12px 14px; border-left: 3px solid var(--green-d); background: var(--soft); border-radius: 0 var(--r-md) var(--r-md) 0; font-size: 14px; line-height: 1.75; color: var(--ink-2); }
/* 2026-09-17 B2：视频 AI 正文末尾系统尾注改为不渲染（news.js stripAiNote），原 .nw-art-note 弱化样式撤销 */
.nw-sum-ph.is-failed { color: var(--ink-3); }
.nw-player video { background: #0F131B; }   /* 非 16:9 视频按 contain 显示时留深底，与占位态同色 */
/* 2026-09-18 A3：字幕轨样式（::cue 只认字体 / 颜色 / 底色等少数属性；iOS 全屏由系统样式接管，≤720 见 mobile.css）
   用户验收反馈（09-18）：固定 15px 全屏后太小 → 改百分比：Chrome 字幕基准 = 视频高 5%，80% ≈ 视频高 4%（行内 495px 高 ≈ 20px、
   全屏 1080 ≈ 43px）。::cue 里 max() 会被解析但不生效，最小字号只能靠 ≤720 的固定值兜底（mobile.css） */
.nw-player video::cue { font-size: 80%; line-height: 1.35; color: #fff; background: rgba(15, 19, 27, .72); }

/* ---------- 2026-09-15 三来源收尾：16:9 播放器 / poster 裁切 / 加载失败 / 文章状态 / 正文图失败占位 ---------- */
/* UI 规格「播放器 16:9」（原型占位 50% 是示意）；真实 720p 视频与 YouTube 原封面都是 16:9 内容 */
.nw-player { height: auto; padding-top: 0; aspect-ratio: 16 / 9; }
/* 横屏矮视口（手机横屏 375 高等）：满宽 16:9 会比弹窗可视区还高、控制条出屏——按可视高度反推宽度并居中（56 头 + 正文上内边距 + 余量 ≈ 96） */
@media (max-height: 520px) { .nw-player { width: min(100%, calc((100dvh - 96px) * 16 / 9)); margin-left: auto; margin-right: auto; } }
.nw-player video { object-fit: contain; }
/* 开播前只显示 poster：cover 填满 16:9 盒——4:3 sddefault 原图恰好裁掉上下黑边（上下各 12.5%），16:9 原图不受影响；
   开播 / 拖动 / 点要点后 JS 加 .is-started 回 contain，视频画面不裁 */
.nw-player video:not(.is-started) { object-fit: cover; }
.nw-player.is-err .nw-ph-t { text-align: center; white-space: nowrap; }
.nw-art-empty { margin-top: 16px; padding: 14px 16px; border-radius: var(--r-md); background: var(--soft); font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.nw-img-fail { display: flex; align-items: center; justify-content: center; min-height: 72px; margin: 14px 0; padding: 12px; border-radius: var(--r-md); border: 1px dashed var(--line-hover); background: var(--soft-2); font-size: 12px; color: var(--ink-3); text-align: center; }
.nw-pts .nw-pt-ts:not(.is-plain):not(.is-empty) { cursor: pointer; }
.nw-pts .nw-pt-ts:not(.is-plain):not(.is-empty):hover { text-decoration: underline; text-underline-offset: 2px; }

/* 正文排版：契约 §12k 媒体净化白名单只留 p br h2 h3 h4 ul ol li blockquote strong em b i a img hr figure figcaption
   （无 class / style / 宽高属性）。视频精编只有 h2 + p；公众号原文可能全有，且嵌套 div 会留下空 <p>。
   排版语言对齐报告正文（report.css）：h2 绿色竖线、列表绿点、引用浅底；字号随资讯正文 15px。
   此前无 h2 规则 = 浏览器默认 22.5px，比标题 h1（22px）还大 */
.nw-art-body { overflow-wrap: break-word; }
.nw-art-body > * + * { margin-top: 14px; }
.nw-art-body > :first-child { margin-top: 0; }
.nw-art-body p:empty { display: none; }
/* 正文分级：栏目标题 17 > h2 16 > h3 15.5 > h4 15 = 正文；h2 不再用绿色竖线（竖线只留给栏目标题，2026-09-16 二轮） */
.nw-art-body h2, .nw-art-body h3, .nw-art-body h4 { color: var(--ink); font-weight: 800; letter-spacing: -.01em; line-height: 1.45; }
.nw-art-body h2 { margin-top: 22px; font-size: 16px; }
.nw-art-body h3 { margin-top: 18px; font-size: 15.5px; font-weight: 700; }
.nw-art-body h4 { margin-top: 16px; font-size: 15px; font-weight: 700; color: var(--ink-2); }
.nw-art-body > h2:first-child, .nw-art-body > h3:first-child, .nw-art-body > h4:first-child { margin-top: 0; }
.nw-art-body h2 + *, .nw-art-body h3 + *, .nw-art-body h4 + * { margin-top: 8px; }
.nw-art-body strong, .nw-art-body b { font-weight: 700; color: var(--ink); }
.nw-art-body em { font-style: normal; background: linear-gradient(transparent 62%, var(--green-soft) 0); padding: 0 2px; }
.nw-art-body i { font-style: normal; }
.nw-art-body a { color: var(--green-d); text-decoration: underline; text-underline-offset: 2px; }
.nw-art-body ul, .nw-art-body ol { padding-left: 4px; }
.nw-art-body ul > li { position: relative; padding-left: 16px; }
.nw-art-body ul > li::before { content: ""; position: absolute; left: 2px; top: .78em; width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.nw-art-body ol { list-style: decimal; padding-left: 22px; }
.nw-art-body li + li { margin-top: 6px; }
.nw-art-body li::marker { color: var(--ink-3); font-weight: 700; }
.nw-art-body blockquote { padding: 10px 14px; border-left: 3px solid var(--line-hover); border-radius: 0 var(--r-md) var(--r-md) 0; background: var(--soft); color: var(--ink-2); }
.nw-art-body hr { height: 0; margin: 22px 0; border: 0; border-top: 1px solid var(--line); }
/* 正文图：codex 已补 display:block / max-width:100% / height:auto（防 1080 原图溢出）；这里只加居中 + 圆角 + 图文间距 */
.nw-art-body img { margin-left: auto; margin-right: auto; border-radius: 8px; }
.nw-art-body p > img { margin-top: 0; }
.nw-art-body figcaption { margin-top: 6px; font-size: 12px; line-height: 1.6; color: var(--ink-3); text-align: center; }
[data-theme="dark"] .nw-art-body img { border: 1px solid var(--line); }
