/* ============================================================
   囍帖製作所 文章頁（/blog/blog.css）
   文章列表與內文排版；疊在 shared/base.css 之上，
   導覽列樣式沿用 /legal/legal.css 的 .lg-nav。
   ============================================================ */

body {
  font-family: var(--font-serif-tc);
  font-size: var(--text-body);
  background: var(--paper);
  color: var(--ink);
}

/* ── 文章列表（/blog/） ── */
.bl-head {
  padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(1.5rem, 4vw, 2.5rem);
}
.bl-head h1 {
  font-size: var(--text-h2);
  font-weight: 700;
  letter-spacing: .12em;
}
.bl-head p {
  margin-top: .9rem;
  color: var(--ink-soft);
  max-width: 34em;
  line-height: 1.9;
}
.bl-list {
  display: grid;
  gap: 1.25rem;
  padding-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

/* ── 文章列表分頁 ── */
.bl-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: clamp(3rem, 8vw, 5rem);
}
.bl-pg-nums {
  display: flex;
  align-items: center;
  gap: .35rem;
}
.bl-pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4em;
  padding: .5em .7em;
  border: 1px solid var(--hairline);
  background: var(--paper-raise, #fff);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: var(--text-small);
  letter-spacing: .1em;
  transition: border-color .25s ease, color .25s ease;
}
.bl-pg:hover { border-color: var(--accent); color: var(--accent); }
.bl-pg.is-current {
  border-color: var(--accent);
  color: var(--accent-ink, #fff);
  background: var(--accent);
  cursor: default;
}
.bl-pg.is-disabled {
  color: var(--hairline);
  border-color: var(--hairline);
  cursor: default;
  pointer-events: none;
}
@media (max-width: 30rem) {
  .bl-pager { justify-content: center; }
  .bl-pg-nums { order: -1; flex-basis: 100%; justify-content: center; margin-bottom: .5rem; }
}
.bl-card {
  display: block;
  border: 1px solid var(--hairline);
  background: var(--paper-raise, #fff);
  padding: clamp(1.4rem, 4vw, 2rem);
  text-decoration: none;
  color: inherit;
  transition: border-color .25s ease;
}
.bl-card:hover { border-color: var(--accent); }
.bl-card h2 {
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .04em;
}
.bl-card p {
  margin-top: .7rem;
  color: var(--ink-soft);
  line-height: 1.85;
  font-size: var(--text-small);
}
.bl-card .bl-more {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent);
  font-size: var(--text-small);
  letter-spacing: .12em;
}
.bl-tag {
  font-family: var(--font-serif-latin);
  font-style: italic;
  font-size: var(--text-tiny);
  letter-spacing: .2em;
  color: var(--accent);
}

/* ── 文章內文 ── */
.bl-article {
  max-width: 42em;
  margin-inline: auto;
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
}
.bl-article h1 {
  font-size: clamp(1.6rem, 4.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: .05em;
}
.bl-meta {
  margin-top: .9rem;
  color: var(--ink-soft);
  font-size: var(--text-small);
  letter-spacing: .1em;
}
.bl-article h2 {
  margin-top: clamp(2.2rem, 5vw, 3rem);
  font-size: var(--text-h3);
  font-weight: 600;
  letter-spacing: .08em;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--hairline);
}
/* h3 原本沒有規則，margin-top 吃到 0，會緊貼上一段（2026-07-23 補）。
   層級間距：h2 clamp(2.2–3rem) > h3 clamp(1.7–2.2rem) > p 1rem */
.bl-article h3 {
  margin-top: clamp(1.7rem, 3.5vw, 2.2rem);
}
.bl-article p { margin-top: 1rem; line-height: 2; }
.bl-article ol,
.bl-article ul {
  margin-top: 1rem;
  padding-left: 1.6em;
  display: grid;
  gap: .55rem;
  line-height: 1.9;
}
.bl-article ol { list-style: decimal; }
.bl-article ul { list-style: disc; }
.bl-article a { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
.bl-article strong { color: var(--accent); font-weight: 600; }

/* 比較表：手機水平捲動不破版 */
.bl-tablewrap { margin-top: 1.25rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bl-article table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-size: var(--text-small);
  line-height: 1.7;
}
.bl-article th, .bl-article td {
  border: 1px solid var(--hairline);
  padding: .65rem .8rem;
  text-align: left;
  vertical-align: top;
}
.bl-article th {
  background: var(--paper-raise, #fff);
  font-weight: 600;
  letter-spacing: .06em;
  white-space: nowrap;
}

/* 文中圖片 */
.bl-figure {
  margin-top: 1.75rem;
}
.bl-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.bl-figure figcaption {
  margin-top: .6rem;
  color: var(--ink-soft);
  font-size: var(--text-tiny);
  letter-spacing: .06em;
}

.bl-quote {
  margin-top: 1.25rem;
  padding: .35rem 0 .35rem 1.1rem;
  border-left: 2px solid var(--accent);
  color: var(--ink-soft);
  font-style: normal;
}

/* 長文目錄（>2000 字的文章用；點擊跳 H2 錨點） */
.bl-toc {
  margin-top: clamp(1.75rem, 4vw, 2.25rem);
  border: 1px solid var(--hairline);
  padding: clamp(1rem, 3vw, 1.35rem) clamp(1.15rem, 3vw, 1.5rem);
}
.bl-toc-t {
  font-size: var(--text-small);
  letter-spacing: .16em;
  color: var(--ink-soft);
  margin-bottom: .6rem;
}
.bl-toc ol {
  margin: 0;
  padding-left: 1.35em;
  color: var(--ink-soft);
}
.bl-toc li {
  margin-top: .35rem;
  line-height: 1.7;
}
.bl-toc a {
  color: inherit;
  text-decoration-color: var(--hairline);
  text-underline-offset: .25em;
}
.bl-toc a:hover {
  color: var(--ink);
  text-decoration-color: var(--accent);
}

/* 表格下方的免責/補充附註 */
.bl-note {
  margin-top: .8rem;
  color: var(--ink-soft);
  font-size: var(--text-small);
  line-height: 1.8;
}

/* 結尾 CTA */
.bl-cta {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  border: 1px solid var(--hairline);
  background: var(--paper-raise, #fff);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  text-align: center;
}
.bl-cta p { margin: 0; line-height: 1.9; }
.bl-cta .btn { margin-top: 1.25rem; color: var(--accent-ink); text-decoration: none; }

/* 相關閱讀 */
.bl-related { margin-top: clamp(2.5rem, 6vw, 3.5rem); }
.bl-related h2 { border-bottom: 0; padding-bottom: 0; font-size: var(--text-small); letter-spacing: .25em; color: var(--ink-soft); }
.bl-related ul { list-style: none; padding-left: 0; margin-top: .9rem; }
