/* Blog 只補詳情／留言與卡片連結樣式，列表格線、日期角標及網站外框沿用前台原稿。 */
[data-blog-page] { --blog-blue: #0071eb; --blog-border: #cbd9e6; }
[data-blog-page] a:focus-visible, [data-blog-page] button:focus-visible, [data-blog-page] summary:focus-visible { outline: 3px solid var(--blog-blue); outline-offset: 4px; }
[data-blog-page] .blog-cover-link { display: block; }
[data-blog-page] .info h4 a { color: inherit; text-decoration: none; }
[data-blog-page] .info h4 a:hover { color: var(--blog-blue); }
[data-blog-page] .info .tag a { display: inline-flex; text-decoration: none; }
[data-blog-page] .info .tag span { white-space: normal; height: auto !important; overflow-wrap: anywhere; }
.blog-filter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 4rem; padding: 1rem 1.5rem; background: #edf6ff; border-radius: .5rem; }
.blog-filter a { color: var(--blog-blue); }
.blog-empty { padding: 2rem 0; color: #627587; }
.blog-article { overflow-wrap: anywhere; }
.blog-title { margin: 0 0 1.5rem; color: var(--blog-blue); font-size: clamp(1.75rem, 3vw, 2.75rem); font-weight: 700; line-height: 1.4; }
.blog-date { display: block; color: #627587; margin-bottom: 2rem; font-weight: 600; }
.blog-cover { display: block; width: 100%; max-height: 44rem; object-fit: cover; border-radius: .8rem; margin-bottom: 2.5rem; }
.blog-summary { max-width: 66rem; border-left: 4px solid var(--blog-blue); padding: 1.5rem 2rem; background: #edf6ff; line-height: 1.9; margin-bottom: 2rem; white-space: pre-line; }
.blog-content { line-height: 1.9; overflow-x: auto; }
.blog-content img { max-width: 100%; height: auto; }
.blog-content table { max-width: 100%; }
.blog-tags { display: flex; flex-wrap: wrap; gap: .6rem; margin: 2rem 0; }
.blog-tags a { padding: .45rem .9rem; border-radius: 2rem; background: #e7f2ff; color: #005aa9; text-decoration: none; font-weight: 600; }
.blog-tags a:hover { background: var(--blog-blue); color: white; }
.blog-button { display: inline-flex; justify-content: center; align-items: center; min-height: 2.75rem; padding: .65rem 1.25rem; border: 1px solid var(--blog-blue); border-radius: .3rem; background: white; color: var(--blog-blue); font: inherit; line-height: 1.5; text-decoration: none; cursor: pointer; }
.blog-button-primary, .blog-button:hover { background: var(--blog-blue); color: white; }
.blog-button:disabled { opacity: .6; cursor: wait; }
.blog-back { margin-top: 1rem; }
.blog-comments { border-top: 1px solid var(--blog-border); margin-top: 4rem; padding-top: 3rem; scroll-margin-top: 7rem; }
.blog-comments > h2 { margin: 0 0 1.5rem; font-size: 2rem; font-weight: 700; }
.blog-feedback:empty { display: none; }
.blog-feedback { margin: 1rem 0; color: #17693b; }
.blog-comment-history { margin-top: 2rem; }
.blog-comment-history > summary { color: #33485a; font-weight: 600; cursor: pointer; margin-bottom: 1rem; }
.blog-comment { border: 1px solid var(--blog-border); border-radius: .7rem; overflow: hidden; margin-bottom: 1.25rem; }
.blog-comment-visitor, .blog-comment-reply { padding: 1.5rem 1.75rem; }
.blog-comment h3 { margin: 0 0 .7rem; color: var(--blog-blue); font-size: 1rem; font-weight: 700; }
.blog-comment h3 small { color: #627587; font-weight: 400; padding-left: .4rem; font-size: .8rem; }
.blog-comment-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; margin: 0 0 .8rem; }
.blog-comment-time { font-size: .875rem; color: #627587; }
.blog-comment-reply { border-top: 1px solid var(--blog-border); background: #e7f2ff; }
.blog-comment-reply h3 { color: #005aa9; }
.blog-comment-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.blog-comment-dialog { position: fixed; inset: 0; margin: auto; width: min(40rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow-y: auto; padding: 0; border: 0; border-radius: .85rem; background: #f8fbff; color: #253344; box-shadow: 0 1.5rem 5rem #142c4940; }
.blog-comment-dialog::backdrop { background: #19344bb3; }
.blog-dialog-heading { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; border-bottom: 1px solid #cbd9e6; }
.blog-dialog-heading h2 { margin: 0; color: #0071eb; font-size: 1.5rem; }
.blog-dialog-heading button { border: 0; border-radius: 50%; background: #0071eb; color: white; width: 2.25rem; height: 2.25rem; font-size: 1.5rem; cursor: pointer; }
.blog-comment-dialog form { padding: 1.5rem; }
.blog-comment-dialog label { display: block; font-weight: 600; margin-bottom: .5rem; }
.blog-comment-dialog input, .blog-comment-dialog textarea { display: block; box-sizing: border-box; width: 100%; padding: .7rem; border: 1px solid #a8bbcf; border-radius: .35rem; background: white; color: inherit; font: inherit; margin-bottom: 1rem; }
.blog-comment-dialog textarea { resize: vertical; min-height: 7rem; }
.blog-comment-dialog input:focus, .blog-comment-dialog textarea:focus { outline: 2px solid #0071eb; outline-offset: 1px; }
.blog-dialog-actions { display: flex; justify-content: flex-end; gap: .8rem; margin-top: 1.5rem; }
.blog-form-error, .blog-field-error { color: #ae2424; margin: 0 0 1rem; }
.blog-comment-dialog [aria-invalid="true"] { border-color: #ae2424; }
@media (max-width: 39.9375rem) {
  .blog-cover { max-height: none; }
  .blog-summary { padding: 1rem; }
  .blog-comment-visitor, .blog-comment-reply { padding: 1.2rem; }
  .blog-comments { margin-top: 2.5rem; padding-top: 2rem; }
  .blog-filter { margin-bottom: 3rem; }
}
