/* /博客/ list page. Ported from docs/design/build-wireframe-blog-list-v1.mjs (Stage A, owner-approved look).
   Every class is bl- prefixed: site.css already owns .chips / .search / .seg-ind / .blog-tools for the
   homepage blog block (dark ground), so nothing here may share a name with it. The wireframe's
   @container queries became @media (the real page is the viewport): 899 = nav/band switch, 720/721 = slim
   rows vs 2-across, 1024 = 3-across. Tokens (--green, --paper, --amber, --r-card ...) come from site.css. */

/* ===== green header band: crumb, eyebrow, H1, lead on the left; search + question shortcuts on the right ===== */
.bl-hero { position: relative; background: var(--green); color: var(--paper); border-radius: 0 0 var(--r-sec) var(--r-sec); padding: calc(var(--nav-h) + 16px) 0 28px; }
.bl-hero .lead { max-width: 62ch; margin-top: 12px; color: var(--mute-d); font-size: var(--lead, clamp(16px, 1.2vw, 18px)); line-height: 1.75; }
.bl-hero .eyebrow { margin-bottom: 12px; }
.bl-crumb { font-size: 12.5px; color: rgba(242, 243, 238, .72); display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.bl-crumb a:hover { text-decoration: underline; }
.bl-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 460px); column-gap: 56px; }
.bl-hero-grid > * { grid-column: 1; min-width: 0; }
.bl-hero-grid > .bl-bt { grid-column: 2; grid-row: 1 / span 4; align-self: stretch; display: grid; grid-template-rows: 1fr auto 1fr; }
.bl-bt > .bl-search { grid-row: 2; }
.bl-qs { grid-row: 3; align-self: start; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.bl-qs .bl-fl { width: auto; margin-right: 2px; color: var(--mute-d); }
.bl-qs button { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid rgba(242, 243, 238, .34); background: rgba(242, 243, 238, .1); color: var(--paper); font-size: 13px; line-height: 1; white-space: nowrap; }
.bl-qs button:hover { background: rgba(242, 243, 238, .2); }
.bl-qs button.on { background: var(--amber); border-color: var(--amber); color: var(--ink); font-weight: 600; }
.bl-search { display: flex; align-items: center; gap: 12px; width: 100%; height: 54px; padding: 0 20px; border-radius: 27px; border: 2px solid transparent; background: var(--white); color: var(--mute); }
.bl-search:focus-within { border-color: var(--amber); box-shadow: 0 0 0 4px rgba(233, 169, 58, .55); }
.bl-search i { flex: none; width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 50%; position: relative; }
.bl-search i::after { content: ""; position: absolute; width: 6px; height: 1.5px; background: currentColor; right: -5px; bottom: -2px; transform: rotate(45deg); }
.bl-search input { flex: 1; align-self: stretch; min-width: 0; width: 100%; background: none; border: 0; outline: 0; color: var(--ink); font-size: 16px; }
.bl-search input::placeholder { color: var(--mute); }
.bl-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ===== stage row + topic row + result line (the sticky block) ===== */
.bl-list { padding-block: 16px 64px; }
/* Sticks under the fixed menu while the cards scroll. The nav pill occupies 12..84 px on desktop (0..72 on a phone); the paper ground hides the cards passing beneath. z-index stays below the nav (100). */
.bl-sticky { position: sticky; top: var(--nav-h); z-index: 20; background: var(--paper); padding-block: 8px 4px; }
/* the fixed menu box is 96 px tall on desktop (pill 12..84 + 12 px of transparent padding that still catches clicks), so the block
   starts BELOW that box; this strip paints the paper ground over the 12 px gap so cards never show between pill and block */
.bl-sticky::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; background: var(--paper); }
.bl-tools { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.bl-frow { display: flex; align-items: center; gap: 8px; max-width: 100%; min-width: 0; }
.bl-fl { flex: none; width: 28px; font-size: 12px; line-height: 1.3; letter-spacing: .04em; color: var(--mute); }
.bl-scroll { flex: 0 1 auto; min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.bl-scroll::-webkit-scrollbar { display: none; }
.bl-chips { position: relative; display: flex; width: max-content; min-width: 0; padding: 4px; border-radius: 30px; background: rgba(16, 32, 27, .06); }
.bl-ind { position: absolute; z-index: 0; left: 4px; top: 4px; bottom: 4px; width: 100px; border-radius: 24px; background: var(--amber); }
.bl-chips.go .bl-ind { transition: transform .3s ease, width .3s ease; }
.bl-chips button { position: relative; z-index: 1; height: 38px; padding: 0 16px; border-radius: 19px; font-size: 14px; color: var(--ink); white-space: nowrap; }
.bl-chips small { margin-left: 6px; font-size: 12px; color: var(--mute); }
.bl-chips .on small { color: rgba(16, 32, 27, .72); } /* .62 measured 4.39:1 on the picked pill (probe-contrast); .72 clears 4.5:1 */
.bl-rl { display: flex; align-items: center; gap: 12px; min-height: 30px; margin-top: 6px; font-size: 14px; color: var(--mute); }
.bl-rl button { height: 30px; padding: 0 14px; border-radius: 15px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font-size: 13px; }
.bl-svc { margin-top: 12px; padding: 12px 18px; border-radius: var(--r-sm); background: var(--sand); font-size: 14.5px; }
.bl-svc a { font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

/* ===== article cards ===== */
.bl-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 12px; }
/* before the script has taken over (html.bl-js, no html.bl-ready yet) only the first page of cards paints, so the 98-card
   list never flashes; with no JS at all the class is never added and every card shows as a plain link */
html.bl-js:not(.bl-ready) .bl-card:nth-child(n+13) { display: none; }
.bl-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; color: inherit; position: relative; }
.bl-card:hover { border-color: var(--green); }
.bl-card figure { aspect-ratio: 16 / 9; background: var(--paper); overflow: hidden; }
.bl-card img { width: 100%; height: 100%; object-fit: cover; }
.bl-body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 22px; }
.bl-card.n::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--green); }
.bl-card.n .bl-body { padding-top: 26px; }
.bl-card.n .bl-d { -webkit-line-clamp: 5; }
.bl-k { align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: var(--green); color: var(--paper); font-size: 12px; font-weight: 600; font-style: normal; line-height: 1.5; }
.bl-card h3, .bl-d { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.bl-card h3 { -webkit-line-clamp: 3; font-family: var(--serif); font-weight: 500; font-size: 19px; line-height: 1.35; }
.bl-card.n h3 { font-size: 21px; }
.bl-d { -webkit-line-clamp: 2; font-size: 14px; line-height: 1.65; color: var(--mute); }
.bl-m { margin-top: auto; padding-top: 4px; font-size: 12.5px; color: var(--mute); }
.bl-m em { font-style: normal; }
@media (min-width: 721px) { .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .bl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ===== paging + empty state ===== */
.bl-pg { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 36px; font-size: 13.5px; color: var(--mute); }
.bl-em { display: grid; justify-items: center; gap: 14px; margin-top: 20px; padding: 44px 20px; border-radius: var(--r-card); background: var(--white); border: 1px solid var(--line); text-align: center; }
.bl-em p:first-child { font-family: var(--serif); font-size: 21px; color: var(--ink); }
.bl-num { font-size: 14px; color: var(--mute); }

/* ===== below 900 px: nav is the 72 px phone pill; band is one column; rows scroll sideways ===== */
@media (max-width: 899px) {
  .bl-hero { padding-bottom: 22px; }
  .bl-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .bl-hero-grid > .bl-bt { grid-column: 1; grid-row: auto; align-self: stretch; display: block; margin-top: 16px; }
  .bl-qs { margin-top: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .bl-qs::-webkit-scrollbar { display: none; }
  .bl-qs > * { flex: none; }
  .bl-sticky::before { display: none; }
  .bl-list { padding-block: 4px 64px; }
  .bl-tools { align-items: stretch; }
  .bl-scroll { flex: 1 1 0; -webkit-mask-image: linear-gradient(to right, #000 88%, transparent); mask-image: linear-gradient(to right, #000 88%, transparent); }
  .bl-chips button { scroll-snap-align: center; }
}

/* ===== phone (up to 720 px): slim rows; every control is a 44 px target; tighter spacing keeps 2 rows on the first screen ===== */
@media (max-width: 720px) {
  .bl-hero { padding-bottom: 20px; }
  .bl-hero-grid > .bl-bt { margin-top: 12px; }
  .bl-qs { margin-top: 4px; -webkit-mask-image: linear-gradient(to right, #000 90%, transparent); mask-image: linear-gradient(to right, #000 90%, transparent); }
  .bl-qs button { height: 44px; padding: 0 16px; border-radius: 22px; }
  .bl-chips { padding: 2px; }
  .bl-ind { top: 2px; bottom: 2px; left: 2px; }
  .bl-chips button { height: 44px; border-radius: 22px; }
  .bl-tools { gap: 2px; }
  .bl-sticky { padding-block: 4px 2px; }
  .bl-rl { min-height: 44px; margin-top: 0; }
  .bl-rl button { height: 44px; padding: 0 18px; border-radius: 22px; }
  .bl-list { padding-block: 0 48px; }
  .bl-grid { gap: 12px; margin-top: 6px; }
  .bl-card { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px; border-radius: var(--r-sm); }
  .bl-card.n { grid-template-columns: minmax(0, 1fr); }
  .bl-card.n::before { right: auto; bottom: 0; width: 4px; height: auto; }
  .bl-card.n .bl-body { padding: 0 0 0 6px; }
  .bl-card figure { aspect-ratio: 1; border-radius: 12px; }
  .bl-body { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "k m" "h h"; gap: 4px 0; align-content: center; padding: 0; }
  .bl-k { grid-area: k; padding: 0; background: none; color: var(--green-mid); }
  .bl-k::after { content: "·"; margin: 0 6px; color: var(--mute); }
  .bl-m { grid-area: m; margin: 0; padding: 0; font-size: 12px; }
  .bl-m span, .bl-m em, .bl-d { display: none; }
  .bl-card h3 { grid-area: h; -webkit-line-clamp: 2; font-size: 15.5px; line-height: 1.4; }
  .bl-card.n h3 { font-size: 16.5px; }
}

/* current page in the top menu: same highlight as about.css:439 (關於我們 on /about/) */
.nav .links .link[aria-current="page"]{background:rgba(255,255,255,.12);font-weight:600}
