/* Shared site design (docs/SHARED-DESIGN-SPEC.md). Colors and font come from design.json (inline :root block). */
body { font-family: var(--font-sans); }
h1,h2,h3,h4,.post-card__title,.header__nav { color: var(--color-primary); }
a:focus-visible,button:focus-visible,summary:focus-visible {
  outline: 3px solid var(--color-primary); outline-offset: 4px;
}
.post-content a:not([class]),.entry-content a:not([class]) {
  text-decoration: underline; text-underline-offset: .18em;
}
.btn.btn--primary,.btn.btn--accent,.acms-card a.acms-btn,
.acms-list a.acms-btn,.acms-grid a.acms-btn {
  background: var(--bgw-yellow); border-color: var(--bgw-yellow);
  color: var(--bgw-navy); font-weight: 700;
}
.btn.btn--primary:hover,.btn.btn--accent:hover,.acms-card a.acms-btn:hover,
.acms-list a.acms-btn:hover,.acms-grid a.acms-btn:hover {
  background: var(--bgw-yellow-hover); border-color: var(--bgw-yellow-hover); color: var(--bgw-navy);
}
.post-card,.acms-card,.acms-list,.acms-grid__item {
  border: 1px solid var(--color-border); box-shadow: none;
}
.post-card:hover { transform: none; box-shadow: 0 2px 8px rgba(var(--bgw-navy-rgb), .06); }
.post-card:hover img { transform: none; }
.post-disclosure { color: var(--color-text-muted); }
.bgw-logo { display: inline-flex; align-items: center; max-width: 100%; }
.bgw-logo img { width: auto; height: 36px; max-width: 210px; object-fit: contain; }
html[data-theme="dark"] .bgw-logo { background: #fff; border-radius: 4px; padding: 2px 5px; }
.bgw-nav { display: flex; align-items: center; gap: 18px; list-style: none; margin: 0; padding: 0; }
.bgw-nav a,.bgw-nav summary { color: var(--color-primary); font-weight: 600; font-size: .875rem; }
.bgw-nav summary { cursor: pointer; white-space: nowrap; }
.bgw-nav a:hover,.bgw-nav summary:hover { text-decoration: underline; text-decoration-color: var(--bgw-yellow); text-underline-offset: 5px; }
.bgw-dropdown { position: relative; }
.bgw-dropdown__panel {
  position: absolute; z-index: 200; top: calc(100% + 12px); left: 0;
  display: grid; grid-template-columns: repeat(4,minmax(120px,1fr)); gap: 20px;
  width: min(760px,80vw); padding: 24px; background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: 8px; box-shadow: 0 4px 16px rgba(var(--bgw-navy-rgb), .08);
}
.bgw-dropdown:not([open]) > .bgw-dropdown__panel { display: none; }
.bgw-dropdown__panel ul { list-style: none; margin: 0; padding: 0; }
.bgw-dropdown__panel a { display: block; padding: 7px 0; font-weight: 400; }
.bgw-nav__label { font-size: .8125rem; margin: 0 0 8px; font-weight: 700; }
.bgw-nav--mobile { display: block; }
.bgw-nav--mobile > li { padding: 10px 0; }
.bgw-nav--mobile .bgw-dropdown__panel {
  position: static; width: auto; grid-template-columns: 1fr; padding: 16px; margin-top: 12px; box-shadow: none;
}
.bgw-nav-empty { color: var(--color-text-muted); line-height: 1.6; }
@media (prefers-reduced-motion: reduce) {
  .post-card,.post-card img { transition: none; }
}
.bgw-nav--planned .bgw-nav__planned-label { color: var(--color-text-secondary); font-weight: 600; font-size: .875rem; white-space: nowrap; }
.bgw-nav--planned .bgw-nav__planned-label::after { content: " · preparing"; color: var(--color-text-muted); font-size: .72rem; font-weight: 400; }
.bgw-home-intro{padding:clamp(2.5rem,6vw,5rem) 0;background:var(--color-bg-alt);text-align:center}.bgw-home-intro h1{max-width:900px;margin:.5rem auto 1rem;color:var(--color-primary);font-size:clamp(2rem,4vw,3.25rem);line-height:1.1}.bgw-home-intro__publisher,.bgw-home-intro__description{color:var(--color-text-secondary)}.bgw-home-intro__description{max-width:700px;margin:0 auto 1.5rem;font-size:1.1rem}.bgw-trust-metrics{display:grid;grid-template-columns:repeat(3,1fr);max-width:820px;margin:2rem auto;gap:1rem}.bgw-trust-metrics div{padding:1rem;background:var(--color-surface);border:1px solid var(--color-border);border-radius:8px}.bgw-trust-metrics strong,.bgw-trust-metrics span{display:block}.bgw-trust-metrics strong{font-size:1.8rem;color:var(--bgw-navy)}.bgw-trust-metrics span{font-size:.85rem;color:var(--color-text-muted)}.bgw-team-brief{padding:3rem 0}.bgw-team-brief h2{color:var(--color-primary)}.bgw-team-brief p{max-width:780px}.bgw-team-brief a{font-weight:700}@media(max-width:639px){.bgw-trust-metrics{grid-template-columns:1fr}.bgw-home-intro h1{font-size:2rem}}

/* Reserve three title lines so Popular This Week rows stay aligned. */
.acms-popular-posts-widget .popular-post__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  line-height: 1.4;
  height: 4.2em;
  overflow: hidden;
}

