/* news01 静态母版修复层：保留原视觉，只修响应式、可访问性和资源表现。 */
:root {
  color-scheme: light;
}

html,
body {
  min-width: 0;
  overflow-x: hidden;
}

body {
  color: #2b2b2b;
  background: #fff;
  font-family: Verdana, Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
}

img {
  max-width: 100%;
  height: auto;
}

a:focus-visible {
  outline: 2px solid #2f83c5;
  outline-offset: 2px;
}

.w960,
.header {
  width: min(960px, calc(100% - 24px));
}

.header_top .w960 {
  width: 100%;
}

.header .logo h1,
.header .logo .brand-title {
  display: block;
  margin: 0;
  padding: 12px 0 0 10px;
  color: #1f5f91;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
}

.header .nav {
  max-width: calc(100% - 220px);
}

.header .nav-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.header .nav-col,
.header .nav-col .nowrap {
  box-sizing: border-box;
  width: auto;
}

.header .nav-col a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-row {
  margin-top: 5px;
  margin-bottom: 5px;
}

.site-summary {
  box-sizing: border-box;
  margin-top: 8px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid #c8def2;
  color: #365f7f;
  background: #f5faff;
  font-size: 16px;
  line-height: 1.7;
}

.content-row .indexl {
  float: left;
  width: 640px;
}

.content-row .indexr {
  float: right;
  width: 310px;
}

.home-image-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
}

.home-image-item {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
}

.home-image-item img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.content-row .main {
  margin-top: 0;
}

.content-row .ml {
  float: left;
  width: 315px;
}

.content-row .mr {
  float: right;
  width: 315px;
}

.tbox dd {
  min-height: 0;
}

.d1 li a,
.c1 li a,
.r1 li a,
.d5 li a {
  overflow-wrap: anywhere;
}

.section-title {
  margin: 0 12px 12px;
  color: #1f5f91;
  font-size: 22px;
  line-height: 1.4;
}

.viewbox .title {
  height: auto;
  min-height: 0;
  overflow: visible;
}

