/* ============ 新闻模块 ============
   变量全部来自站点主题（site.css / theme.css 提供），
   深浅主题与 8 套站点主题自动跟随。 */

.n-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

/* ---------- 头部 ---------- */
.n-head { margin-bottom: 18px; }
.n-title { margin: 0 0 4px; font-size: 28px; font-weight: 650; letter-spacing: -.3px; color: var(--ink); }
.n-sub { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- 来源筛选 ---------- */
.n-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.n-tab {
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: color .15s, border-color .15s, background .15s;
}
.n-tab:hover { color: var(--accent); border-color: var(--accent); }
.n-tab.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent, #fff);
  font-weight: 600;
}

/* ---------- 按天分组 ---------- */
.n-day { margin-bottom: 22px; }
.n-day-head {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 10px 2px;
  letter-spacing: .04em;
}

/* ---------- 列表 ---------- */
.n-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* 每条独立成卡片：明确的边界，避免长列表糊成一团 */
.n-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 15px 17px;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  transition: border-color .15s, background .12s;
}
.n-item:hover {
  background: var(--surface-2);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.n-item-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.n-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
}
.n-item:hover .n-item-title { color: var(--accent); }
.n-item-desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.n-item-meta {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.n-chip {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid var(--line);
  color: var(--muted);
}
/* 各来源一点辨识色（只描边，主题切换不受影响） */
.n-chip.src-bbc      { border-color: color-mix(in srgb, #b80000 45%, transparent); color: #b80000; }
.n-chip.src-guardian { border-color: color-mix(in srgb, #05696b 45%, transparent); color: #05696b; }
.n-chip.src-aj       { border-color: color-mix(in srgb, #fa9000 55%, transparent); color: #c96f00; }
.n-chip.src-npr      { border-color: color-mix(in srgb, #2571d4 45%, transparent); color: #2571d4; }
.n-time { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.n-chip.n-cat { border-style: dashed; }
.n-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- 空状态 ---------- */
.n-empty {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 42px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.n-empty p { margin: 0 0 8px; }
.n-empty-sub { font-size: 12px; opacity: .75; }
.n-empty code {
  background: var(--surface-2);
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 11.5px;
}

/* ---------- 详情页 ---------- */
.n-back {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}
.n-back:hover { color: var(--accent); }

.n-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 28px 24px;
}
.n-a-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.n-a-title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 680;
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: -.2px;
}
.n-a-orig-title {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
}
.n-a-body { max-width: 46em; }
.n-a-body p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink);
}
.n-muted { color: var(--muted); }

/* 英文原文折叠 */
.n-orig {
  margin: 20px 0 0;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}
.n-orig summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  user-select: none;
}
.n-orig summary:hover { color: var(--accent); }
.n-orig p {
  margin: 12px 0 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
}

/* 原文链接（用户要求：附在最后） */
.n-a-foot {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.n-a-foot > p {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
}
.n-link-btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent, #fff);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: filter .15s;
}
.n-link-btn:hover { filter: brightness(1.08); }
.n-link-url {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 400;
  opacity: .72;
  word-break: break-all;
}

/* ---------- 页脚 ---------- */
.n-foot {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px 40px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- 手机端 ---------- */
@media (max-width: 640px) {
  .n-wrap { padding: 20px 14px 40px; }
  .n-item { flex-direction: column; gap: 8px; }
  .n-item-meta { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
  .n-card { padding: 20px 16px 18px; }
  .n-a-title { font-size: 20px; }
}

/* ============================================================
   2026-11-13 首页改版：48 小时轮换切片 + 六大板块
   ============================================================ */
.n-home {
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 20px 52px;
}
.n-head-home { margin-bottom: 14px; }
.n-head-home .n-sub b { color: var(--ink); font-weight: 650; }

/* ---------- 板块色彩（只做点缀，跟随主题） ---------- */
.cat-ai       { --nc: #7c5cff; }
.cat-tech     { --nc: #2f9e8f; }
.cat-world    { --nc: #3b82f6; }
.cat-business { --nc: #d99a2b; }
.cat-science  { --nc: #17a2b8; }
.cat-culture  { --nc: #d4568a; }

/* ---------- 轮换切片 ---------- */
.n-hero {
  position: relative;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120% 140% at 88% -20%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    linear-gradient(160deg, var(--surface) 0%, var(--bg-2, var(--bg)) 100%);
}
.n-hero-stage { position: relative; height: 340px; }

.n-hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 28px 32px 60px;
  text-decoration: none;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity .55s ease, transform .55s ease;
}
.n-hero-slide.on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  z-index: 2;
}
.n-hero-glow {
  position: absolute;
  right: -110px;
  top: -170px;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--nc, var(--accent)) 30%, transparent), transparent 68%);
  filter: blur(4px);
  z-index: -1;
  opacity: .85;
  animation: nflow 14s ease-in-out infinite alternate;
}
@keyframes nflow {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-26px, 20px, 0) scale(1.08); }
}
.n-hero-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 780px;
}
.n-hero-tags {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.n-hero-cat {
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .02em;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--nc, var(--accent));
  background: color-mix(in srgb, var(--nc, var(--accent)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--nc, var(--accent)) 34%, transparent);
}
.n-hero-time { font-size: 11.5px; color: var(--muted); }
.n-hero-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: clamp(21px, 2.7vw, 30px);
  font-weight: 650;
  line-height: 1.36;
  letter-spacing: -.2px;
  color: var(--ink);
}
.n-hero-slide:hover .n-hero-title { color: var(--nc, var(--accent)); }
.n-hero-sum {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13.5px;
  line-height: 1.72;
  color: var(--muted);
  max-width: 660px;
}
.n-hero-more {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--nc, var(--accent));
  opacity: .9;
}
.n-hero-more i {
  font-style: normal;
  display: inline-block;
  transition: transform .2s;
}
.n-hero-slide:hover .n-hero-more i { transform: translateX(4px); }

/* 轮换导航 */
.n-hero-nav {
  position: absolute;
  right: 18px;
  bottom: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
}
.n-hero-arrow {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: color .15s, border-color .15s;
}
.n-hero-arrow:hover { color: var(--accent); border-color: var(--accent); }
.n-hero-dots { display: flex; align-items: center; gap: 6px; }
.n-hero-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  cursor: pointer;
  transition: width .25s ease, background .25s ease;
}
.n-hero-dot:hover { background: var(--muted); }
.n-hero-dot.on { width: 20px; background: var(--accent); }

/* 进度条 */
.n-hero-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: color-mix(in srgb, var(--line) 55%, transparent);
  z-index: 5;
}
.n-hero-progress i {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: 0 50%;
  background: var(--accent);
  animation: nprog 6s linear forwards;
}
.n-hero:hover .n-hero-progress i { animation-play-state: paused; }
@keyframes nprog {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ---------- 板块 tab ---------- */
.n-cats {
  display: flex;
  gap: 8px;
  padding: 2px 0 14px;
  margin-bottom: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.n-cats::-webkit-scrollbar { display: none; }
.n-cat-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.n-cat-btn:hover { color: var(--accent); border-color: var(--accent); }
.n-cat-btn.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent, #fff);
  font-weight: 600;
}
.n-cat-n { font-size: 11px; opacity: .72; }

/* ---------- 板块区块 ---------- */
.n-sec { margin-bottom: 26px; }
.n-sec.is-hidden { display: none; }
.n-sec.is-enter { animation: nfade .38s ease both; }
@keyframes nfade {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: none; }
}
.n-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.n-sec-head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: -.1px;
}
.n-sec-bar {
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--nc, var(--accent));
}
.n-more {
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
}
.n-more:hover { color: var(--accent); }