/* Related, archive and hub cards (.bgw-card): equal title space and uncropped product images. */
.post-card.bgw-card .post-card__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  line-height: 1.4;
  height: 4.2em;
  min-height: 4.2em;
  overflow: hidden;
}
.post-card.bgw-card .post-card__image {
  background-color: #fff;
}
.post-card.bgw-card .post-card__image img {
  position: absolute;
  inset: 0;
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 20px;
  object-fit: contain;
  object-position: center;
  transform: none;
}
.post-card.bgw-card .post-card__image::after {
  background: none;
}

/* Cards show only view count and publication date below the title. */
.post-card.bgw-card .post-card__footer-grid {
  grid-template-columns: auto 1fr;
}
.post-card.bgw-card .post-card__footer-item:last-child {
  justify-self: end;
}

/* Hover: product image zooms slightly in cards and Popular rows. */
.post-card.bgw-card .post-card__image img,
.popular-post__image img {
  transition: transform .3s ease-out;
}
.post-card.bgw-card:hover .post-card__image img,
.post-card.bgw-card:focus-within .post-card__image img {
  transform: scale(1.06);
}
.popular-post:hover .popular-post__image img,
.popular-post:focus-within .popular-post__image img {
  transform: scale(1.08);
}
@media (prefers-reduced-motion: reduce) {
  .post-card.bgw-card .post-card__image img,
  .popular-post__image img { transition: none; transform: none !important; }
}

/* Review team page: reviewer profile cards with a round photo. */
.bgw-reviewer {
  display: flex; align-items: flex-start; gap: 1.25rem;
  margin: 1.25rem 0; padding: 1.25rem;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px;
}
.post-content .bgw-reviewer__photo {
  flex: 0 0 112px; width: 112px; height: 112px; margin: 0;
  border-radius: 50%; object-fit: cover; object-position: center top;
  border: 3px solid var(--bgw-yellow); box-shadow: 0 0 0 3px var(--color-surface), 0 2px 8px rgba(var(--bgw-navy-rgb), .15);
}
.bgw-reviewer > p:has(> .bgw-reviewer__photo) { flex: 0 0 auto; margin: 0; line-height: 0; } /* wpautop may wrap the photo */
.bgw-reviewer__body { min-width: 0; }
.post-content .bgw-reviewer__body h3 { margin-top: 0; }
.post-content .bgw-reviewer__body p:last-child { margin-bottom: 0; }
@media (max-width: 479px) {
  .bgw-reviewer { flex-direction: column; align-items: center; text-align: center; }
  .post-content .bgw-reviewer__photo { flex-basis: auto; width: 96px; height: 96px; }
}

/* Hub pages: section list as a card grid, like Related Articles. */
.bgw-section-cards__grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem;
  margin: 1rem 0 2rem;
}
.post-content .bgw-section-cards h3.bgw-section-cards__group { margin: 2rem 0 .25rem; }
.post-content .bgw-section-cards .post-card__title { margin: 0 0 .75rem; font-size: 1rem; }
.post-content .bgw-section-cards .post-card__title a { color: var(--color-primary); text-decoration: none; border: 0; font-weight: inherit; }
.post-content .bgw-section-cards .post-card__title a:hover { color: var(--color-primary); text-decoration: underline; }
.post-content .bgw-section-cards .post-card__image a { border: 0; text-decoration: none; }
.post-content .bgw-section-cards .post-card__image img { margin: 0; border-radius: 0; max-width: none; }
