/* 协会官网 Demo —— 少量自定义样式(Tailwind 之外) */

html { scroll-behavior: smooth; }

/* 网格子项允许收缩(修复长标题 truncate 撑破布局) */
main .grid > * { min-width: 0; }


::selection { background: #123a6e; color: #fff; }

/* 文章正文排版(详情页 / 单页型栏目) */
.rich { color: #333; font-size: 15.5px; line-height: 2; }
.rich p { margin: 0.9em 0; }
.rich img { max-width: 100%; height: auto; margin: 1em auto; border-radius: 4px; }
.rich table { width: 100%; border-collapse: collapse; margin: 1.2em 0; }
.rich td, .rich th { border: 1px solid #d9e8f8; padding: 8px 12px; }
.rich a { color: #1f57a3; text-decoration: underline; }
.rich h1, .rich h2, .rich h3, .rich h4 { color: #0e2f59; font-weight: 700; margin: 1.4em 0 0.6em; line-height: 1.6; }
.rich h2 { font-size: 1.25em; }
.rich h3 { font-size: 1.1em; }
.rich ul, .rich ol { padding-left: 1.8em; margin: 0.9em 0; }
.rich ul { list-style: disc; }
.rich ol { list-style: decimal; }
.rich strong { color: #0e2f59; }

/* 搜索命中高亮 */
mark { background: #fde68a; color: inherit; padding: 0 2px; border-radius: 2px; }

/* 走马灯(友情链接提示条, 可选) */
.marquee-track { animation: marquee 28s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* 首页横幅装饰网格 */
.hero-grid {
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* 淡入 */
.fade-up { animation: fadeUp .6s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 文章列表行 hover 下划线延展 */
.news-item .ttl { position: relative; }
.news-item .ttl::after {
  content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: #c9a35c; transition: width .25s ease;
}
.news-item:hover .ttl::after { width: 100%; }
