/* Blog hub (/blog), magazine layout. Loaded after blog.css on the hub only.
   Blue hero band (intro, search, featured story with its title over the photo, editor's picks), topic tiles,
   category sections, the curated "Start here" list, the latest grid and the enquiry band.
   Photos never depend on the scroll reveal (only headings and text rows use .hp-reveal). */
.blh-hero { position: relative; overflow: hidden; padding: 16px 0 18px; color: #fff; text-align: center; background: radial-gradient(900px 420px at 92% -10%, rgba(255, 255, 255, .14), transparent 60%), linear-gradient(135deg, var(--brand-800) 0%, var(--brand-700) 45%, var(--brand-600) 100%); }
.blh-hero--compact { padding-bottom: 24px; }
.blh-intro { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.blh-intro-text, .blh-intro-tools { display: flex; flex-direction: column; align-items: center; width: 100%; min-width: 0; }
.blh-eyebrow { display: inline-flex; align-items: center; padding: 1px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); color: #fff; font-weight: 800; font-size: .875rem; letter-spacing: .05em; text-transform: uppercase; line-height: 1.35; }
.blh-eyebrow--dark { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-700); }
.hp-body .blh-h1 { margin: 8px 0 0; font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-weight: 700; font-size: 2.4rem; line-height: 1.08; letter-spacing: -.01em; color: #fff; }
.hp-body .blh-lead { margin: 6px auto 0; max-width: 640px; font-size: 1.05rem; line-height: 1.45; color: rgba(255, 255, 255, .92); }
/* Search: one large white pill */
.blh-search { width: 100%; max-width: 560px; margin: 12px auto 0; text-align: left; }
.blh-search-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.blh-search-row { position: relative; display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 999px; background: #fff; box-shadow: 0 12px 32px rgba(8, 16, 48, .28); }
.blh-search-row:focus-within { outline: 3px solid #fde68a; outline-offset: 3px; }
.blh-search-ico { position: absolute; left: 18px; color: var(--gray-500); pointer-events: none; }
.blh-search input { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0 12px 0 48px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 1.02rem; color: var(--gray-900); }
.blh-search input:focus { outline: none; }
.blh-search input::placeholder { color: var(--gray-500); }
.blh-search-btn { flex: 0 0 auto; min-height: 44px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--brand-600); color: #fff; font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; transition: background .2s; }
.blh-search-btn:hover { background: var(--brand-800); }
.blh-search-btn:focus-visible { outline: 3px solid var(--brand-400); outline-offset: 2px; }
/* Category chips on the blue band */
.blh-cats { margin-top: 8px; justify-content: center; }
.blh-hero .bl-filter { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .4); color: #fff; }
.blh-hero .bl-filter:hover { background: rgba(255, 255, 255, .2); border-color: #fff; color: #fff; }
.blh-hero .bl-filter.is-active { background: #fff; border-color: #fff; color: var(--brand-800); box-shadow: none; }
.blh-hero a:focus-visible, .blh-topic:focus-visible, .blh-main a:focus-visible { outline: 3px solid #fde68a; outline-offset: 3px; box-shadow: 0 0 0 6px var(--brand-800); }
.blh-main a:focus-visible, .blh-topic:focus-visible { outline-color: var(--brand-600); box-shadow: none; }
.blh-featured a:focus-visible { outline: 3px solid var(--brand-600); outline-offset: 3px; }

/* Featured story + editor's picks: on white, right under the hero. */
.blh-featured { padding: 26px 0 4px; background: #fff; }

/* Featured story: title over the photo on a dark scrim (white text stays above 4.5:1 on any photo). */
.blh-hero-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 28px; margin-top: 0; align-items: stretch; }
.blh-feature { margin: 0; min-width: 0; }
.blh-feature-link { position: relative; isolation: isolate; display: flex; align-items: flex-end; height: 100%; min-height: 440px; border-radius: 26px; overflow: hidden; background: var(--brand-800); color: #fff; text-decoration: none; box-shadow: 0 26px 60px rgba(6, 12, 40, .38); }
.blh-feature .bl-feature-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--hp-ease); }
.blh-scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(9, 14, 36, .95) 0%, rgba(9, 14, 36, .86) 34%, rgba(9, 14, 36, .45) 64%, rgba(9, 14, 36, .08) 100%); }
.blh-feature-body { display: flex; flex-direction: column; gap: 12px; max-width: 660px; padding: 34px 36px; }
.blh-feature-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.blh-feature .bl-kicker { background: #fff; color: var(--brand-800); }
.blh-tag { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .45); background: rgba(9, 14, 36, .35); color: #fff; font-weight: 700; font-size: .875rem; line-height: 1.4; }
.blh-feature-title { font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-weight: 700; font-size: clamp(1.7rem, 3.1vw, 2.6rem); line-height: 1.1; color: #fff; text-wrap: balance; }
.blh-feature-excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 1.05rem; line-height: 1.55; color: rgba(255, 255, 255, .92); }
.blh-feature-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: .9rem; color: rgba(255, 255, 255, .9); }
.blh-feature-meta .bl-author-name { color: #fff; font-size: .9rem; }
.blh-feature-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font-weight: 800; color: #fff; }
.blh-feature-cta svg { transition: transform .2s var(--hp-ease); }

/* Editor's picks (curated in front matter: editors_pick: true) */
.blh-picks { min-width: 0; padding: 22px 22px 8px; border-radius: 26px; background: #f6f8fd; border: 1px solid var(--gray-200); }
.hp-body .blh-picks-h { margin: 0 0 6px; font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-size: 1.4rem; color: var(--gray-900); }
.blh-picks-list { list-style: none; margin: 0; padding: 0; }
.blh-picks-list li + li { border-top: 1px solid var(--gray-200); }
.blh-pick { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 16px; align-items: center; padding: 16px 0; color: var(--gray-900); text-decoration: none; }
.blh-pick .blh-pick-img { width: 108px; height: 81px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; box-shadow: 0 8px 18px rgba(20, 30, 70, .16); }
.blh-pick-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.blh-pick-cat { font-size: .875rem; font-weight: 700; color: var(--brand-700); }
.blh-pick-title { font-weight: 700; font-size: 1.02rem; line-height: 1.35; color: var(--gray-900); }
.blh-pick-meta { font-size: .875rem; color: var(--gray-600); }

/* Topic tiles (real post counts from front matter) */
.blh-topics { padding: 34px 0 6px; background: #fff; }
.hp-body .blh-topics-h { margin: 0 0 16px; font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-size: 1.55rem; color: var(--gray-900); }
.blh-topic-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.blh-topic { display: flex; flex-direction: column; gap: 14px; height: 100%; min-height: 128px; padding: 18px; border-radius: 20px; border: 1px solid var(--gray-200); background: linear-gradient(180deg, #fff 0%, #f6f8fd 100%); color: var(--gray-900); text-decoration: none; transition: border-color .2s, box-shadow .25s, transform .25s var(--hp-ease), background .2s; }
.blh-topic-ico { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 15px; background: var(--brand-50); color: var(--brand-600); flex: 0 0 auto; }
.blh-topic-text { display: flex; flex-direction: column; gap: 2px; }
.blh-topic-name { font-weight: 800; font-size: 1.05rem; }
.blh-topic-count { font-size: .875rem; color: var(--gray-600); }
.blh-topic.is-active { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.blh-topic.is-active .blh-topic-ico { background: rgba(255, 255, 255, .16); color: #fff; }
.blh-topic.is-active .blh-topic-count { color: rgba(255, 255, 255, .9); }

/* Category sections: one large card + small cards */
.blh-section { padding: 52px 0 6px; }
.blh-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 2px solid var(--gray-100); }
.hp-body .blh-sec-title { margin: 0; font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-weight: 700; font-size: clamp(1.65rem, 2.8vw, 2.2rem); line-height: 1.15; color: var(--gray-900); }
.blh-see-all { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-weight: 800; text-decoration: none; transition: background .2s, color .2s; }
.blh-see-all:hover { background: var(--brand-600); color: #fff; }
.blm-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px 30px; }
.blm-card { display: flex; min-width: 0; }
.blm-card--lg { grid-row: span 3; }
.blm-link { display: flex; flex-direction: column; width: 100%; color: inherit; text-decoration: none; border-radius: 22px; transition: transform .3s var(--hp-ease), box-shadow .3s, background .2s, border-color .2s; }
.blm-media { display: block; overflow: hidden; background: var(--brand-50); }
.blm-card .blm-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .6s var(--hp-ease); }
.blm-body { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.blm-title { font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-weight: 700; color: var(--gray-900); }
.blm-card--lg .blm-link { overflow: hidden; background: #fff; border: 1px solid var(--gray-200); box-shadow: var(--hp-shadow); }
.blm-card--lg .blm-body { flex: 1 1 auto; padding: 22px 24px 24px; }
.blm-card--lg .blm-title { font-size: clamp(1.4rem, 2.3vw, 1.8rem); line-height: 1.18; }
.blm-card--sm .blm-link { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; align-items: center; padding: 10px; border: 1px solid transparent; }
.blm-card--sm .blm-media { border-radius: 16px; box-shadow: 0 10px 24px rgba(17, 24, 39, .12); }
.blm-card--sm .blm-title { font-size: 1.15rem; line-height: 1.3; }

/* Start here (curated reading order; not a popularity ranking) */
.blh-start { margin-top: 52px; padding: 60px 0; background: linear-gradient(180deg, #f3f5fc 0%, #eef1fa 100%); }
.blh-start-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 44px; align-items: start; }
.hp-body .blh-start-intro .blh-sec-title { margin-top: 14px; }
.hp-body .blh-start-intro p { margin-top: 12px; font-size: 1.05rem; line-height: 1.6; color: var(--gray-700); }
.blh-start-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.blh-start-item { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 14px; align-items: start; padding: 18px 22px; border-radius: 20px; background: #fff; border: 1px solid var(--gray-200); color: inherit; text-decoration: none; transition: transform .25s var(--hp-ease), box-shadow .25s, border-color .2s; }
.blh-start-num { font-family: "Fraunces", "Fraunces Fallback", Georgia, serif; font-weight: 700; font-size: 2.4rem; line-height: 1; color: var(--brand-600); }
.blh-start-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.blh-start-title { font-weight: 800; font-size: 1.1rem; line-height: 1.35; color: var(--gray-900); }
.blh-start-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .95rem; line-height: 1.5; color: var(--gray-600); }

/* Latest grid + enquiry band */
.sp-body .hp-section.sp-section.blh-latest { padding-top: 52px; }
.blh-latest .bl-grid-title { margin-bottom: 22px !important; }
.blh-cta-wrap { padding: 4px 0 72px; }
.blh-cta.bl-cta { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 40px; align-items: center; margin-top: 0; padding: 24px; border-radius: 28px; }
.blh-cta-media img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; box-shadow: 0 18px 40px rgba(0, 0, 0, .3); }
.blh-cta-body { display: block; padding-right: 24px; }
.blh-cta .bl-cta-title { font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.15; }
.hp-body .blh-cta-body p { margin-top: 10px; font-size: 1.05rem; line-height: 1.6; }
.blh-cta-credit { display: block; margin-top: 16px; font-size: .875rem; color: rgba(255, 255, 255, .82); }

/* Hover: lift + photo zoom, only with a real mouse and when motion is welcome. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .blh-feature-link:hover .bl-feature-img { transform: scale(1.04); }
  .blh-feature-link:hover .blh-feature-cta svg { transform: translateX(4px); }
  .blh-pick:hover .blh-pick-title, .blh-start-item:hover .blh-start-title { text-decoration: underline; text-underline-offset: 3px; }
  .blh-topic:hover { transform: translateY(-4px); border-color: var(--brand-200); box-shadow: var(--hp-shadow-lg); }
  .blm-card--lg .blm-link:hover { transform: translateY(-5px); box-shadow: var(--hp-shadow-lg); border-color: var(--brand-200); }
  .blm-card--sm .blm-link:hover { transform: translateY(-3px); background: #f7f8fd; border-color: var(--gray-200); }
  .blm-link:hover .blm-img { transform: scale(1.06); }
  .blh-start-item:hover { transform: translateY(-3px); border-color: var(--brand-200); box-shadow: var(--hp-shadow); }
}
@media (prefers-reduced-motion: reduce) {
  .blh-feature .bl-feature-img, .blm-card .blm-img, .blm-link, .blh-topic, .blh-start-item, .blh-feature-cta svg { transition: none; }
}

/* 900px and wider: badge, H1 and subheading on the left; search with the chips under it on the right;
   both columns vertically centred inside an 1100px container. */
@media (min-width: 900px) {
  .blh-hero { padding: 24px 0; text-align: left; }
  .blh-hero--compact { padding-bottom: 24px; }
  .blh-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 20px 48px; align-items: center; max-width: 1100px; }
  .blh-intro-text { align-items: flex-start; }
  .blh-intro-tools { align-items: stretch; }
  .hp-body .blh-lead { margin-left: 0; margin-right: 0; max-width: 560px; }
  .blh-search { max-width: none; margin: 0; }
  .blh-cats { justify-content: flex-start; margin-top: 10px; }
}
@media (min-width: 900px) and (max-width: 1199px) {
  .blh-intro { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); column-gap: 32px; }
  .hp-body .blh-h1 { font-size: 2.1rem; }
}
@media (max-width: 1024px) {
  .blh-hero-grid { grid-template-columns: 1fr; }
  .blh-picks-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
  .blh-picks-list li + li { border-top: 0; }
  .blh-pick { grid-template-columns: 1fr; align-items: start; gap: 10px; }
  .blh-pick .blh-pick-img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .blh-topic-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .blm-grid { grid-template-columns: minmax(0, 1fr); }
  .blm-card--lg { grid-row: auto; }
  .blh-start-inner { grid-template-columns: 1fr; gap: 22px; }
  .blh-cta.bl-cta { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; }
  .blh-cta-body { padding-right: 8px; }
}
@media (max-width: 640px) {
  .blh-hero { padding: 16px 0 14px; }
  .hp-body .blh-h1 { font-size: 1.75rem; margin-top: 6px; }
  .hp-body .blh-lead { font-size: .95rem; line-height: 1.45; }
  .blh-search { margin-top: 12px; }
  .blh-search input { padding-left: 42px; font-size: 1rem; }
  .blh-search-ico { left: 15px; }
  .blh-search-btn { padding: 0 18px; }
  /* Category chips and topic tiles become one swipeable row each (scroll-snap); the row scrolls, never the page. */
  .blh-cats, .blh-topic-row { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; margin-left: -18px; margin-right: -18px; padding: 2px 18px 8px; scroll-padding-left: 18px; }
  .blh-cats::-webkit-scrollbar, .blh-topic-row::-webkit-scrollbar { display: none; }
  .blh-cats { justify-content: flex-start; margin-top: 8px; padding-bottom: 4px; }
  .blh-cats .bl-filter { flex: 0 0 auto; scroll-snap-align: start; }
  /* Centred when the chips fit; auto margins collapse to 0 when the row overflows, so nothing is clipped. */
  .blh-cats .bl-filter:first-child { margin-left: auto; }
  .blh-cats .bl-filter:last-child { margin-right: auto; }
  .blh-featured { padding-top: 18px; }
  .blh-hero-grid { margin-top: 0; gap: 18px; }
  .blh-feature-link { min-height: 400px; border-radius: 22px; }
  .blh-feature-body { padding: 22px 20px; gap: 10px; }
  .blh-feature-title { font-size: 1.55rem; }
  .blh-feature-excerpt { font-size: .98rem; }
  .blh-picks { padding: 18px 16px 4px; border-radius: 22px; }
  .blh-picks-list { display: block; }
  .blh-picks-list li + li { border-top: 1px solid var(--gray-200); }
  /* Phones: the picks are a text list (lazy thumbnails with display:none are never fetched, so they don't compete with the featured photo). */
  .blh-pick { grid-template-columns: 1fr; padding: 14px 0; }
  .blh-pick .blh-pick-img { display: none; }
  .blh-topics { padding-top: 30px; }
  .hp-body .blh-topics-h { font-size: 1.35rem; margin-bottom: 12px; }
  .blh-topic-row { display: flex; gap: 10px; }
  .blh-topic-row li { flex: 0 0 auto; scroll-snap-align: start; }
  .blh-topic { flex-direction: row; align-items: center; gap: 10px; min-height: 48px; height: auto; padding: 6px 16px 6px 6px; border-radius: 999px; }
  .blh-topic-ico { width: 36px; height: 36px; border-radius: 50%; }
  .blh-topic-ico .blh-ico { width: 20px; height: 20px; }
  .blh-topic-text { flex-direction: row; align-items: baseline; gap: 6px; white-space: nowrap; }
  .blh-topic-name { font-size: .98rem; }
  .blh-section { padding-top: 40px; }
  .blh-sec-head { align-items: center; margin-bottom: 16px; }
  .hp-body .blh-sec-title { font-size: 1.6rem; }
  .blh-see-all { padding: 0 14px; }
  .blm-card--lg .blm-body { padding: 18px 18px 20px; }
  .blm-card--sm .blm-link { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 6px 0; }
  .blm-card--sm .blm-media { border-radius: 12px; }
  .blm-card--sm .blm-img { aspect-ratio: 4 / 3; }
  .blm-card--sm .blm-title { font-size: 1.02rem; }
  .blh-start { margin-top: 40px; padding: 40px 0; }
  .blh-start-item { grid-template-columns: 46px minmax(0, 1fr); gap: 10px; padding: 16px; }
  .blh-start-num { font-size: 1.8rem; }
  .blh-start-title { font-size: 1.02rem; }
  .sp-body .hp-section.sp-section.blh-latest { padding-top: 40px; }
  .blh-cta.bl-cta { grid-template-columns: 1fr; gap: 18px; padding: 16px 16px 22px; border-radius: 22px; }
  .blh-cta-body { padding: 0 4px; }
  .blh-cta-wrap { padding-bottom: 48px; }
}

/* Below-the-fold hub sections skip style/layout/paint until they come near the viewport, so the first
   paint (the featured photo, the phone LCP) is not held up by laying out the whole magazine. The browser
   remembers each section's real height once rendered ("auto"), so scrolling and anchors stay stable. */
.blh-section, .blh-start, .blh-latest, .blh-cta-wrap { content-visibility: auto; contain-intrinsic-size: auto 900px; }
.blh-section { contain-intrinsic-size: auto 1100px; }
@media (max-width: 640px) { .blh-section { contain-intrinsic-size: auto 1150px; } .blh-latest { contain-intrinsic-size: auto 4400px; } }