/* ---------- 卡片网格 ---------- */
.n-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}
.n-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 15px 16px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.n-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 52%, var(--line));
  box-shadow: 0 10px 22px -18px rgba(0, 0, 0, .6);
}
.n-card-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.58;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.n-card:hover .n-card-title { color: var(--accent); }
.n-card-sum {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.68;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.n-card-foot {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ---------- 新增来源的辨识色 ---------- */
.n-chip.src-techcrunch   { border-color: color-mix(in srgb, #0a9e01 45%, transparent); color: #0a9e01; }
.n-chip.src-tc-main      { border-color: color-mix(in srgb, #0a9e01 45%, transparent); color: #0a9e01; }
.n-chip.src-theverge     { border-color: color-mix(in srgb, #7c3aed 45%, transparent); color: #7c3aed; }
.n-chip.src-verge-main   { border-color: color-mix(in srgb, #7c3aed 45%, transparent); color: #7c3aed; }
.n-chip.src-arstechnica  { border-color: color-mix(in srgb, #ff4e00 45%, transparent); color: #ff4e00; }
.n-chip.src-engadget     { border-color: color-mix(in srgb, #4b8bff 45%, transparent); color: #4b8bff; }
.n-chip.src-bbc-biz      { border-color: color-mix(in srgb, #b80000 45%, transparent); color: #b80000; }
.n-chip.src-guardian-biz { border-color: color-mix(in srgb, #05696b 45%, transparent); color: #05696b; }
.n-chip.src-cnbc         { border-color: color-mix(in srgb, #005594 45%, transparent); color: #005594; }
.n-chip.src-wsj-markets  { border-color: color-mix(in srgb, #6f6f6f 45%, transparent); color: #6f6f6f; }
.n-chip.src-bbc-sci      { border-color: color-mix(in srgb, #b80000 45%, transparent); color: #b80000; }
.n-chip.src-sciencedaily { border-color: color-mix(in srgb, #1f7a8c 45%, transparent); color: #1f7a8c; }
.n-chip.src-nasa         { border-color: color-mix(in srgb, #0b3d91 45%, transparent); color: #0b3d91; }
.n-chip.src-bbc-ent      { border-color: color-mix(in srgb, #b80000 45%, transparent); color: #b80000; }
.n-chip.src-npr-culture  { border-color: color-mix(in srgb, #2571d4 45%, transparent); color: #2571d4; }
.n-chip.src-variety      { border-color: color-mix(in srgb, #c8102e 45%, transparent); color: #c8102e; }

/* ---------- 手机端 ---------- */
@media (max-width: 700px) {
  .n-home { padding: 20px 14px 40px; }
  .n-hero-stage { height: 430px; }
  .n-hero-slide { padding: 22px 20px 62px; }
  .n-hero-title { font-size: 22px; -webkit-line-clamp: 4; }
  .n-hero-sum { -webkit-line-clamp: 3; }
  .n-hero-glow { width: 300px; height: 300px; right: -90px; top: -110px; }
  .n-grid { grid-template-columns: 1fr; }
  .n-sec-head h2 { font-size: 16px; }
}

/* ---------- 降低动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  .n-hero-slide { transition: none; }
  .n-hero-glow { animation: none; }
  .n-hero-progress i { animation: none; transform: scaleX(1); opacity: .3; }
  .n-sec.is-enter { animation: none; }
}

/* ============ 分类全量列表的分页 ============ */
.n-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 30px 0 6px;
}
.n-pg-btn {
  min-width: 34px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
  color: var(--ink-2);
  text-decoration: none;
  text-align: center;
  background: var(--surface);
  transition: border-color .2s, color .2s;
}
a.n-pg-btn:hover { border-color: var(--accent); color: var(--accent); }
.n-pg-btn.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.n-pg-gap { color: var(--muted); padding: 0 2px; }
.n-more-static { color: var(--muted); font-size: 13px; }

/* ---- 正文图片（20261130 转存方案） ---- */
.n-a-img{margin:16px 0;}
.n-a-img img{display:block;width:100%;max-width:100%;height:auto;border-radius:10px;}
.n-orig .n-a-img img{max-height:420px;width:auto;max-width:100%;}

/* ---- 原文直接展示（20261201） ---- */
.n-orig-inline{margin-top:20px;padding:16px 0 4px;border-top:1px solid #263A52;}
.n-orig-h{font-size:15px;font-weight:700;color:#8FA6BF;margin:0 0 12px;letter-spacing:.03em;}
.n-orig-inline p{color:#9FB3C8;}
