/* Shared type, color and navigation come from /jemdoc.css. */
.blog-page button, .blog-page input, .blog-page select { font: inherit; }
.blog-page button { cursor: pointer; }
.blog-page [hidden] { display: none !important; }
.blog-page :focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }
.blog-content { width: 100%; max-width: 1080px; margin: 0 auto; padding: 42px 24px 40px; }
.blog-heading { margin-bottom: 18px; }
.blog-intro { color: var(--muted); }
.blog-heading h1 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 16px; margin: 0 0 8px; font-size: 24px; line-height: 1.7; letter-spacing: .2px; }
.archive-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 0 0 14px; border-bottom: 1px solid var(--border); }
.category-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.category-nav a { display: inline-flex; align-items: baseline; gap: 7px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 14px; }
.category-nav a:hover { background: var(--card); color: var(--text); }
.category-nav a[aria-current] { color: var(--link); background: #e7eefc; border-color: #c8d8f5; }
.category-nav span { font-size: 12px; font-variant-numeric: tabular-nums; }
.search-form { display: flex; align-items: center; gap: 7px; width: 205px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 8px; }
.search-form:focus-within { border-color: var(--link); }
.search-icon { font-size: 21px; line-height: 1; color: var(--muted); }
.search-form input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); font-size: 14px; padding: 2px 0; }
.search-form input::placeholder { color: var(--muted); }
.archive-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; padding: 14px 0; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.date-filter, .filter-field { display: flex; align-items: center; gap: 8px; min-width: 0; }
.archive-filters input, .archive-filters select { min-width: 0; max-width: 100%; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text); padding: 5px 8px; font-size: 13px; }
.archive-filters input[type="date"] { width: 134px; }
.filter-field select { max-width: 260px; }
.reset-filters { border: 0; background: transparent; color: var(--link); padding: 5px 0; font-size: 13px; }
.reset-filters:hover { text-decoration: underline; }
.archive-caption { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; color: var(--muted); font-size: 13px; }
.archive-caption > :last-child { white-space: nowrap; }
.post-card { display: flex; align-items: center; gap: 20px; margin-bottom: 12px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
.post-card-main { flex: 1; min-width: 0; }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.post-meta time { padding: 2px 8px; border-radius: 999px; color: #245ab5; background: #eaf0ff; font-weight: 700; }
.post-meta a { font-size: inherit; }
.post-meta > span { color: var(--muted); }
.post-card h2 { display: block; margin: 9px 0 6px; font-size: 17px; line-height: 1.5; letter-spacing: 0; overflow-wrap: anywhere; }
.post-card h2 a { display: block; color: var(--text); font-size: inherit; }
.post-card h2 a:hover { color: var(--link); }
.post-summary { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 10px 0 0; }
.post-tags li { margin: 0; padding: 1px 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 11px; }
.post-tags a { color: inherit; font-size: inherit; }
.post-tags a:hover { color: var(--link); }
.post-cover { width: 145px; height: 102px; object-fit: cover; border: 1px solid var(--border); border-radius: 10px; flex-shrink: 0; }
.post-arrow { color: var(--link); font-size: 18px; }
.empty-state { padding: 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
.empty-state h2 { margin: 0 0 8px; font-size: 17px; }
.empty-state p { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin: 22px 0; color: var(--muted); font-size: 13px; }
.pagination a { font-size: inherit; }
.pagination > :last-child { text-align: right; }
.search-status { margin: 10px 0 16px; color: var(--muted); font-size: 14px; }
.load-more { display: block; margin: 22px auto; padding: 5px 15px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--link); font-size: 14px; }
.blog-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--border); }
.blog-footer a { font-size: 13px; }
.post-detail { max-width: 900px; margin: 0 auto; }
.back-link { font-size: 13px; }
.post-header { padding: 20px 0; border-bottom: 1px solid var(--border); }
.post-header h1 { margin: 12px 0; font-size: 26px; line-height: 1.5; overflow-wrap: anywhere; }
.post-deck { margin: 0; color: var(--muted); line-height: 1.7; }
.post-body { margin-top: 24px; line-height: 1.85; overflow-wrap: anywhere; }
.post-body h2, .post-body h3, .post-body h4 { display: block; line-height: 1.5; margin: 28px 0 12px; }
.post-body h2 { font-size: 22px; }
.post-body h3 { font-size: 18px; }
.post-body p, .post-body li { line-height: inherit; }
.post-body a { text-decoration: underline; text-underline-offset: 3px; }
.post-body img { display: block; max-width: 100%; height: auto; margin: 22px auto; border-radius: 8px; }
.post-body p:has(> a > img) { margin-bottom: 8px; }
.post-body p:has(> a > img) img { margin-bottom: 0; }
.post-body p:has(> a > img) + p:has(> em:only-child) { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.post-body p:has(> a > img) + p:has(> em:only-child) a { font-size: inherit; font-weight: inherit; }
.post-body pre { overflow-x: auto; padding: 14px 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); line-height: 1.6; }
.post-body code { font: .85em/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--card); padding: 2px 4px; }
.post-body pre code { padding: 0; }
.post-body blockquote { margin: 20px 0; padding: 10px 16px; border-left: 3px solid var(--link); border-radius: 0 8px 8px 0; background: #f2f7ff; color: var(--muted); }
.post-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 20px 0; }
.post-body th, .post-body td { border: 1px solid var(--border); padding: 8px 14px; font-size: 14px; }
.post-body th { background: var(--card); }
.post-body hr { border: 0; border-top: 1px solid var(--border); margin: 26px 0; }
.katex-display { overflow-x: auto; overflow-y: hidden; padding-block: 8px; }
.post-end { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.post-end a { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -60px; left: 12px; padding: 8px 12px; background: var(--text); color: white; z-index: 1001; }
.skip-link:focus { top: 12px; }
@media (max-width: 600px) {
  .blog-content { padding: 24px 20px 32px; }
  .blog-heading h1 { font-size: 22px; }
  .category-nav { gap: 6px; }
  .category-nav a { font-size: 12px; padding: 4px 8px; gap: 5px; }
  .search-form { width: 100%; }
  .archive-filters { gap: 12px; }
  .date-filter { width: 100%; }
  .date-filter input[type="date"] { flex: 1; width: 0; }
  .filter-field { flex: 1 1 140px; }
  .filter-field[for="filter-tag"] { flex-basis: 100%; }
  .filter-field select { flex: 1; width: 0; }
  .archive-caption { font-size: 12px; }
  .post-card { padding: 14px; gap: 12px; flex-wrap: wrap; }
  .post-card h2 { font-size: 16px; }
  .post-cover { width: 100%; height: auto; max-height: 180px; object-fit: contain; }
  .post-arrow { display: none; }
  .empty-state { padding: 16px; }
  .empty-state h2 { font-size: 16px; }
  .post-header h1 { font-size: 23px; }
  .post-body h2 { font-size: 20px; }
  .pagination { gap: 8px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
