/* Blog: index (home.php, category.php) and single article (single-post.php). Design: Hemlock Blog.dc.html,
   Hemlock Blog Post.dc.html. Shared pieces (intro, pill filter) reuse the pages.css classes. */

/* ---------------------------------------------------------------------------------------------- Featured */
.featured__inner { padding-bottom: clamp(40px, 5vw, 64px); }
.featured__link {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: clamp(24px, 3.5vw, 56px); align-items: center;
  color: var(--ink); text-decoration: none;
}
.featured__media { display: block; overflow: hidden; border-radius: 16px; aspect-ratio: 3 / 2; background: var(--panel-2); }
.featured__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.featured__text { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.featured__meta, .blog-card__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 14px; color: var(--text); }
.featured__cat, .blog-card__cat { font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.featured__title { font-family: var(--font-display); font-size: clamp(28px, 3vw, 40px); line-height: 1.1; letter-spacing: -.01em; text-wrap: balance; }
.featured__excerpt { font-size: 17px; line-height: 1.6; color: var(--text); text-wrap: pretty; }
.featured__more { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; color: var(--accent); }
.featured__more svg { display: block; transition: transform .2s ease; }
.featured__link:hover .featured__more svg { transform: translateX(3px); }

/* -------------------------------------------------------------------------------------------------- Grid */
.articles__inner { padding-bottom: clamp(64px, 8vw, 104px); }
.blog-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(24px, 3vw, 40px) clamp(20px, 2.4vw, 32px); }
.blog-card { display: flex; min-width: 0; }
.blog-card__link { display: flex; flex-direction: column; gap: 14px; width: 100%; color: var(--ink); text-decoration: none; }
.blog-card__media { display: block; overflow: hidden; border-radius: 16px; aspect-ratio: 4 / 3; background: var(--panel-2); }
.blog-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.16, 1, .3, 1); }
.blog-card__link:hover .blog-card__media img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .blog-card__media img { transition: none; } .blog-card__link:hover .blog-card__media img { transform: none; } }
.blog-card__meta { font-size: 13.5px; gap: 10px; }
.blog-card__cat { font-size: 12px; }
.blog-card__title { font-family: var(--font-display); font-size: 23px; line-height: 1.2; letter-spacing: -.005em; text-wrap: balance; }
.blog-card__excerpt { font-size: 15.5px; line-height: 1.55; color: var(--text); text-wrap: pretty; }
.blog-more { display: flex; justify-content: center; margin-top: clamp(40px, 5vw, 56px); }
.blog-more[hidden] { display: none; }
.blog-more__btn[aria-busy="true"] { opacity: .6; pointer-events: none; }
.blog-more__pages { margin: 24px 0 0; text-align: center; font-size: 15px; }
.blog-more__pages a { color: var(--accent); font-weight: 600; text-decoration: none; }
.blog-more__pages a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------------------------------------------------------------------------------------------- Article */
.post-head__inner { display: flex; flex-direction: column; gap: 22px; max-width: 880px; padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(32px, 4vw, 48px); }
/* .crumbs styles live in main.css (breadcrumbs render on every page but Home). */
.post-head__title { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.06; letter-spacing: -.01em; text-wrap: balance; }
.post-head__lead { font-size: 19px; line-height: 1.55; color: var(--text); text-wrap: pretty; }
.byline { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding-top: 6px; }
.byline__photo img, .byline__img { display: block; width: 44px; height: 44px; border-radius: var(--radius-pill); object-fit: cover; object-position: 50% 30%; }
.byline__text { display: flex; flex-direction: column; gap: 2px; font-size: 14.5px; color: var(--text); }
.byline__name { font-weight: 600; color: var(--ink); }
.byline__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.post-figure__wrap { max-width: calc(1160px); }
.post-figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.post-figure__media { display: block; overflow: hidden; border-radius: 20px; aspect-ratio: 16 / 9; background: var(--panel-2); }
.post-figure__media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.post-figure__caption { font-size: 14px; color: var(--text); }
.post-body__wrap { padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(56px, 7vw, 88px); }
.post-body { max-width: 720px; margin: 0 auto; font-size: 18px; line-height: 1.7; color: var(--nav-text); }
.post-body > * + * { margin-top: 22px; }
.post-body h2 { margin-top: 40px; font-size: clamp(28px, 3vw, 36px); line-height: 1.15; }
.post-body h3 { margin-top: 30px; font-family: var(--font-body); font-size: 22px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; color: var(--ink); }
.post-body h4 { margin-top: 26px; font-family: var(--font-body); font-size: 19px; font-weight: 600; color: var(--ink); }
.post-body p, .post-body li { text-wrap: pretty; }
.post-body ul, .post-body ol { padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.post-body strong { font-weight: 600; color: var(--ink); }
.post-body a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-hover); }
.post-body a:hover { text-decoration-color: var(--ink); }
.post-body img { display: block; max-width: 100%; height: auto; border-radius: 16px; }
.post-body figure { margin: 32px 0; }
.post-body figcaption { margin-top: 10px; font-size: 14px; color: var(--text); }
.post-body blockquote { margin: 28px 0; padding: 24px 28px; border-radius: 16px; background: var(--white); font-size: 17px; line-height: 1.6; }
.post-body blockquote p { margin: 0; }
.post-body .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 28px 0; }
.post-body .table-scroll > table { margin: 0; }
.post-body table { width: 100%; min-width: 480px; border-collapse: collapse; border-spacing: 0; font-size: 15px; line-height: 1.45; margin: 28px 0; }
.post-body th, .post-body td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.post-body thead th, .post-body tr:first-child th { font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--ink); background: transparent; }
.post-body tbody tr:last-child td { border-bottom: 1px solid var(--line); }
.post-body td p:last-child, .post-body th p:last-child { margin-bottom: 0; }
.post-body th { font-weight: 600; color: var(--ink); }
.post-body .wp-block-table { overflow-x: auto; }
.post-body iframe, .post-body video { max-width: 100%; }
.post-body video { display: block; height: auto; border-radius: 16px; } /* the heat time-lapse, an MP4 in place of a 5 MB GIF (2026-11-12) */
.post-video__toggle { display: inline-flex; align-items: center; margin-top: 10px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--white); font: inherit; font-size: 14.5px; font-weight: 600; color: var(--ink); cursor: pointer; }
.post-video__toggle:hover { border-color: var(--ink); }
.post-body > .wp-block-group, .post-body > .wp-block-columns { margin-top: 22px; }

