/* ============================================================
   牧场纪事（xnnews）专用样式 · 2026-10-10
   ------------------------------------------------------------
   本文件只服务 xnnews/ 目录下的文章页与 newslist.html 列表页：
     ① 文章正文排版 .article-body / .art-*  / .art-back / .art-next
     ② 列表页矮页头 .page-hero--plain
     ③ 列表页表格目录 .news-table / .news-table-wrap / .news-intro
   依赖：必须先加载站点公共样式 ../assets/css/style.css
         （:root 变量 --ink / --green / --line 等都在那里定义）
   注意：此文件已随 _.py 生成脚本维护，改样式请改这里或生成脚本。
   ============================================================ */

/* ===== 牧场纪事（xnnews）：正文排版 · 2026-10-10 ===== */
.article-body { max-width: 760px; margin-inline: auto; }
.article-body p {
  font-size: 17px; line-height: 1.95; color: var(--ink-2);
  margin: 0 0 22px; text-align: justify; letter-spacing: .01em;
}
.article-body .art-lead { font-size: 17.5px; color: var(--ink); }
.article-body .art-digest {
  background: var(--cream-2); border-left: 3px solid var(--gold);
  color: var(--ink-2); font-size: 15.8px; line-height: 1.8;
  padding: 16px 20px; margin: 0 0 30px; border-radius: 0 var(--radius) var(--radius) 0;
}
.article-body .art-punch {
  font-weight: 700; color: var(--ink); font-size: 17.5px;
  padding: 16px 0 16px 18px; border-left: 3px solid var(--gold); margin: 30px 0;
}
.article-body h2 {
  font-size: 21px; color: var(--ink); line-height: 1.5;
  margin: 42px 0 16px; padding-left: 12px; border-left: 3px solid var(--gold);
}
.article-body h3 {
  font-size: 18px; color: var(--ink); line-height: 1.55;
  margin: 32px 0 12px; padding-left: 10px; border-left: 3px solid var(--gold-soft);
}
.article-body blockquote {
  margin: 26px 0; padding: 16px 20px; background: var(--green-soft);
  border-radius: var(--radius); color: var(--ink-2);
  font-size: 16.5px; line-height: 1.85;
}
.article-body figure { margin: 30px 0; }
.article-body figure { text-align: center; }
.article-body figure img {
  display: block; width: auto; max-width: 100%; max-height: 660px;
  margin-inline: auto; border-radius: var(--radius-lg); background: var(--line-soft);
}
.article-body figcaption {
  font-size: 13.6px; color: var(--muted); text-align: center;
  margin-top: 12px; line-height: 1.72;
}
.article-body .art-end {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 14.5px; line-height: 1.85;
}
.art-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.art-back, .art-next {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; color: var(--green); font-weight: 600;
}
.art-back:hover, .art-next:hover { color: var(--green-2); }
.art-next span { color: var(--ink); font-weight: 400; }
.art-next .arrow, .art-back .arrow { color: var(--gold); font-weight: 700; }
@media (max-width: 700px) {
  .article-body p { font-size: 16.4px; line-height: 1.9; }
  .article-body h2 { font-size: 19px; margin: 34px 0 14px; }
  .article-body .art-digest { font-size: 15px; padding: 14px 16px; }
  .art-nav { flex-direction: column; align-items: flex-start; }
}

/* 列表页专用：矮页头（不带实拍大图；标题与面包屑同排一行）
   顶部固定条 = topbar 40 + nav 72 = 112px（≤860px 时 topbar 隐藏 → 72px）。
   内容在可见绿条内垂直居中：padding-top 与 padding-bottom 各留一半余量。 */
