/* 延續官網色彩與版面，文章內容、卡片及側欄樣式集中於此。 */
.blog-page { color: #333; }
.blog-page .main-nav a[aria-current='page'] { color: var(--green); font-weight: 600; }
.blog-heading { padding: 100px 0 65px; }
.blog-heading-panel { background: #ffffff9c; padding: 14px 12px; }
.blog-heading h1 { color: #292929; font-size: 36px; font-weight: 500; line-height: 1.5; }
.blog-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; color: #667272; }
.blog-heading h1 + .blog-breadcrumb { margin-top: 8px; }
.blog-breadcrumb a:hover { color: var(--orange); }
.blog-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(230px, 1fr); gap: 30px; margin-bottom: 90px; align-items: start; }
.blog-main { min-width: 0; }
.listing-summary { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px; color: #657474; margin-bottom: 20px; }
.listing-summary a { color: var(--green); }
.listing-intro { padding: 15px; background: #fffb; margin-bottom: 20px; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; align-items: stretch; }
.post-card { min-width: 0; display: flex; flex-direction: column; padding: 10px; background: #ffffffb5; }
.post-thumb { display: block; overflow: hidden; background: #e5eded; }
.post-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .3s; }
.post-thumb:hover img { transform: scale(1.03); }
.post-card-copy { display: flex; flex-direction: column; flex: 1; padding-block: 15px 4px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 3px 5px; align-items: baseline; color: #777; font-size: 12px; line-height: 1.7; }
.post-meta a { color: #667878; }
.post-meta a:hover { color: var(--orange); }
.post-meta > span { margin-left: 2px; }
.view-count { white-space: nowrap; }
.view-count > span[aria-hidden] { font-size: 13px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 4px 9px; margin: 10px 0; }
.post-tags a { font-size: 12px; color: #ad6800; }
.post-tags a:hover { color: var(--green); }
.post-card h2 { font-size: 18px; font-weight: 500; line-height: 1.65; margin: 5px 0 15px; overflow-wrap: anywhere; }
.post-card h2 a:hover { color: var(--orange); }
.post-excerpt { color: #666; font-size: 14px; line-height: 1.9; margin-bottom: 20px; overflow-wrap: anywhere; }
.post-more { text-align: right; margin-top: auto; color: var(--green); font-size: 14px; }
.post-more span[aria-hidden] { padding-left: 5px; }
.blog-pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 40px 0 15px; }
.blog-pagination a { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #c8d9d9; background: #fff; color: var(--green); }
.blog-pagination a[aria-current='page'], .blog-pagination a:hover { color: #fff; background: var(--green); border-color: var(--green); }
.blog-sidebar { min-width: 0; }
.blog-search { display: flex; background: #ffffffb5; padding: 10px; margin-bottom: 35px; }
.blog-search input { min-width: 0; width: 100%; height: 38px; border: 1px solid #ddd; border-right: 0; padding: 8px; background: #fff; color: #333; font-size: 12px; border-radius: 0; }
.blog-search button { flex: 0 0 35px; border: 1px solid #ddd; border-left: 0; padding: 8px; background: #fff; color: var(--green); }
.blog-search button:hover { color: var(--orange); }
.blog-search svg { fill: none; stroke: currentColor; stroke-width: 2; width: 20px; height: 20px; vertical-align: middle; }
.blog-search input:focus { outline: 2px solid var(--orange); outline-offset: -2px; }
.mobile-search { display: none; }
.sidebar-panel { padding: 14px 12px; margin-bottom: 32px; background: #ffffffa3; }
.sidebar-panel > h2 { font-size: 20px; color: #444; font-weight: 500; border-bottom: 1px solid #dce2e2; padding-bottom: 10px; margin-bottom: 15px; }
.category-tree, .category-tree ul { list-style: none; }
.category-tree > li { margin-bottom: 8px; }
.category-tree a { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 15px; color: #566565; padding: 4px 0; }
.category-tree a:hover { color: var(--orange); }
.category-tree a span { color: #8b9999; font-size: 12px; }
.category-tree details { padding-left: 16px; }
.category-tree summary { cursor: pointer; font-size: 12px; color: #778b8b; padding: 4px 0; }
.popular-list { list-style: none; }
.popular-list > li { display: flex; gap: 12px; margin-bottom: 18px; }
.popular-list > li:last-child { margin-bottom: 0; }
.popular-thumb { flex: 0 0 58px; }
.popular-thumb img { width: 58px; height: 58px; object-fit: cover; }
.popular-list li > div { min-width: 0; }
.popular-list li > div > a { font-size: 13px; line-height: 1.6; font-weight: 500; display: block; }
.popular-list time { display: block; font-size: 11px; color: #8c9696; margin-top: 4px; }
.post-rank { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; margin-right: 5px; border-radius: 50%; background: var(--green); color: #fff; font-size: 11px; }
.sidebar-line { background: var(--green); color: #fff; text-align: center; padding: 25px 15px; }
.sidebar-line h2 { font-size: 19px; font-weight: 500; }
.sidebar-line p { font-size: 14px; line-height: 1.9; margin: 12px 0 20px; }
.sidebar-line a { display: inline-block; background: #06a947; color: #fff; font-size: 13px; padding: 9px 12px; border-radius: 24px; }
.blog-footer-cta { margin-bottom: 22px; font-size: 17px; }
.blog-footer-cta a { display: inline-block; padding: 7px 14px; border: 1px solid #ffffff70; border-radius: 24px; margin-left: 8px; color: #fff; font-size: 14px; }
.blog-footer-cta a:hover { background: #fff; color: var(--green); }
.empty-state { grid-column: 1 / -1; padding: 45px 24px; text-align: center; background: #fffc; }
.empty-state h2, .empty-state h3 { font-size: 22px; font-weight: 500; color: var(--green); }
.empty-state p { font-size: 15px; margin: 15px 0; color: #6f7a7a; }
.empty-state a { color: var(--green); }
.search-results > h2 { font-size: 25px; color: var(--green); font-weight: 500; overflow-wrap: anywhere; }
#search-summary { margin: 10px 0 24px; color: #788484; font-size: 14px; }

/* 文章全文 */
.article-detail { background: #ffffffc2; padding: 24px; min-width: 0; overflow-wrap: anywhere; }
.article-detail > .post-meta { font-size: 13px; }
.article-detail > h1 { font-size: 30px; line-height: 1.6; font-weight: 500; color: #303b3b; margin: 15px 0 20px; }
.article-detail > .post-tags a { font-size: 13px; }
.article-share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 20px 0; }
.article-share > span { font-size: 13px; color: #889393; margin-right: 5px; }
.article-share button { border: 1px solid #b7cece; color: var(--green); background: #fff; padding: 5px 10px; font-size: 12px; border-radius: 4px; }
.article-share button:hover { background: var(--green); color: #fff; }
.share-status { flex-basis: 100%; font-size: 13px; color: #697d7d; }
.share-status:empty { display: none; }
.article-toc { padding: 16px 20px; background: #f1f6f5; border-left: 3px solid var(--orange); margin: 25px 0; }
.article-toc summary { cursor: pointer; font-size: 17px; font-weight: 500; color: var(--green); }
.article-toc ol { margin: 12px 0 0; padding-left: 20px; font-size: 14px; color: #5e7474; }
.article-toc li { margin-bottom: 7px; }
.article-toc .toc-h3 { margin-left: 12px; }
.article-body { color: #333; font-size: 16px; line-height: 1.95; }
.article-body p { margin: 1.2em 0; }
.article-body h1, .article-body h2 { color: var(--green); font-size: 25px; line-height: 1.6; margin: 1.6em 0 .7em; }
.article-body h3 { color: var(--green); font-size: 21px; line-height: 1.6; margin: 1.4em 0 .6em; }
.article-body h4 { color: var(--green); font-size: 18px; margin: 1.2em 0 .6em; }
.article-body ul, .article-body ol { padding-left: 1.6em; margin: 1em 0; }
.article-body li { margin-bottom: .4em; }
.article-body img { max-width: 100%; width: auto; height: auto; margin: 20px auto; }
.article-body img[role='button'] { cursor: zoom-in; }
.article-body a { color: #ad6800; text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--green); }
.article-body table { display: block; max-width: 100%; border-collapse: collapse; overflow: auto; }
.article-body td, .article-body th { border: 1px solid #bdcccc; padding: 8px 12px; }
.article-body blockquote { margin: 1em 0; padding: 12px 20px; border-left: 4px solid var(--orange); background: #f5f8f7; }
.article-body pre { white-space: pre-wrap; word-break: break-word; }
.related-posts { margin: 35px 0; padding-top: 20px; border-top: 1px solid #d5e2e1; }
.related-posts h2 { color: var(--green); font-size: 22px; font-weight: 500; margin-bottom: 15px; }
.related-posts ul { padding-left: 20px; }
.related-posts li { margin: 10px 0; color: #526f6f; }
.author-profile { display: flex; gap: 16px; align-items: center; padding: 18px; margin: 30px 0; background: #edf3f2; }
.author-profile img { flex: 0 0 60px; width: 60px; height: 60px; object-fit: cover; border-radius: 50%; }
.author-profile a { color: var(--green); font-size: 16px; font-weight: 600; }
.author-profile p { color: #7c8b8b; font-size: 13px; margin-top: 3px; }
.article-cta { padding: 30px 20px; text-align: center; border: 1px solid #b2cbcb; background: #f8fbfa; }
.article-cta h2 { color: var(--green); font-size: 24px; font-weight: 500; }
.article-cta p { color: #809292; margin: 8px 0 20px; }
.article-cta .button { min-height: 48px; max-width: 280px; font-size: 16px; }
.snapshot-note { color: #8c9999; font-size: 12px; text-align: right; margin: 20px 0; }
.adjacent-posts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 30px 0 0; padding-top: 20px; border-top: 1px solid #d7e2e2; }
.adjacent-posts a { font-size: 14px; line-height: 1.8; color: #4c7373; }
.adjacent-posts small { display: block; color: #95a4a4; font-size: 12px; margin-bottom: 5px; }
.article-comments { margin-top: 35px; padding: 25px; background: #ffffffb5; }
.article-comments h2 { font-size: 25px; font-weight: 500; margin-bottom: 20px; }
.article-comments p { font-size: 15px; color: #7a8989; margin-bottom: 14px; }
.article-comments a { color: var(--green); font-size: 15px; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 1100px) {
  .post-grid { gap: 20px; }
  .blog-layout { gap: 24px; grid-template-columns: minmax(0, 1fr) 240px; }
  .post-card h2 { font-size: 16px; }
}
@media (max-width: 992px) {
  .blog-layout { grid-template-columns: minmax(0, 1fr); }
  .blog-heading { padding: 50px 0 32px; }
  .blog-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  .blog-sidebar > .blog-search { display: none; }
  .sidebar-line { grid-column: 1 / -1; }
  .sidebar-panel { margin-bottom: 0; }
  .mobile-search { display: flex; margin: 24px 0 0; }
  .mobile-search input { font-size: 16px; }
  .post-card h2 { font-size: 18px; }
}
@media (max-width: 768px) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog-heading h1 { font-size: 30px; }
  .article-detail { padding: 22px; }
  .article-detail > h1 { font-size: 26px; }
  .article-body h2 { font-size: 23px; }
}
@media (max-width: 576px) {
  .blog-heading { padding-top: 28px; }
  .blog-heading h1 { font-size: 27px; }
  .blog-heading-panel { padding: 12px; }
  .post-grid { grid-template-columns: 1fr; gap: 24px; }
  .post-card { padding: 12px; }
  .post-card h2 { font-size: 21px; margin-bottom: 14px; }
  .post-excerpt { font-size: 15px; }
  .post-meta { font-size: 13px; gap: 4px 6px; }
  .post-tags a { font-size: 13px; }
  .blog-sidebar { grid-template-columns: 1fr; }
  .sidebar-line { grid-column: auto; }
  .popular-list li > div > a { font-size: 15px; }
  .popular-thumb, .popular-thumb img { flex-basis: 64px; width: 64px; height: 64px; }
  .article-detail { padding: 18px; }
  .article-detail > h1 { font-size: 24px; }
  .article-toc { padding: 14px; }
  .article-body { font-size: 16px; }
  .article-body h2 { font-size: 22px; }
  .article-body h3 { font-size: 20px; }
  .article-body img { margin-block: 15px; }
  .article-share { gap: 6px; }
  .article-share > span { flex-basis: 100%; }
  .adjacent-posts { grid-template-columns: 1fr; gap: 15px; }
  .article-comments { padding: 20px; }
  .blog-footer-cta a { margin: 10px 0 0; }
  .blog-footer-cta { display: flex; flex-direction: column; align-items: center; }
}
@media print {
  .blog-heading { padding: 20px 0; }
  .blog-layout { display: block; }
  .blog-sidebar, .article-share, .article-comments, .mobile-search { display: none; }
  .article-detail { padding: 0; background: #fff; }
  .article-toc { break-inside: avoid; }
}
