:root{
  --bg:#f8f9fa;
  --card:#ffffff;
  --text:#1a1a1a;
  --text-2:#333333;
  --muted:#666666;
  --border:#eaeaea;

  --primary:#0b57d0;
  --primary-2:#0a4eb9;

  --radius:12px;
  --radius-sm:10px;

  --shadow-1:0 2px 8px rgba(0,0,0,0.04);
  --shadow-2:0 4px 12px rgba(0,0,0,0.08);

  --container:1120px;
}

*{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  margin:0;
  background:var(--bg);
  color:var(--text);
  line-height:1.6;
}

img{ max-width:100%; height:50px; }
a{ color:var(--primary); text-decoration:none; transition:color .2s ease; }
a:hover{ color:var(--primary-2); text-decoration:underline; }

.container{
  max-width:var(--container);
  margin:0 auto;
  padding:18px 14px;
}

/* 跳转链接（可访问性） */
.skip-link{
  position:absolute;
  left:-9999px;
  top:10px;
  background:#000;
  color:#fff;
  padding:10px 12px;
  border-radius:8px;
  z-index:999;
}
.skip-link:focus{
  left:12px;
}

/* Header */
.site-header{
  background:#fff;
  border-bottom:1px solid var(--border);
  box-shadow:0 1px 3px rgba(0,0,0,0.04);
  position:sticky;
  top:0;
  z-index:100;
}
.header-inner{
  display:flex;
  align-items:center;
  gap:12px;
}
.brand a{
  font-weight:700;
  font-size:16px;
  letter-spacing:.2px;
  color:var(--text);
  text-decoration:none;
}
.brand a:hover{ color:var(--text); text-decoration:none; }

.nav{
  display:flex;
  gap:8px;
  overflow-x:auto;
  white-space:nowrap;
  padding:10px 0;
  flex:1;
}
.nav a{
  display:inline-flex;
  align-items:center;
  padding:8px 14px;
  border-radius:999px;
  background:#f5f7fa;
  font-size:14px;
  transition:all .2s ease;
  text-decoration:none;
  flex-shrink:0;
}
.nav a:hover{ background:#e8f0fe; }
.nav a.active{
  background:var(--primary);
  color:#fff;
}
.nav a.active:hover{ background:var(--primary-2); }

/* 桌面端允许换行 */
@media (min-width: 900px){
  .container{ padding:20px 16px; }
  .nav{ overflow:visible; white-space:normal; flex-wrap:wrap; }
}

/* 通用卡片 */
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:22px;
  margin:18px 0;
  box-shadow:var(--shadow-1);
  transition:box-shadow .2s ease, transform .2s ease;
}
.card:hover{
  box-shadow:var(--shadow-2);
}

.muted{
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}

/* 通知 */
.notice{
  border-radius:12px;
  padding:12px 14px;
  margin:14px 0 18px;
  border:1px solid var(--border);
  background:#fff;
}
.notice--success{
  border-color:#b4e2c0;
  background:#f0fff4;
}

/* 首页 Hero */
.hero{
  padding:10px 0 6px;
}
.hero-kicker{
  font-size:12px;
  color:var(--muted);
  letter-spacing:.2px;
}
.hero-title{
  margin:8px 0 0;
  font-size:28px;
  line-height:1.2;
}
.hero-desc{
  margin:10px 0 0;
  color:var(--text-2);
  max-width:60ch;
}

/* 布局：移动默认单列，桌面双列 */
.layout{
  display:grid;
  grid-template-columns:1fr;
  gap:18px;
}
@media (min-width: 1024px){
  .layout{
    grid-template-columns: 2fr 1fr;
    gap:24px;
    align-items:start;
  }
}

/* section 标题 */
.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin: 6px 0 14px;
}
.section-title{
  margin:0;
  font-size:18px;
  line-height:1.2;
}

/* 列表卡片 */
.post-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}
@media (min-width: 900px){
  .post-grid{
    grid-template-columns:1fr;
    gap:14px;
  }
}
.post-grid--two{
  grid-template-columns:1fr;
}
@media (min-width: 900px){
  .post-grid--two{
    grid-template-columns: repeat(2, 1fr);
  }
}

.post-card{
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  box-shadow:0 1px 5px rgba(0,0,0,0.04);
  overflow:hidden;
}
.post-card__link{
  display:block;
  padding:16px 16px 14px;
  text-decoration:none;
  color:inherit;
}
.post-card__link:hover{ text-decoration:none; }
.post-card__title{
  margin:0;
  font-size:16px;
  line-height:1.35;
  color:var(--text);
  font-weight:650;
}
.post-card__excerpt{
  margin:10px 0 0;
  color:var(--text-2);
  font-size:14px;
  line-height:1.6;
}
.post-card__meta{
  margin-top:12px;
  color:var(--muted);
  font-size:13px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
}
.meta-dot{ opacity:.7; }
.meta-pill{
  display:inline-flex;
  align-items:center;
  padding:2px 8px;
  border-radius:999px;
  background:#f5f7fa;
  border:1px solid #eef1f4;
  font-size:12px;
  color:#556;
}
.post-card__cta{
  margin-top:12px;
  font-size:14px;
  font-weight:600;
  color:var(--primary);
}
.post-card__link:hover .post-card__cta{ color:var(--primary-2); }

/* 侧边栏 */
.sidebar-title{
  font-weight:700;
  margin-bottom:10px;
}
.sidebar-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:8px;
}
.sidebar-link{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:8px 10px;
  border-radius:10px;
  background:#f8fafc;
  border:1px solid #eef1f4;
  text-decoration:none;
  color:inherit;
}
.sidebar-link:hover{
  background:#eef5ff;
  border-color:#d6e6ff;
  text-decoration:none;
}
.sidebar-link__title{
  font-size:14px;
  line-height:1.4;
}
.sidebar-link__meta{
  flex-shrink:0;
  font-size:12px;
}

