body {
  margin: 0;
  background: #fff;
  color: #303030;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.article-detail-body {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 750px;
  margin: 0 auto;
}

/* 标题字体：阿里妈妈方圆体 VF 子雅（wght=400 / BEVL=100 圆体，仅“人民网健康服务平台”9 字），
   由 tools/build-topbar-assets.py 生成；占位符在服务端启动时替换为哈希文件名，与 CSS 同目录 */
@font-face {
  font-family: "rmjk-topbar";
  src: url("topbar-font.18dd0884ffba.woff2") format("woff2");
  font-display: swap;
}

/* 顶条沿用原横幅 800x124 比例，内部元素按宽度等比缩放；
   min() 上限对应 750px 容器下的取值，避免桌面端继续放大 */
.topbar {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  width: 100%;
  aspect-ratio: 800 / 106;
  padding-left: 18px; /* 与 .ad-act 正文左缘同轴 */
  background: #ffffff;
  /* 底部分隔：还原图片版顶条的柔和投影（原版为烘焙进图片的灰带，此处更轻） */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* 人民网 logo 保持图片形式 */
.topbar::before {
  content: "";
  display: block;
  width: min(16.2vw, 121px);
  aspect-ratio: 314 / 120;
  background: url("topbar-logo.c4f748bdad88.png") no-repeat left center / contain;
}

/* 频道名沿用系统默认字体 */
.topbar-brand {
  margin-left: min(2.125vw, 16px);
  color: #cc282e;
  font-size: min(4.02vw, 30px);
  font-weight: 500;
  line-height: 1;
}

.topbar-title {
  margin-left: min(5.5vw, 41px);
  color: #6d6d6d;
  font-family: "rmjk-topbar", sans-serif;
  font-size: min(4vw, 30px);
  line-height: 1;
}

.ad-act {
  box-sizing: border-box;
  width: 100%;
  padding: 20px 18px 40px;
}

.tit {
  margin-bottom: 10px;
  color: #333641;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.45;
  text-align: justify;
}

.actTime {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  color: #999999;
  font-size: 13px;
  line-height: 1.5;
}

.afor {
  margin-right: 16px;
}

.atts {
  margin-left: 8px;
  white-space: nowrap;
}

.rich.article-body {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  -webkit-text-size-adjust: none;
}

.rich.article-body p {
  margin: 0 0 20px;
  color: #303030;
  overflow-wrap: anywhere;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.8;
  text-align: justify;
  -webkit-text-size-adjust: none;
}

.rich.article-body h2 {
  margin: 30px 0 14px;
  color: #303030;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.5;
}

.rich.article-body h3 {
  margin: 26px 0 12px;
  color: #303030;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
}

.rich.article-body ul,
.rich.article-body ol {
  margin: 0 0 20px;
  padding-left: 1.5em;
  font-size: 18px;
  line-height: 1.8;
}

.rich.article-body img,
.rich.article-body video,
.rich.article-body table {
  max-width: 100%;
}

.rich.article-body img,
.rich.article-body video {
  display: block;
  width: 100% !important;
  height: auto;
  margin: 20px auto;
}

.rich.article-body a {
  color: inherit;
}

@media (min-width: 750px) {
  /* 桌面端两侧灰底 + 内容列白底卡片（与主 H5 的 PC 适配一致，见 src/app.less）：
     顶条底部分隔线此前是页面唯一通栏边界，视觉上比内缩的正文宽一圈；
     卡片化后顶条与正文同属一个版心 */
  body {
    background: #f4f6fb;
  }

  .article-detail-body {
    min-height: 100vh;
    background: #ffffff;
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.12);
  }

  .topbar {
    aspect-ratio: auto;
    height: 64px;
    padding-left: 30px;
    /* 桌面端去掉底部分隔线，顶条与正文仅靠留白分隔（移动端保留分隔线） */
    box-shadow: none;
  }

  .topbar::before {
    width: 84px;
  }

  .topbar-brand {
    margin-left: 8px;
    font-size: 19px;
  }

  .topbar-title {
    margin-left: 22px;
    font-size: 20px;
  }

  .ad-act {
    /* 标题与顶条间距由 30px 放宽到 44px，缓解标题顶着顶条的压迫感 */
    padding: 44px 30px 56px;
  }

  .tit {
    font-size: 24px;
    line-height: 36px;
  }

  .actTime {
    font-size: 14px;
  }

  .rich.article-body p {
    font-size: 18px;
    line-height: 32px;
  }

  .rich.article-body h2 {
    margin: 28px 0 12px;
    font-size: 22px;
    line-height: 32px;
  }

  .rich.article-body h3 {
    margin: 24px 0 10px;
    font-size: 20px;
    line-height: 30px;
  }
}

/* 多图详情保持图片原比例，并沿用现有页面的最大版心宽度。 */
.article-detail-body.article-gallery { background: #111; color: #fff; min-height: 100vh; }
.article-gallery .topbar { display: none; }
.article-gallery .ad-act { padding: 0; }
.article-gallery .tit { margin: 18px 16px; font-size: 20px; line-height: 30px; color: #fff; }
.article-gallery .gallery-figure { margin: 0 0 22px; }
.article-gallery .gallery-image { display: block; width: 100%; height: auto; }
.article-gallery .gallery-caption { margin: 8px 16px 0; font-size: 14px; line-height: 22px; color: #ddd; white-space: pre-wrap; overflow-wrap: break-word; }