body.articleview .viewbox > .title {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

.viewbox .title h1 {
  padding-top: 16px;
  color: #000;
  font-size: 24px;
  line-height: 1.45;
  text-align: center;
}

.viewbox .content {
  overflow-wrap: anywhere;
}

.viewbox .content img {
  display: block;
  width: auto;
  max-width: 100%;
  margin: 12px auto;
}

.article-relations {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-top: 1px solid #e4e4e4;
  border-bottom: 1px solid #e4e4e4;
  line-height: 1.9;
}

.article-relations a {
  display: block;
}

.empty-state {
  padding: 28px 16px;
  color: #666;
  line-height: 1.8;
  text-align: center;
}

.footer .copyright {
  overflow-wrap: anywhere;
}

/* 桌面首页、栏目、文章与错误页不继承母版的 12px 正文/链接字号。 */
@media (min-width: 721px) {
  .content-row .tbox dt strong a,
  .content-row .tbox dd,
  .content-row .tbox dd li,
  .content-row .tbox dd li a,
  main .place a,
  main .d5 li,
  main .tbox dd,
  main .tbox dd li,
  main .tbox dd li a,
  main .viewbox .info a,
  main .article-relations a,
  main .empty-state,
  main .empty-state p,
  main .empty-state a {
    font-size: 14px;
  }
}

@media (max-width: 980px) {
  .content-row .indexl {
    width: 66.4%;
  }

  .content-row .indexr {
    width: 32.2%;
  }

  .content-row .ml,
  .content-row .mr {
    width: 49.2%;
  }

  .pleft {
    width: calc(100% - 252px);
  }

  .pright {
    width: 244px;
  }
}

@media (max-width: 720px) {
  body {
    box-sizing: border-box;
    padding-right: env(safe-area-inset-right);
    padding-left: env(safe-area-inset-left);
    font-size: 16px;
    line-height: 1.65;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  main.clear,
  .content-row.clear,
  .footer.clear {
    display: flow-root;
    overflow: visible;
  }

  .w960,
  .header {
    width: min(100% - 20px, 960px);
  }

  .header {
    overflow: visible;
  }

  body:not(.index) .header_top {
    display: none;
  }

  .header_top {
    height: auto !important;
    min-height: 44px;
    line-height: 44px;
  }

  .header_top .time {
    float: none;
    display: flex;
    min-height: 44px;
    padding: 0 8px;
    align-items: center;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
  }

  .header_top .time a {
    display: inline-flex;
    min-height: 44px;
    padding: 0 8px;
    align-items: center;
  }

  body.index .header_top .time {
    justify-content: center;
    overflow: visible;
    line-height: 1.5;
    text-align: center;
    white-space: normal;
  }

  .header_top .toplinks {
    display: none;
  }

  .header .logo {
    float: none;
    width: 100%;
    height: auto;
    margin: 0;
    text-align: center;
  }

  .header .logo h1,
  .header .logo .brand-title {
    padding: 14px 0 10px;
    font-size: 28px;
  }

  .header .logo a {
    display: flex;
    min-height: 56px;
    align-items: center;
    justify-content: center;
  }

  .header .nav {
    float: none;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0 0 8px;
    padding: 0;
  }

  .header .nav-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid #dcdddd;
    border-left: 1px solid #dcdddd;
  }

  .header .nav-col {
    display: contents;
  }

  .header .nav-col .nowrap {
    display: contents;
  }

  .header .nav-col a {
    display: flex;
    box-sizing: border-box;
    width: auto;
    min-height: 44px;
    margin: 0;
    padding: 10px 5px;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #dcdddd;
    border-bottom: 1px solid #dcdddd;
    line-height: 24px;
    text-align: center;
  }

  .content-row .indexl,
  .content-row .indexr,
  .content-row .ml,
  .content-row .mr,
  .pleft,
  .pright {
    float: none;
    width: 100%;
  }

  .content-row .ml,
  .content-row .mr,
  .content-row .indexr,
  .pright {
    margin-top: 8px;
  }

  .home-image-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .viewbox .content .endmore {
    box-sizing: border-box;
    width: 100%;
    height: auto;
    min-height: 44px;
    overflow-wrap: anywhere;
  }

  .tbox dt {
    min-height: 44px;
    height: auto;
    line-height: 44px;
  }

  .tbox dt strong {
    height: auto;
    min-height: 44px;
    line-height: 44px;
  }

  .tbox dt strong a {
    display: inline-flex;
    min-height: 44px;
    padding: 0 4px;
    align-items: center;
  }

  .d1 li,
  .c1 li,
  .r1 li {
    min-height: 44px;
    height: auto;
    line-height: 1.55;
  }

  .d1 li a,
  .c1 li a,
  .r1 li a {
    display: flex;
    min-height: 44px;
    padding: 0 8px;
    align-items: center;
    font-size: 16px;
  }

  .d5 li {
    display: flex;
    height: auto;
    min-height: 52px;
    padding: 4px 10px;
    flex-wrap: wrap;
    align-items: center;
    line-height: 1.55;
  }

  .d5 li span {
    float: none;
    display: block;
    width: 100%;
    color: #777;
    line-height: 1.4;
  }

  .d5 li a {
    display: flex;
    min-height: 44px;
    flex: 1 1 auto;
    align-items: center;
    font-size: 16px;
  }

  .place {
    box-sizing: border-box;
    height: auto;
    min-height: 44px;
    padding: 0 10px;
    overflow-x: auto;
    line-height: 44px;
    text-indent: 0;
    white-space: nowrap;
    scrollbar-width: thin;
  }

  .place a {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    padding: 0 6px;
    align-items: center;
    justify-content: center;
  }

  .listbox,
  .viewbox {
    box-sizing: border-box;
    width: 100%;
  }

  .viewbox .title h1 {
    padding: 14px 12px 4px;
    font-size: 22px;
    overflow-wrap: anywhere;
  }

  .viewbox .title {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .viewbox .info {
    height: auto;
    padding: 8px 12px;
    font-size: 16px;
    line-height: 1.6;
    overflow-wrap: anywhere;
  }

  .viewbox .info small {
    color: #555;
    font-size: 1em;
  }

  .viewbox .info a {
    display: inline-flex;
    min-height: 44px;
    padding: 0 6px;
    align-items: center;
  }

  .viewbox .content {
    padding: 14px;
    font-size: 17px;
    line-height: 1.85;
  }

  .article-relations a,
  .empty-state a,
  .footer .copyright a {
    display: inline-flex;
    min-height: 44px;
    padding: 0 6px;
    align-items: center;
  }

  .article-relations a {
    display: flex;
    padding: 3px 0;
  }

  .section-title {
    font-size: clamp(20px, 6vw, 24px);
    overflow-wrap: anywhere;
  }

  .e9 li {
    box-sizing: border-box;
    width: 50%;
  }

  .footer {
    box-sizing: border-box;
    padding-right: 8px;
    padding-left: 8px;
  }
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

@media (max-width: 420px) {
  .header .nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .e9 li {
    width: 100%;
  }
}

/* CODEX_BLUE_DESKTOP_LIST_20261015: keep each desktop link inside its visible row. */
@media (min-width: 721px) {
  .d1 li a {
    display: block;
    line-height: 27px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* CODEX_BLUE_DESKTOP_LOGO_20261015: let long site names determine their own container height. */
@media (min-width: 721px) {
  .header .logo {
    height: auto;
    min-height: 60px;
    overflow: visible;
  }
}

/* CODEX_HOME_TITLE_BALANCE_20261016: 首页长标题独占一行容器，导航另起一行。 */
body.index .header .logo h1 { text-wrap: balance; }
@media (min-width: 721px) {
  body.index .header .logo { float: none; width: 100%; height: auto; min-height: 0; }
  body.index .header .logo > a { display: block; width: 100%; }
  body.index .header .logo h1 { padding: 12px 10px; }
  body.index .header .nav { float: none; clear: both; width: 100%; max-width: none; height: auto; margin: 0 0 12px; }
}

/* CODEX_REPORT_LAYOUT_V2_20261016: 带站名H1的头部适用于首页和404；移除手机旧背景残片。 */
@media (min-width: 721px) {
  .header:has(.logo h1) .logo { float: none; width: 100%; height: auto; min-height: 0; }
  .header:has(.logo h1) .logo > a { display: block; width: 100%; }
  .header:has(.logo h1) .logo h1 { padding: 12px 10px; text-wrap: balance; }
  .header:has(.logo h1) .nav { float: none; clear: both; width: 100%; max-width: none; height: auto; margin: 0 0 12px; }
}
@media (max-width: 720px) {
  body.index .header_top { background-image: none; background-color: #f7f7f7; }
}
body.articleview .viewbox .title h1 { text-wrap: balance; }

/* CODEX_REPORT_BREADCRUMB_V1_20261016: preserve text, allow breadcrumb wrap. */
nav.place { white-space: normal; overflow-x: visible; overflow-wrap: anywhere; height: auto; }

/* CODEX_REPORT_BREADCRUMB_WORD_20261017: 面包屑保留完整中文词组。 */
nav.place { word-break: keep-all; }