/* 标签 */
.tag{
  display:inline-block;
  padding:4px 12px;
  background:#e8f0fe;
  border-radius:16px;
  font-size:13px;
  margin-right:8px;
  margin-bottom:8px;
  color:var(--primary);
  border:1px solid #d0e2ff;
}
.tag:hover{
  background:#d0e2ff;
  text-decoration:none;
}
.tag-cloud{
  display:flex;
  flex-wrap:wrap;
}

/* 页面标题 */
.page-head .kicker{
  font-size:12px;
  color:var(--muted);
  letter-spacing:.2px;
}
.page-title{
  margin:8px 0 0;
  font-size:26px;
  line-height:1.2;
}

/* 文章详情排版（保留你原有的“中文内容排版友好”风格） */
.article-title{
  margin:0 0 10px;
  font-size:28px;
  line-height:1.2;
}
.meta-info{
  display:flex;
  flex-wrap:wrap;
  gap:16px;
  margin: 12px 0 20px;
  padding-bottom:18px;
  border-bottom:1px solid #f0f0f0;
  color:var(--muted);
  font-size:14px;
}
.meta-item{
  display:flex;
  align-items:center;
  gap:6px;
}

.article-content{
  font-size:16px;
  line-height:1.8;
  color:var(--text-2);
}
.article-content p{
  margin:0 0 1.2em 0;
  text-align:justify;
  text-justify:inter-ideograph;
  text-indent:2em;
  word-break:break-word;
  overflow-wrap:break-word;
}
.article-content p:first-of-type{ text-indent:0; }
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4{
  margin: 1.8em 0 .8em 0;
  font-weight:650;
  line-height:1.3;
  color:var(--text);
  text-indent:0;
}
.article-content h1{
  font-size:28px;
  margin-top:.5em;
  padding-bottom:.5em;
  border-bottom:1px solid #eee;
}
.article-content h2{
  font-size:22px;
  margin-top:2em;
  padding-bottom:.3em;
  border-bottom:1px solid #f0f0f0;
}
.article-content h3{ font-size:18px; color:#2c3e50; }
.article-content h4{ font-size:16px; color:#34495e; }
.article-content ol,
.article-content ul{
  margin:1em 0;
  padding-left:2em;
  text-indent:0;
}
.article-content li{ margin:.5em 0; line-height:1.7; }
.article-content blockquote{
  margin:1.5em 0;
  padding:1em 1.5em;
  border-left:4px solid var(--primary);
  background:var(--bg);
  border-radius:0 8px 8px 0;
  font-style:italic;
  text-indent:0;
}
.article-content code{
  font-family:'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
  background:#f5f7fa;
  padding:2px 6px;
  border-radius:4px;
  font-size:14px;
  color:#d14;
}

/* 分页区 */
.paginator{
  margin-top:14px;
}

/* Footer */
.site-footer{
  margin-top:40px;
  padding:28px 0 18px;
  background:#fff;
  border-top:1px solid var(--border);
  color:var(--muted);
}
.footer-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:18px;
}
@media (min-width: 900px){
  .footer-grid{ grid-template-columns: 1.2fr .8fr; }
}
.footer-title{
  font-weight:800;
  color:var(--text);
  margin-bottom:8px;
}
.footer-links{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.footer-bottom{
  padding:12px 0 0;
}

/* 滚动条美化（可选） */
::-webkit-scrollbar{ width:8px; height:8px; }
::-webkit-scrollbar-track{ background:#f1f1f1; border-radius:4px; }
::-webkit-scrollbar-thumb{ background:#c1c1c1; border-radius:4px; }
::-webkit-scrollbar-thumb:hover{ background:#a8a8a8; }

::selection{
  background-color: rgba(11, 87, 208, 0.15);
  color: var(--text);
}

/* 响应式微调 */
@media (max-width: 768px){
  .container{ padding:16px 12px; }
  .card{ padding:18px 14px; border-radius:var(--radius-sm); }
  .hero-title{ font-size:24px; }
  .article-title{ font-size:24px; }
  .article-content{ font-size:15px; line-height:1.7; }
  .article-content p{ text-indent:1.5em; }
}

/* 降低动画偏好 */
@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; }
}

/* 打印 */
@media print{
  body{ background:white; color:black; font-size:12pt; }
  .card{ border:none; box-shadow:none; }
  .nav, .site-footer, .skip-link{ display:none; }
  .article-content p{ text-indent:2em; }
}


/* 密集流式布局 */
.tight-grid {
  gap: 12px !important; /* 调整卡片间距 */
  margin-top: 15px;
}

/* 紧凑型卡片定义 */
.post-card--compact {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
}

.post-card--compact .post-card__link {
  padding: 14px 16px; 
  height: 100%;
  display: flex;
  flex-direction: column;
}

.post-card--compact .post-card__title {
  font-size: 15.5px; /* 稍微缩小标题以腾出空间 */
  line-height: 1.4;
  margin-bottom: 6px;
}

.post-card--compact .post-card__excerpt {
  margin: 0 0 10px 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
}

.post-card--compact .post-card__meta {
  margin-top: auto; /* 将元数据推至底部 */
  font-size: 12px;
  gap: 8px;
}

/* 优化后的 CTA 按钮 */
.post-card--compact .post-card__cta {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  border-top: 1px solid var(--border); /* 添加分割线增加精致感 */
  padding-top: 8px;
  text-align:right;
}

/* 响应式：平板以上开启双列 */
@media (min-width: 768px) {
  .post-grid--two {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}