/* DURIX — Blog：/resources/blog/ 落地页（page-blog.php）、
   原生分类归档（category.php）与原生单篇（single.php）共用样式。
   前缀 blog-；只使用 tokens.css 中的变量，不改动 style.css 的全局原子
   （wrap / section / label / mono / btn / btn-dark / btn-light / cta-banner）。
   规则：1px 边框、无阴影无渐变、圆角 0–3px、动效 180–280ms 且克制、
   延续全局 section 留白、≤1024px 单列可用、标签行窄屏可换行。 */

.blog-page {
  background-color: var(--pw);
}

/* 1. Hero */
.blog-hero {
  background-color: var(--w);
  border-bottom: 1px solid var(--line);
  padding: clamp(52px, 6.5vw, 100px) 0 clamp(40px, 5vw, 72px);
}

.blog-hero-title {
  font-size: clamp(34px, 4.6vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: 26px;
  max-width: 26ch;
  overflow-wrap: break-word;
}

.blog-hero .slogan-cut {
  margin-bottom: 26px;
}

.blog-hero-lead {
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.7;
  max-width: 70ch;
  margin-bottom: 0;
}

/* 分类描述：term description 可能自带段落与链接 */
.blog-hero-lead-rich p {
  font-size: inherit;
  line-height: inherit;
  margin-bottom: 12px;
}

.blog-hero-lead-rich p:last-child {
  margin-bottom: 0;
}

/* 2. Category bar (landing page) — 窄屏整行换行 */
.blog-cats {
  padding: clamp(28px, 3.2vw, 44px) 0 clamp(20px, 2.4vw, 32px);
}

.blog-cat-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px clamp(16px, 2vw, 28px);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.blog-cat-bar-label {
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}

.blog-cat-list,
.blog-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.blog-cat-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background-color: var(--w);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--g);
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.blog-cat-link:hover,
.blog-cat-link:focus {
  border-color: var(--steel);
  color: var(--r);
}

/* 当前分类：只加一条 3px 红边（无阴影），总宽度不变 */
.blog-cat-link.is-current {
  border-color: var(--g);
  border-left: 3px solid var(--r);
  padding-left: 11px;
  color: var(--g);
  font-weight: 600;
}/* 3. Index: toolbar + grid */
.blog-index {
  padding: clamp(20px, 2.4vw, 36px) 0 0;
}

.blog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.blog-count {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 32px);
}

/* 4. Card (landing page + category archive) */
.blog-card {
  background-color: var(--w);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  transition: border-color 0.24s ease, transform 0.24s ease;
}

.blog-card:hover {
  border-color: var(--steel);
  transform: translateY(-2px);
}

.blog-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card-media {
  aspect-ratio: 4 / 3;
  border-bottom: 1px solid var(--line);
  background-color: var(--gray-block);
  overflow: hidden;
}

.blog-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.blog-card:hover .blog-card-media img {
  transform: scale(1.02);
}

.blog-card .blog-figure-note {
  margin: 0;
  padding: 8px 22px 0;
}

.blog-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 22px 24px;
}

.blog-card-cat {
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--r);
}

.blog-card-title {
  font-size: 19px;
  line-height: 1.32;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: var(--g);
  margin: 10px 0 10px;
  transition: color 0.2s ease;
}

.blog-card:hover .blog-card-title {
  color: var(--r);
}

.blog-card-excerpt {
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--body);
  margin: 0 0 20px;
}

.blog-card-meta {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* 5. Figure notes (placeholders only) */
.blog-figure-note {
  margin: 10px 0 0;
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}/* 6. Pagination */
.blog-pagination {
  margin-top: clamp(36px, 4vw, 56px);
}

.blog-pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.blog-pagination li a,
.blog-pagination li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 1px;
  background-color: var(--w);
  font-size: 13px;
  font-weight: 600;
  color: var(--g);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.blog-pagination li a:hover,
.blog-pagination li a:focus {
  border-color: var(--r);
  color: var(--r);
}

.blog-pagination li span.current {
  border-color: var(--g);
  background-color: var(--g);
  color: var(--w);
}

/* 7. Empty state */
.blog-empty {
  position: relative;
  max-width: 840px;
  background-color: var(--w);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: clamp(28px, 3.6vw, 52px) clamp(24px, 3.4vw, 48px) clamp(28px, 3.6vw, 52px) clamp(28px, 4vw, 56px);
}

.blog-empty::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--r);
}

.blog-empty-title {
  font-size: clamp(22px, 2.4vw, 30px);
  margin-bottom: 14px;
}

.blog-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* 8. Single: hero tags, meta, back link, media */
.blog-tag-list {
  margin-bottom: 22px;
}

.blog-tag-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background-color: var(--pw);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--g);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.blog-tag-link:hover,
.blog-tag-link:focus {
  border-color: var(--r);
  color: var(--r);
}

.blog-single-hero .blog-hero-title {
  max-width: 34ch;
}

