:root {
  --tb--main: #007bff;
  --tb--base: #333;
  --tb--dark: #202935;
  --tb--white: #fff;
  --tb--bdbg: #f4f4f4;
  --tb--tint: #fbfbfb;
  --tb--line: #f3f3f3;
  --tb--gray: #999;
  --header-h: 62px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
  color: var(--tb--base);
  background: #f4f8fe;
  line-height: 1.7;
  font-size: 14px;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--tb--main);
  text-decoration: none;
}

img {
  max-width: 100%;
  border: 0;
  vertical-align: middle;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.clearfix::after {
  content: "";
  display: block;
  clear: both;
}

/* ===== Header（对齐 itavcn） ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  width: 100%;
  background: #fff;
  box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.1);
}

.header .container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
}

.logo {
  margin: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  font-size: 20px;
  line-height: 1;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1a5fb4;
}

.logo img {
  width: auto;
  max-height: 40px;
}

.primary-menu .nav {
  display: flex;
  gap: 28px;
}

.primary-menu a {
  display: block;
  line-height: var(--header-h);
  font-size: 15px;
  color: #333;
}

.primary-menu a:hover,
.primary-menu a.active {
  color: #45b6f7;
}

/* ===== Layout ===== */
.containers {
  position: relative;
  max-width: 960px;
  margin: calc(var(--header-h) + 24px) auto 40px;
  padding: 0 20px;
}

.containers::after {
  display: block;
  clear: both;
  content: "";
}

.content-wrap {
  width: 100%;
}

.contents {
  position: relative;
  min-height: 480px;
  margin-bottom: 20px;
  background-color: var(--tb--white);
  border-radius: 6px;
  padding: 30px;
}

/* ===== List ===== */
.excerpts-title {
  background-color: #fff;
  border-radius: 6px 6px 0 0;
  padding: 0 0 12px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--tb--line);
}

.title h3,
.excerpts-title h3 {
  position: relative;
  display: inline-block;
  font-size: 17px;
  margin: 0;
  padding-left: 17px;
}

.title h3::before,
.excerpts-title h3::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  margin-top: -8px;
  height: 16px;
  width: 4px;
  border-radius: 10px;
  background-color: var(--tb--main);
}

.excerpt {
  position: relative;
  padding: 20px 0 20px 220px;
  overflow: hidden;
  background-color: var(--tb--white);
  border-bottom: 1px solid var(--tb--line);
  min-height: 123px;
}

.excerpt:last-of-type {
  border-bottom: 0;
}

.excerpt .focus {
  float: left;
  margin-left: -200px;
  width: 180px;
  height: 123px;
  display: flex;
  border-radius: 6px;
  overflow: hidden;
  background: #eef3f9;
}