/* Owner's phone read (2026-11-07). Migrated [caption] figures carry a fixed inline width (figure 800px at 390px viewport):
   cap them to the column. In-post anchors (TOC, references) land under the sticky header: scroll margin = header height. */
.post-body .wp-caption { max-width: 100%; }
.post-body .wp-caption img { max-width: 100%; height: auto; }
.post-body [id] { scroll-margin-top: calc(var(--header-h) + 16px); }
/* Listicle rows that ran past the card edge at 390px. The post-level CSS lives in hemlock_post_css; these win on specificity.
   North Vancouver (7123): wpautop wrapped each control in <p> and added <br>, so the selects left the grid cells.
   Coquitlam (7500) and New Westminster (7453): the tab rows were a single non-wrapping flex line. */
.post-body .hd-controls > p { display: contents; }
.post-body .hd-controls br { display: none; }
.post-body .hd-controls > p > select, .post-body .hd-controls > p > button { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
.post-body .hlp-card-toggles { flex-wrap: wrap; overflow: visible; }
.post-body .hlp-card-toggles br { display: none; }
.post-body .hlp-toggle-row { flex-wrap: wrap; }
.post-body .hlp-toggle-row button { flex: 1 1 calc(50% - 0.5rem); min-width: 0; }
@media (max-width: 719.98px) {
  /* Coquitlam (7500) card header: two columns on phones, so the title and its rating line take a full row of their own. */
  .post-body .hlp-company-card .hlp-company-header { grid-template-columns: auto minmax(0, 1fr); }
  .post-body .hlp-company-card .hlp-company-title { grid-column: 1 / -1; min-width: 0; }
}

.post-foot { background: var(--white); }
.post-foot__inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(28px, 4vw, 56px); align-items: start; padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(40px, 5vw, 64px); }
.author-box { display: flex; gap: 18px; align-items: flex-start; }
.author-box__photo img, .author-box__img { display: block; width: 72px; height: 72px; flex: none; border-radius: var(--radius-pill); object-fit: cover; object-position: 50% 30%; }
.author-box__photo { flex: none; }
.author-box__text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.author-box__name { font-family: var(--font-display); font-size: 24px; line-height: 1.15; color: var(--ink); }
.author-box__bio { font-size: 15.5px; line-height: 1.6; color: var(--text); text-wrap: pretty; }
.author-box__bio a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-hover); }
.keep-reading { display: flex; flex-direction: column; gap: 14px; }
.keep-reading__list { list-style: none; margin: 0; padding: 0; }
.keep-reading__item { display: flex; flex-direction: column; gap: 4px; padding: 14px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.keep-reading__list li:last-child .keep-reading__item { border-bottom: 1px solid var(--line); }
.keep-reading__item:hover .keep-reading__title { text-decoration: underline; text-underline-offset: 4px; }
.keep-reading__title { font-size: 17px; font-weight: 600; line-height: 1.35; }
.keep-reading__kind { font-size: 14px; color: var(--text); }

@media (max-width: 719.98px) {
  .post-head__title { font-size: clamp(32px, 9vw, 40px); }
  .post-body { font-size: 17px; }
}

/* Migrated directory posts: their control grid was sized for the old theme's narrower font; the post's own
   stacked layout (search on its own row, three columns under it) fits the 720px body without overlap. */
.post-body .hemlock-directory .hd-controls { grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 17px; }
.post-body .hemlock-directory .hd-search { grid-column: 1 / -1; }
.post-body svg.lucide { width: 1em; height: 1em; vertical-align: -0.125em; flex: none; }
.post-body .hlp-directory .hlp-controls-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.post-body .hlp-directory .hlp-search-control { grid-column: 1 / -1; }
