/* Blog index + site search results (prefix blg-). Family rules: fam-hub.css. */

/* Hero */
.blg-hero { --hero-h: 13.75rem; --hero-pos: 50% 58%; --hub-h1: 3.06rem; --hub-lead: 1.02rem; --hub-lead-w: 31rem; --hero-copy: 46rem; }
.blg-hero .hero__bg { left: 7%; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 25%); mask-image: linear-gradient(90deg, transparent 0, #000 25%); }
.blg-hero::before { --hero-fade: linear-gradient(90deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.92) 38%, rgba(255,255,255,.45) 53%, rgba(255,255,255,0) 63%); }
.blg-hero .hero__inner { padding-block: .85rem 1rem; }
.blg-hero .hero__lead { line-height: 1.3; }
.blg-hero .hub-feats { gap: .6rem 1.2rem; margin-top: 1.05rem; }
.blg-hero .hub-feats li { font-size: max(.68rem, 16px) /* rt-1019 */; gap: .45rem; }
.blg-hero .hub-feats strong { font-size: .74rem; font-weight: 700; }
.blg-hero .hub-feats .ib { --s: 2.3rem; }
.blg-note { right: 2.2%; top: 1.1rem; font-size: 1.4rem; transform: rotate(-8deg); text-align: left; }

/* Main */
.blg-main { --hub-aside: 22rem; --hub-gap: 1.5rem; padding-block: .8rem 1.25rem; }
.blg-posts .hub-head { margin-bottom: .8rem; }
.blg-posts .hub-head h2 { font-size: 1.62rem; }
.blg-posts .hub-head p { font-size: max(.88rem, 16px) /* rt-1019 */; }
.blg-grid { --gap: 1.1rem 1.15rem; }
.blg-post { border-color: #e6ebf2; box-shadow: 0 2px 8px rgba(13, 31, 60, .06); }
.blg-post[hidden] { display: none; }
.blg-post .post-card__media { --ratio: 2.48 / 1; margin: .2rem .2rem 0; border-radius: 6px 6px 0 0; }
.blg-post .tag { font-size: .62rem; padding: .2rem .45rem; top: .55rem; left: .55rem; }
.blg-post .post-card__body { gap: .3rem; padding: .55rem .75rem .7rem; }
.blg-post h3 { font-size: .94rem; line-height: 1.22; }
.blg-post h3 a { color: var(--ink); }
.blg-post .post-card__body > p { font-size: max(.8rem, 16px) /* rt-1019 */; line-height: 1.38; color: #4a566c; }
.blg-post .meta { gap: .3rem .75rem; font-size: .7rem; padding-top: .35rem; flex-wrap: nowrap; }
.blg-post .meta .link-arrow { margin-left: auto; font-size: .76rem; }
.blg-pager { margin-top: 1rem; }
.blg-pager a, .blg-pager span { font-size: .8rem; min-width: 1.9rem; height: 1.9rem; }
.blg-pager .pagination__edge { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.blg-pager .pagination__edge .icon { width: .9rem; height: .9rem; }
.blg-pager .is-disabled { border: 1px solid var(--line); padding-inline: .8rem; margin-right: 1rem; }
.blg-pager a.pagination__edge:last-child, .blg-pager span.pagination__edge:last-child { margin-left: 1rem; }
.blg-status { margin: 0 0 .75rem; font-weight: 600; color: var(--ink); }
.blg-status:empty { display: none; }

/* Pages: page 1 by default; #page-N shows page N (no JavaScript needed); a search (?q=) shows every match */
.blg-page + .blg-page { display: none; }
.blg-list:has(.blg-page:target) .blg-page:not(:target) { display: none; }
.blg-page:target { display: block; }
.blg-list:has(.blg-status:not(:empty)) .blg-page:is(:target, :not(:target)) { display: block; }
.blg-list:has(.blg-status:not(:empty)) .blg-page + .blg-page { margin-top: 1.1rem; }
.blg-list:has(.blg-status:not(:empty)) .blg-pager { display: none; }

/* Sidebar */
.blg-aside { gap: .75rem; }
.blg-box { background: var(--bg-tint); border: 1px solid #e2eaf5; border-radius: var(--radius-lg); padding: .8rem .85rem .85rem; }
.blg-box h2 { font-size: .98rem; margin: 0 0 .5rem; }
.blg-box .search-box input { min-height: 2.5rem; font-size: .8rem; background: #fff; }
.blg-box .search-box button { width: 3rem; }
.blg-cats { gap: 0; }
.blg-cats a { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: .7rem; padding: .2rem 0; font-size: .76rem; }
.blg-cats .ib { --s: 1.3rem; border-radius: 5px; }
.blg-cats .ib .icon { width: 62%; height: 62%; }
.blg-cats .count { color: #4a566c; font-size: .74rem; margin-right: .9rem; }
.blg-news { --lead-title: 1.1rem; padding: .8rem .85rem .8rem; background: linear-gradient(135deg, #eef8f0 0%, #e4f2e6 100%); }
.blg-news .lead-box__text { font-size: max(.76rem, 16px) /* rt-1019 */; margin-bottom: .6rem; }
.blg-news .ticks { font-size: .7rem; gap: .3rem .9rem; }
.blg-feat__post { display: grid; grid-template-columns: 7.4rem minmax(0, 1fr); gap: .75rem; align-items: start; }
.blg-feat__post img { width: 100%; aspect-ratio: 1.45 / 1; object-fit: cover; border-radius: 5px; }
.blg-feat__post h3 { font-size: .78rem; line-height: 1.25; margin: .1rem 0 .3rem; }
.blg-feat__post h3 a { color: var(--ink); text-decoration: none; }
.blg-feat__post h3 a:hover { color: var(--blue-600); }
.blg-feat__post .meta { font-size: .7rem; gap: .2rem .7rem; margin-bottom: .45rem; }
.blg-feat__post .link-arrow { font-size: .82rem; }

@media (max-width: 1100px) {
  .blg-note { display: none; }
  .blg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .blg-hero { --hero-mobile-h: 190px; }
  .blg-hero .hero__bg { left: 0; -webkit-mask-image: none; mask-image: none; }
  .blg-grid { grid-template-columns: minmax(0, 1fr); }
  .blg-post .post-card__media { --ratio: 16 / 9; }
  .blg-post h3 { font-size: 1.02rem; }
  .blg-post .post-card__body > p { font-size: max(.9rem, 16px) /* rt-1019 */; }
  .blg-post .meta { font-size: .8rem; }
  .blg-cats a, .blg-news .lead-box__text, .blg-news .ticks { font-size: max(.9rem, 16px) /* rt-1019 */; }
  .blg-feat__post h3 { font-size: .95rem; }
  .blg-pager { gap: .2rem; }
  .blg-pager a, .blg-pager span { min-width: 1.75rem; padding-inline: .35rem; }
  .blg-pager .is-disabled { margin-right: 0; }
  .blg-pager a.pagination__edge:last-child, .blg-pager span.pagination__edge:last-child { margin-left: 0; }
}

/* UX audit W06: emptied pages and pagers disappear while a search is shown */
.blg-page[hidden], .pagination[hidden] { display: none; }