.page-hero--plain { min-height: 0; padding: calc(var(--nav-h) + 72px) 0 32px; }
.page-hero--plain .container {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.page-hero--plain .crumb { order: 2; margin-left: auto; }
.page-hero--plain h1 { font-size: clamp(22px, 2.4vw, 28px); margin: 0; text-shadow: none; }
@media (max-width: 860px) {
  .page-hero--plain { padding: calc(var(--nav-h) + 30px) 0 30px; }
}
@media (max-width: 640px) {
  .page-hero--plain .container { display: block; }
  .page-hero--plain .crumb { margin-left: 0; }
  .page-hero--plain h1 { margin: 8px 0 0; }
}

/* ===== 牧场纪事（xnnews）：列表页 · 表格式目录 ===== */
.news-intro { max-width: 760px; font-size: 15.6px; line-height: 1.9; color: var(--muted); margin: 0 0 30px; }
.news-table-wrap {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
}
.news-table { width: 100%; border-collapse: collapse; }
.news-table thead th {
  background: var(--cream-2); color: var(--ink-2);
  font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .12em;
  text-align: left; padding: 15px 24px; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.news-table td { padding: 17px 24px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.news-table tbody tr { transition: background .25s var(--ease); }
.news-table tbody tr:hover { background: var(--green-soft); }
.news-table tbody tr:last-child td { border-bottom: 0; }
.news-table .nt-num { width: 72px; font-family: var(--serif); font-size: 14px; font-weight: 700; color: var(--muted); letter-spacing: .06em; }
.news-table .nt-date { width: 152px; font-family: var(--serif); font-size: 15px; font-weight: 700; color: var(--green); letter-spacing: .04em; white-space: nowrap; }
.news-table .nt-title a {
  display: block; font-size: 16.4px; line-height: 1.62; font-weight: 500;
  color: var(--ink); transition: color .25s var(--ease);
}
.news-table .nt-title a:hover { color: var(--green); }
.news-table .nt-plat { width: 128px; }
.news-table .nt-plat .tl-tag { margin-left: 0; }

@media (max-width: 760px) {
  .news-table thead { display: none; }
  .news-table, .news-table tbody, .news-table tr, .news-table td { display: block; width: 100%; }
  .news-table tr { padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
  .news-table tbody tr:last-child { border-bottom: 0; }
  .news-table tbody tr:hover { background: transparent; }
  .news-table td { padding: 0; border: 0; }
  .news-table .nt-num { display: none; }
  .news-table .nt-date { width: auto; font-size: 13px; margin-bottom: 7px; }
  .news-table .nt-plat { width: auto; margin-top: 9px; }
}

/* ===== 论文页：元信息表 + PDF 内嵌 · 2026-10-10 ===== */
.article-body .paper-meta {
  background: var(--cream-2); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg); padding: 22px 24px; margin: 0 0 34px;
}
.article-body .paper-meta-t {
  margin: 0 0 14px; padding-left: 0; border-left: 0; font-size: 17px;
}
.article-body .paper-meta dl {
  margin: 0; display: grid; grid-template-columns: 60px 1fr; gap: 10px 14px;
}
.article-body .paper-meta dt {
  font-size: 13.6px; font-weight: 700; color: var(--green);
  letter-spacing: .04em; line-height: 1.75;
}
.article-body .paper-meta dd {
  margin: 0; font-size: 14.6px; line-height: 1.8; color: var(--ink-2);
}
.article-body .paper-meta dd a { color: var(--green-2); text-decoration: underline; }

.pdf-embed {
  margin: 34px 0 12px; border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; background: var(--cream-2);
}
.pdf-embed-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; padding: 13px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.pdf-embed-name { font-size: 13.6px; color: var(--muted); }
.pdf-embed-dl {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14.5px; font-weight: 600; color: var(--green);
}
.pdf-embed-dl .arrow { color: var(--gold); font-weight: 700; }
.pdf-frame {
  display: block; width: 100%; height: 78vh; min-height: 520px;
  border: 0; background: #fff;
}
.article-body .pdf-embed-tip {
  margin: 0; padding: 12px 18px; font-size: 13.4px; color: var(--muted);
  text-align: left; border-top: 1px solid var(--line-soft);
}
.article-body .pdf-embed-tip a { color: var(--green-2); text-decoration: underline; }

@media (max-width: 640px) {
  .pdf-frame { height: 62vh; min-height: 380px; }
  .article-body .paper-meta { padding: 18px 16px; }
  .article-body .paper-meta dl { grid-template-columns: 52px 1fr; }
}

/* ===== 文章页顶部横幅压低至约 1/3 · 2026-10-10 =====
   站点公共 .page-hero 是 min-height clamp(520px,66vh,680px) + 上下各 96px 内边距；
   文章页不需要那么大的头图，这里只压 xnnews 的文章页，列表页 .page-hero--plain 不受影响。 */
/* 注意：--nav-h 只有 72px（不含 40px 的 topbar），而 .site-header 是 fixed、实高 112px，
   所以顶部留白必须 ≥112px，否则面包屑会被头部盖住。这里取 116px。 */
.page-hero:not(.page-hero--plain) {
  min-height: 0;
  padding: calc(var(--nav-h) + 44px) 0 10px;
}
.page-hero:not(.page-hero--plain) .crumb { font-size: 12.4px; line-height: 1.5; }
.page-hero:not(.page-hero--plain) .eyebrow { margin-top: 4px !important; }
.page-hero:not(.page-hero--plain) h1 {
  font-size: clamp(20px, 2.2vw, 27px); line-height: 1.38; margin: 6px 0 8px;
}
.page-hero:not(.page-hero--plain) p { font-size: 14.4px; line-height: 1.6; }
.page-hero:not(.page-hero--plain) .page-hero-media img { object-position: center 42%; }

/* 窄屏 topbar 已隐藏，头部实高只有 72px，顶部留白可相应收回 */
@media (max-width: 640px) {
  .page-hero:not(.page-hero--plain) { padding: calc(var(--nav-h) + 20px) 0 10px; }
  .page-hero:not(.page-hero--plain) .crumb { display: none; }
}