.blog-single-meta {
  margin-bottom: 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--g);
  transition: color 0.2s ease, gap 0.2s ease;
}

.blog-back:hover,
.blog-back:focus {
  color: var(--r);
  gap: 12px;
}

.blog-arrow {
  color: var(--r);
}.blog-media {
  background-color: var(--gray-block);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.blog-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-media-16x10 {
  aspect-ratio: 16 / 10;
}

.blog-hero-figure {
  margin: clamp(28px, 3.6vw, 52px) 0 0;
}

/* 9. Single body: WYSIWYG */
.blog-single-body {
  padding: clamp(44px, 5.5vw, 84px) 0 0;
}

.blog-rich {
  max-width: 78ch;
  font-size: 17px;
  line-height: 1.75;
  color: var(--body);
}

.blog-rich > *:last-child {
  margin-bottom: 0;
}

.blog-rich p {
  font-size: inherit;
  line-height: inherit;
  margin-bottom: 20px;
}

.blog-rich h2 {
  font-size: clamp(24px, 2.4vw, 32px);
  margin-bottom: 16px;
}

.blog-rich h3,
.blog-rich h4 {
  font-size: clamp(19px, 2vw, 24px);
  margin-bottom: 14px;
}

.blog-rich ul,
.blog-rich ol {
  margin: 0 0 20px;
  padding-left: 22px;
}

.blog-rich li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.blog-rich ul li::marker {
  color: var(--r);
}

.blog-rich a {
  color: var(--r);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-rich a:hover {
  color: var(--rd);
}

.blog-rich strong {
  color: var(--g);
  font-weight: 600;
}

.blog-rich blockquote {
  margin: 0 0 20px;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--r);
  color: var(--g);
}

.blog-rich blockquote p:last-child {
  margin-bottom: 0;
}

.blog-rich hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 32px 0;
}

.blog-rich img {
  border-radius: 2px;
}

.blog-rich table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 15px;
}

.blog-rich th,
.blog-rich td {
  border-bottom: 1px solid var(--line);
  padding: 12px 16px 12px 0;
  text-align: left;
  vertical-align: top;
}

.blog-rich th {
  color: var(--g);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--steel);
}/* 10. Related notes */
.blog-related-block {
  margin-top: clamp(44px, 5vw, 72px);
  padding-top: clamp(34px, 4vw, 54px);
  border-top: 1px solid var(--line);
}

.blog-block-head {
  margin-bottom: 22px;
}

.blog-block-head .label {
  margin-bottom: 12px;
}

.blog-block-title {
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.2;
  margin-bottom: 0;
}

.blog-related {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.blog-related-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  background-color: var(--w);
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: border-color 0.2s ease;
}

.blog-related-item:hover,
.blog-related-item:focus {
  border-color: var(--r);
}

.blog-related-title {
  font-size: 15.5px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--g);
  transition: color 0.2s ease;
}

.blog-related-item:hover .blog-related-title {
  color: var(--r);
}

.blog-related-meta {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.blog-related-item .blog-arrow {
  margin-top: auto;
  transition: transform 0.2s ease;
}

.blog-related-item:hover .blog-arrow {
  transform: translateX(3px);
}

/* 11. Password form (WordPress native) */
.blog-password {
  max-width: 620px;
  margin-top: 4px;
}

.blog-password .post-password-form {
  margin: 0;
}

.blog-password .post-password-form > p:first-of-type {
  font-size: 15px;
  line-height: 1.65;
  color: var(--body);
  margin-bottom: 16px;
}

.blog-password .post-password-form > p:last-of-type {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.blog-password .post-password-form label {
  font-size: 14px;
  color: var(--g);
  margin: 0;
}

.blog-password .post-password-form input[type="password"] {
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 1px;
  background-color: var(--pw);
  font-family: inherit;
  font-size: 15px;
  color: var(--g);
}

.blog-password .post-password-form input[type="submit"] {
  height: 48px;
  padding: 0 24px;
  border: 1px solid var(--g);
  border-radius: 1px;
  background-color: var(--g);
  color: var(--w);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.22s ease, border-color 0.22s ease;
}

.blog-password .post-password-form input[type="submit"]:hover {
  background-color: var(--r);
  border-color: var(--r);
}

/* 12. Responsive: 单列在窄屏可用，标签行与分页自动换行 */
@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-card {
    max-width: 620px;
  }

  .blog-related {
    grid-template-columns: 1fr;
  }

  .blog-rich {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .blog-hero-title,
  .blog-single-hero .blog-hero-title {
    max-width: none;
  }

  .blog-cat-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .blog-toolbar {
    margin-bottom: 24px;
  }

  .blog-card-body {
    padding: 18px 18px 20px;
  }

  .blog-card .blog-figure-note {
    padding: 8px 18px 0;
  }

  .blog-empty {
    padding: 28px 22px 28px 26px;
  }
}