/* ==========================================================================
   TMB Blog (3.9.0)
   File: assets/css/tmb-blog.css — News page, topics (categories) and posts.
   Loaded by inc/blog.php on blog screens only. Phone-first: compact rows and
   swipeable topics on phones; lead story + card grid from 640px up.
   ========================================================================== */

.tmb-blog{ background:var(--tmb-color-bg, #f6f8fb); padding-bottom:var(--tmb-space-8, 64px); }

/* Header band (same as product archives) ----------------------------------- */
.tmb-blog .tmb-arc-hero{ padding:clamp(14px, 2vw, 20px) 0 clamp(14px, 2vw, 18px); background:var(--tmb-color-surface, #fff); border-bottom:1px solid var(--tmb-color-border, #dbe5ef); }
.tmb-blog .tmb-arc-hero__inner{ display:grid; grid-template-columns:minmax(0,1fr); gap:clamp(8px, 1.2vw, 12px); }
.tmb-blog .tmb-arc-hero__inner > *{ min-width:0; }
.tmb-blog .tmb-arc-crumbs ol{ display:flex; flex-wrap:wrap; gap:4px; margin:0; padding:0; list-style:none; font-size:var(--tmb-fs-xs, 12px); color:var(--tmb-color-text-subtle, #64748b); }
.tmb-blog .tmb-arc-crumbs li + li::before{ content:"/"; margin-right:4px; opacity:.6; }
.tmb-blog .tmb-arc-crumbs a{ color:var(--tmb-color-text-muted, #475569); text-decoration:none; }
.tmb-blog .tmb-arc-crumbs a:hover{ color:var(--tmb-color-primary, #0f2740); text-decoration:underline; }
.tmb-blog .tmb-arc-hero__copy{ display:grid; gap:6px; min-width:0; max-width:820px; }
.tmb-blog .tmb-arc-hero__heading{ display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 12px; }
.tmb-blog .tmb-arc-hero__title{ margin:0; font-family:var(--tmb-font-heading, inherit); font-size:clamp(1.6rem, 1.15rem + 1.6vw, 2.4rem); line-height:1.08; letter-spacing:-.03em; color:var(--tmb-color-primary, #0f2740); text-wrap:balance; }
.tmb-blog .tmb-arc-hero__page{ color:var(--tmb-color-text-subtle, #64748b); font-size:.55em; font-weight:600; letter-spacing:0; }
.tmb-blog .tmb-arc-hero__count{ flex:none; padding:2px 10px; border-radius:999px; background:var(--tmb-color-primary-soft, #e7e9ec); color:var(--tmb-color-primary, #0f2740); font-size:var(--tmb-fs-xs, 12px); font-weight:800; white-space:nowrap; }
.tmb-blog-hero__intro{ color:var(--tmb-color-text-muted, #475569); font-size:var(--tmb-fs-sm, 14px); line-height:1.55; }
.tmb-blog-hero__intro p{ margin:0; }

/* Topic chips ------------------------------------------------------------- */
.tmb-blog-topics ul{ display:flex; gap:8px; margin:4px 0 0; padding:0; list-style:none; overflow-x:auto; scrollbar-width:none; -webkit-overflow-scrolling:touch; scroll-snap-type:x proximity; }
.tmb-blog-topics ul::-webkit-scrollbar{ display:none; }
.tmb-blog-topics li{ flex:none; scroll-snap-align:start; }
.tmb-blog-topic{ display:inline-flex; align-items:center; min-height:38px; padding:0 16px; border:1px solid var(--tmb-color-border, #dbe5ef); border-radius:999px; background:var(--tmb-color-surface, #fff); color:var(--tmb-color-text, #0f172a)!important; font-size:var(--tmb-fs-sm, 14px); font-weight:700; text-decoration:none!important; white-space:nowrap; }
.tmb-blog-topic:hover{ border-color:var(--tmb-color-primary, #0f2740); }
.tmb-blog-topic.is-current{ border-color:transparent; background:var(--tmb-btn-bg, var(--tmb-color-primary, #0f2740)); color:var(--tmb-btn-fg, #fff)!important; }

/* Tags -------------------------------------------------------------------- */
.tmb-blog-tags{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:0; }
.tmb-blog-tag{ display:inline-flex; align-items:center; gap:4px; min-height:22px; padding:2px 9px; border-radius:999px; background:color-mix(in srgb, var(--tmb-color-primary, #0f2740) 8%, var(--tmb-color-surface, #fff)); color:var(--tmb-color-primary, #0f2740)!important; font-size:11px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; text-decoration:none!important; white-space:nowrap; }
.tmb-blog-tag.is-promotions{ background:#fef3f2; color:#b42318!important; }
.tmb-blog-tag.is-price-changes{ background:#fffaeb; color:#b54708!important; }
.tmb-blog-tag.is-system-updates{ background:#eff8ff; color:#175cd3!important; }
.tmb-blog-tag.is-lock{ background:var(--tmb-color-surface-muted, #f1f5f9); color:var(--tmb-color-text-muted, #475569)!important; }
.tmb-blog-tag.is-new{ background:var(--tmb-color-accent, #f2b705); color:#1f2937!important; }

/* Cards: phone = compact row ---------------------------------------------- */
.tmb-blog__body{ display:grid; gap:var(--tmb-space-4, 16px); padding-top:var(--tmb-space-4, 16px); }
.tmb-blog-grid{ display:grid; gap:10px; }
.tmb-blog-card{ position:relative; display:grid; grid-template-columns:96px minmax(0,1fr); gap:12px; align-items:start; padding:12px; border:1px solid var(--tmb-card-border, #dbe5ef); border-radius:var(--tmb-radius-md, 14px); background:var(--tmb-card-bg, #fff); box-shadow:var(--tmb-card-shadow, 0 1px 2px rgba(15,23,42,.06)); }
.tmb-blog-card__media{ display:block; aspect-ratio:1; overflow:hidden; border-radius:10px; background:var(--tmb-color-surface-muted, #f1f5f9); text-decoration:none!important; }
.tmb-blog-card__media img{ display:block; width:100%; height:100%; object-fit:cover; }
.tmb-blog-card__media.is-placeholder,
.tmb-post__figure.is-placeholder{ display:flex; align-items:flex-end; padding:8px 10px; background:linear-gradient(135deg, var(--tmb-color-primary, #0f2740), color-mix(in srgb, var(--tmb-color-primary, #0f2740) 70%, #4b6584)); color:rgba(255,255,255,.92); }
.tmb-blog-card__media.is-placeholder span{ display:block; margin:0 2px 2px; font-family:var(--tmb-font-heading, inherit); font-size:12px; font-weight:800; line-height:1.1; letter-spacing:-.01em; }
.tmb-blog-card__media.is-promotions{ background:linear-gradient(135deg, #b73030, #7a1f1f); }
.tmb-blog-card__media.is-price-changes{ background:linear-gradient(135deg, #b54708, #7a2e0e); }
.tmb-blog-card__media.is-system-updates{ background:linear-gradient(135deg, #175cd3, #102a56); }
.tmb-blog-card__body{ display:grid; gap:6px; min-width:0; }
.tmb-blog-card .tmb-blog-tags{ position:relative; z-index:1; }
.tmb-blog-card .tmb-blog-tag.is-lock,.tmb-blog-card .tmb-blog-tag.is-new{ min-height:20px; padding:1px 7px; }
.tmb-blog-card__title{ margin:0; font-family:var(--tmb-font-heading, inherit); font-size:1rem; line-height:1.28; letter-spacing:-.01em; }
.tmb-blog-card__title a{ color:var(--tmb-color-text, #0f172a); text-decoration:none; }
.tmb-blog-card__title a::after{ content:""; position:absolute; inset:0; border-radius:inherit; }
.tmb-blog-card:hover .tmb-blog-card__title a{ text-decoration:underline; text-underline-offset:3px; }
.tmb-blog-card__summary{ margin:0; color:var(--tmb-color-text-muted, #475569); font-size:.88rem; line-height:1.45; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.tmb-blog-card__meta{ display:flex; flex-wrap:wrap; gap:6px; margin:0; color:var(--tmb-color-text-subtle, #64748b); font-size:12px; }
.tmb-blog-card:focus-within{ outline:3px solid color-mix(in srgb, var(--tmb-color-primary, #0f2740) 35%, transparent); outline-offset:2px; }

/* Lead story on phones: full card */
.tmb-blog-card--lead{ grid-template-columns:1fr; padding:0; overflow:hidden; border-radius:var(--tmb-card-radius, 18px); }
.tmb-blog-card--lead .tmb-blog-card__media{ aspect-ratio:16/9; border-radius:0; }
.tmb-blog-card--lead .tmb-blog-card__media.is-placeholder{ padding:16px 18px; }
.tmb-blog-card--lead .tmb-blog-card__media.is-placeholder span{ margin:0 18px 16px; font-size:clamp(1.4rem, 5vw, 2.2rem); }
.tmb-blog-card--lead .tmb-blog-card__body{ gap:8px; padding:16px 16px 18px; }
.tmb-blog-card--lead .tmb-blog-card__title{ font-size:clamp(1.25rem, 1rem + 1.4vw, 1.9rem); line-height:1.15; letter-spacing:-.02em; }
.tmb-blog-card--lead .tmb-blog-card__summary{ font-size:1rem; -webkit-line-clamp:3; }

/* Tablet / desktop: card grid + side-by-side lead */
@media (min-width:640px){
  .tmb-blog__body{ gap:var(--tmb-space-5, 20px); padding-top:var(--tmb-space-5, 20px); }
  .tmb-blog-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--tmb-space-5, 20px); }
  .tmb-blog-card{ grid-template-columns:1fr; grid-template-rows:auto 1fr; gap:0; padding:0; overflow:hidden; border-radius:var(--tmb-card-radius, 18px); transition:transform .18s var(--tmb-ease-standard, ease), box-shadow .18s var(--tmb-ease-standard, ease); }
  .tmb-blog-card:hover{ transform:translateY(-2px); box-shadow:var(--tmb-shadow-md, 0 8px 24px rgba(15,23,42,.12)); }
  .tmb-blog-card__media{ aspect-ratio:16/9; border-radius:0; }
  .tmb-blog-card__media.is-placeholder{ padding:16px 18px; }
  .tmb-blog-card__media.is-placeholder span{ margin:0 18px 14px; font-size:1.5rem; }
  .tmb-blog-card__body{ gap:8px; padding:18px 20px 20px; align-content:start; }
  .tmb-blog-card__title{ font-size:1.12rem; }
  .tmb-blog-card__summary{ font-size:.94rem; -webkit-line-clamp:3; }
  .tmb-blog-card__meta{ margin-top:auto; padding-top:4px; }
}
@media (min-width:900px){
  .tmb-blog-card--lead{ grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); grid-template-rows:auto; }
  .tmb-blog-card--lead .tmb-blog-card__media{ aspect-ratio:auto; min-height:320px; height:100%; }
  .tmb-blog-card--lead .tmb-blog-card__body{ align-content:center; gap:12px; padding:clamp(24px, 3vw, 40px); }
  .tmb-blog-card--lead .tmb-blog-card__summary{ font-size:1.05rem; -webkit-line-clamp:4; }
}
@media (min-width:1024px){ .tmb-blog-grid{ grid-template-columns:repeat(3,minmax(0,1fr)); } }

/* Pagination + empty -------------------------------------------------------- */
.tmb-blog-pagination{ display:flex; justify-content:center; margin-top:var(--tmb-space-3, 12px); }
.tmb-blog-empty{ display:grid; justify-items:center; gap:8px; padding:clamp(32px, 6vw, 56px) 20px; border:1px dashed var(--tmb-color-border, #dbe5ef); border-radius:var(--tmb-card-radius, 18px); background:var(--tmb-color-surface, #fff); text-align:center; }
.tmb-blog-empty h2{ margin:0; font-size:1.25rem; }
.tmb-blog-empty p{ margin:0 0 8px; color:var(--tmb-color-text-muted, #475569); }

/* Single post ----------------------------------------------------------------- */
.tmb-blog-single{ background:var(--tmb-color-surface, #fff); padding-bottom:0; }
.tmb-post__narrow{ max-width:760px; }
.tmb-post__head{ padding:clamp(16px, 3vw, 40px) 0 clamp(16px, 2.4vw, 24px); }
.tmb-post__head .tmb-post__narrow{ display:grid; gap:12px; }
.tmb-post__title{ margin:0; font-family:var(--tmb-font-heading, inherit); font-size:clamp(1.75rem, 1.2rem + 2.6vw, 3rem); line-height:1.08; letter-spacing:-.03em; color:var(--tmb-color-primary, #0f2740); text-wrap:balance; }
.tmb-post__lede{ margin:0; color:var(--tmb-color-text-muted, #475569); font-size:clamp(1.05rem, 1rem + .35vw, 1.25rem); line-height:1.5; }
.tmb-post__meta{ display:flex; flex-wrap:wrap; align-items:center; gap:6px 14px; padding-top:12px; border-top:1px solid var(--tmb-color-border-subtle, #eef2f6); color:var(--tmb-color-text-subtle, #64748b); font-size:var(--tmb-fs-sm, 14px); }
.tmb-post__by{ display:inline-flex; align-items:center; gap:8px; color:var(--tmb-color-text, #0f172a); font-weight:700; }
.tmb-post__avatar{ display:inline-grid; place-items:center; width:28px; height:28px; border-radius:50%; background:var(--tmb-color-primary, #0f2740); color:#fff; font-size:13px; font-weight:800; }
.tmb-post__share{ display:inline-flex; align-items:center; gap:6px; min-height:36px; margin-left:auto; padding:0 14px; border:1px solid var(--tmb-color-border, #dbe5ef); border-radius:999px; background:var(--tmb-color-surface, #fff); color:var(--tmb-color-text, #0f172a); font:inherit; font-size:var(--tmb-fs-sm, 14px); font-weight:700; cursor:pointer; }
.tmb-post__share:hover{ border-color:var(--tmb-color-primary, #0f2740); }
.tmb-post__figure{ max-width:1040px; margin:0 auto clamp(20px, 3vw, 36px); }
.tmb-post__head .tmb-post__narrow > *{ min-width:0; }
.tmb-post__figure img{ display:block; width:100%; height:auto; aspect-ratio:2/1; object-fit:cover; border-radius:var(--tmb-card-radius, 18px); }

/* Body: readable, and safe for email-built content from TMB Marketing */
.tmb-post__body{ font-size:clamp(1rem, .96rem + .2vw, 1.09rem); line-height:1.7; color:var(--tmb-color-text, #0f172a); overflow-wrap:anywhere; }
.tmb-post__body > :first-child{ margin-top:0; }
.tmb-post__body h1,.tmb-post__body h2,.tmb-post__body h3{ font-family:var(--tmb-font-heading, inherit); line-height:1.2; letter-spacing:-.02em; color:var(--tmb-color-primary, #0f2740); }
.tmb-post__body h1{ font-size:clamp(1.5rem, 1.2rem + 1.2vw, 2rem)!important; }
.tmb-post__body h2{ font-size:clamp(1.3rem, 1.1rem + .8vw, 1.6rem)!important; margin:1.6em 0 .5em; }
.tmb-post__body img{ max-width:100%!important; height:auto!important; border-radius:12px; }
.tmb-post__body table{ max-width:100%!important; }
.tmb-post__body table[width],.tmb-post__body table[style*="width"]{ width:100%!important; }
.tmb-post__body td{ word-break:normal; }
.tmb-post__body a{ color:var(--tmb-color-primary, #0f2740); text-underline-offset:3px; }
.tmb-post__body blockquote{ margin:1.5em 0; padding:4px 0 4px 18px; border-left:4px solid var(--tmb-color-accent, #f2b705); color:var(--tmb-color-text-muted, #475569); }

.tmb-post__foot{ display:grid; gap:16px; margin:clamp(28px, 4vw, 48px) 0 clamp(32px, 5vw, 56px); padding-top:20px; border-top:1px solid var(--tmb-color-border, #dbe5ef); }
.tmb-post__foot .tmb-button{ justify-self:start; }
.tmb-post__nav{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.tmb-post__navlink{ display:grid; gap:2px; padding:14px 16px; border:1px solid var(--tmb-color-border, #dbe5ef); border-radius:var(--tmb-radius-md, 14px); color:inherit; text-decoration:none!important; }
.tmb-post__navlink:hover{ border-color:var(--tmb-color-primary, #0f2740); }
.tmb-post__navlink small{ color:var(--tmb-color-text-subtle, #64748b); font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; }
.tmb-post__navlink strong{ color:var(--tmb-color-text, #0f172a); line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.tmb-post__navlink.is-next{ grid-column:2; text-align:right; }
.tmb-post__navlink.is-prev small::before{ content:"← "; }
.tmb-post__navlink.is-next small::after{ content:" →"; }

.tmb-blog-more{ padding:clamp(28px, 4vw, 48px) 0 clamp(40px, 6vw, 72px); background:var(--tmb-color-bg, #f6f8fb); border-top:1px solid var(--tmb-color-border, #dbe5ef); }
.tmb-blog-more__head{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:16px; }
.tmb-blog-more__head h2{ margin:0; font-family:var(--tmb-font-heading, inherit); font-size:clamp(1.25rem, 1.05rem + .8vw, 1.6rem); letter-spacing:-.02em; color:var(--tmb-color-primary, #0f2740); }
.tmb-blog-more__head a{ color:var(--tmb-color-primary, #0f2740); font-weight:800; text-decoration:none; white-space:nowrap; }

@media (max-width:639.98px){
  .tmb-post__share{ margin-left:0; }
  .tmb-post__meta .tmb-post__share span{ display:inline; }
  .tmb-post__figure{ margin-left:0; margin-right:0; padding:0; }
  .tmb-post__figure img{ border-radius:0; aspect-ratio:16/10; }
  .tmb-post__nav{ grid-template-columns:1fr; }
  .tmb-post__navlink.is-next{ grid-column:auto; text-align:left; }
  .tmb-post__foot .tmb-button{ justify-self:stretch; justify-content:center; }
}
@media (prefers-reduced-motion:reduce){ .tmb-blog-card{ transition:none; } .tmb-blog-card:hover{ transform:none; } }
