/* ==========================================================================
   博客列表 / 文章详情  zhoulifen.cn
   ========================================================================== */

/* ---------- 工具条 ---------- */
.blog-tools {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  margin-bottom: 6px;
}
.blog-search { position: relative; flex: 1 1 300px; min-width: 220px; }
.blog-search input {
  width: 100%; padding: 13px 18px 13px 44px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--white); color: var(--ink);
  font-size: 15px; font-family: inherit; outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.blog-search input::placeholder { color: var(--ink-3); }
.blog-search input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(140,185,200,.15); }
.blog-search .si {
  position: absolute; left: 17px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--ink-3); pointer-events: none;
}
#filters button { padding: 10px 18px; border-radius: 999px; font-size: 14px; }

.blog-count {
  font-size: 14px; color: var(--ink-3);
  margin: 20px 0 4px; letter-spacing: .01em;
}
.blog-count b { color: var(--ink-2); font-weight: 600; }

/* ---------- 年份分组 ---------- */
.year-block { margin-top: 22px; }
.year-head {
  display: flex; align-items: baseline; gap: 14px;
  padding: 12px 0 8px;
}
.year-head .y {
  font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: -.01em;
}
.year-head .y::before { content: "·"; margin-right: 8px; color: var(--teal); font-weight: 700; }
.year-head .lead { flex: 1; height: 1px; background: var(--line); transform: translateY(-5px); }
.year-head .n { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- 列表行 ---------- */
.bl-item {
  position: relative;
  display: grid;
  grid-template-columns: 58px 96px 1fr auto;
  gap: 16px; align-items: baseline;
  padding: 15px 8px; border-bottom: 1px dashed var(--line);
  border-radius: 6px;
  transition: background .18s ease;
}
.bl-item:hover { background: rgba(210,234,238,.28); }
.bl-item[hidden] { display: none; }
.bl-date {
  font-size: 13.5px; color: var(--ink-3);
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.bl-tag {
  justify-self: start;
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  padding: 3px 9px; border-radius: 5px;
  background: rgba(210,234,238,.6); color: var(--teal-deep);
  white-space: nowrap;
}
.bl-tag[data-cat="training"]    { background: rgba(214,238,224,.85); color: #4C8A6B; }
.bl-tag[data-cat="trauma"]      { background: rgba(255,243,212,.85); color: #A9812F; }
.bl-tag[data-cat="integration"] { background: rgba(255,190,35,.16); color: #9A7415; }
.bl-tag[data-cat="business"]    { background: rgba(214,229,236,.95); color: #4C7C8F; }
.bl-hit { position: absolute; inset: 0; z-index: 1; }
.bl-title {
  font-size: 16.5px; font-weight: 600; color: var(--ink);
  line-height: 1.6; transition: color .18s ease;
}
.bl-item:hover .bl-title { color: var(--teal-deep); }
.bl-read {
  font-size: 12.5px; color: var(--ink-3); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.year-block[hidden] { display: none; }

/* ---------- 文章详情页 ---------- */
.post-wrap { max-width: 760px; margin: 0 auto; padding: 0 28px; }
.post-head { padding: 56px 0 30px; border-bottom: 1px solid var(--line); }
.post-head .crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 18px; }
.post-head .crumb a { color: var(--teal-deep); }
.post-head h1 {
  font-size: 32px; line-height: 1.45; letter-spacing: -.02em; margin-bottom: 18px;
}
.post-head .pm {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  font-size: 13.5px; color: var(--ink-3);
}
.post-body { padding: 34px 0 20px; }
.post-body p { font-size: 17px; line-height: 2; color: var(--ink-2); margin-bottom: 1.15em; }
.post-body h2 { font-size: 22px; margin: 40px 0 16px; }
.post-body h3 { font-size: 19px; margin: 32px 0 12px; }
.post-body h2:empty, .post-body h3:empty, .post-body h2 br:only-child { display: none; }
.post-body img { margin: 26px auto; border-radius: 12px; }
.post-body blockquote {
  margin: 26px 0; padding: 4px 0 4px 20px;
  border-left: 3px solid var(--teal); color: var(--ink-2);
}
.post-body blockquote p { margin-bottom: .6em; }
.post-body ul, .post-body ol { margin: 0 0 1.2em 1.3em; }
.post-body li { margin-bottom: .5em; line-height: 1.9; }
.post-body strong { color: var(--ink); font-weight: 600; }
.post-body a { color: var(--teal-deep); text-decoration: underline; text-underline-offset: 3px; }
.post-body hr { border: none; border-top: 1px dashed var(--line); margin: 34px 0; }
.post-body table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 15px; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.post-body th { background: var(--bg-2); color: var(--ink); }

.post-foot {
  margin: 20px 0 10px; padding: 26px 0;
  border-top: 1px solid var(--line);
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  font-size: 14px; color: var(--ink-3);
}
.post-foot a.btn { font-size: 14px; padding: 10px 20px; }

@media (max-width: 720px) {
  .bl-item { grid-template-columns: 52px 1fr; gap: 8px 12px; padding: 14px 2px; }
  .bl-read { display: none; }
  .bl-title { grid-column: 2; font-size: 15.5px; }
  .bl-tag { grid-row: 2; grid-column: 1 / 2; justify-self: start; }
  .bl-tag { font-size: 10.5px; }
  .post-head h1 { font-size: 25px; }
  .post-body p { font-size: 16px; }
}