.excerpt .thumb {
  flex: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.excerpt .thumb-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b7c4d6;
  font-size: 13px;
  background: linear-gradient(135deg, #e8eef7, #f5f8fc);
}

.excerpt header {
  position: relative;
  margin-bottom: 10px;
}

.excerpt h2 {
  display: inline;
  font-size: 18px;
  margin: 0;
  font-weight: bold;
  line-height: 1.45;
}

.excerpt h2 a:hover {
  color: var(--tb--main);
}

.excerpt .note {
  font-size: 14px;
  color: #666;
  word-wrap: break-word;
  margin: 0 0 10px;
  max-height: 46px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.excerpt .meta {
  display: flex;
  align-items: center;
  color: var(--tb--gray);
  margin-top: 8px;
  font-size: 13px;
  line-height: 1;
}

.excerpt .meta .author,
.excerpt .meta time {
  margin-right: 15px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.excerpt .author {
  display: inline-flex;
  align-items: center;
}

.excerpt .author .avatar {
  display: block;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 8px;
  background: #d9e6f5;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px 0 4px;
}

.page-btn {
  appearance: none;
  border: 1px solid #e5e5e5;
  background: #fff;
  color: #333;
  border-radius: 0;
  padding: 0 14px;
  height: 34px;
  line-height: 34px;
  font-size: 14px;
  cursor: pointer;
}

.page-btn:hover:not(:disabled) {
  background: #bf0505;
  border-color: #e13f2e;
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-info {
  color: var(--tb--gray);
  font-size: 13px;
}

.status-box {
  padding: 60px 16px;
  text-align: center;
  color: var(--tb--gray);
  font-size: 15px;
}

/* ===== Detail ===== */
.article-header {
  margin-bottom: 30px;
  text-align: center;
}

.article-title {
  margin: 0;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.4;
  color: #222;
}

.article-title a {
  color: inherit;
  cursor: default;
}

.article-meta {
  margin-top: 10px;
  color: #999;
  font-size: 13px;
}

.article-meta .item {
  margin-right: 15px;
}

.article-meta a {
  color: var(--tb--main);
}

.article-content {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  word-wrap: break-word;
}

.article-content p {
  margin: 0 0 1em;
}

.article-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 12px auto;
}

.article-content h2 {
  font-size: 22px;
  margin: 1.4em 0 0.6em;
}

.article-content h3 {
  font-size: 20px;
  margin: 1.3em 0 0.5em;
}

.article-content strong {
  font-weight: 700;
}

.article-content ul,
.article-content ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
  list-style: initial;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}

.article-content th,
.article-content td {
  border: 1px solid #e5eaf0;
  padding: 8px 10px;
}

.xypg-detail-pn {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--tb--line);
  font-size: 14px;
  color: #555;
  line-height: 2.2;
}

.xypg-detail-pn a {
  color: #333;
}

.xypg-detail-pn a:hover {
  color: var(--tb--main);
}

.xypg-detail-pn b {
  color: #222;
  margin-right: 4px;
}

.ttel {
  margin: 28px 0 8px;
  text-align: center;
}

.ttel a {
  display: inline-block;
  min-width: 220px;
  padding: 12px 28px;
  border-radius: 4px;
  background: #007bff;
  color: #fff !important;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-sizing: border-box;
}

.ttel a:hover {
  background: #0066d6;
  color: #fff !important;
}

.back-list {
  margin-top: 24px;
  text-align: center;
}

.back-list a {
  display: inline-block;
  padding: 8px 22px;
  border: 1px solid #e5e5e5;
  font-size: 14px;
  color: #333;
}

.back-list a:hover {
  background: #bf0505;
  border-color: #e13f2e;
  color: #fff;
}

/* ===== Footer ===== */
.site-footer {
  background: #fff;
  border-top: 1px solid #e8eef5;
  padding: 22px 16px 28px;
  text-align: center;
  color: #8896a6;
  font-size: 13px;
  line-height: 1.8;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 767px) {
  .header .logo img { max-height: 34px; }
  .header .container { padding: 0 12px; }
  .primary-menu .nav { gap: 16px; }
  .primary-menu a { font-size: 14px; }

  .containers {
    padding: 0;
    margin-top: calc(var(--header-h) + 12px);
    margin-bottom: 0;
  }

  .contents {
    padding: 0 15px 20px;
    border-radius: 0;
    min-height: 0;
  }

  .excerpts-title {
    padding: 15px 0 10px;
  }

  .excerpt {
    padding: 16px 0;
    min-height: 0;
  }

  .excerpt .focus {
    float: none;
    margin: 0 0 12px;
    width: 100%;
    height: 180px;
  }

  .article-header {
    text-align: left;
    padding: 12px 0 15px;
    margin-bottom: 0;
  }

  .article-title {
    font-size: 20px !important;
  }

  /* 详情页：呼叫按钮固定在屏幕底部，无需下滑即可点击 */
  #detailView:not([hidden]) .ttel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    margin: 0;
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  }

  #detailView:not([hidden]) .ttel a {
    display: block;
    width: 100%;
    min-width: 0;
  }

  /* 给正文与页脚留出底部空间，避免被固定按钮遮挡 */
  #detailView:not([hidden]) #detail {
    padding-bottom: 88px;
  }

  body:has(#detailView:not([hidden])) .site-footer {
    padding-bottom: 88px;
  }
}
