/* Scoped service navigation; existing brief title, excerpt and body styles stay in place. */
/* The legacy theme forces 58px below every desktop main child with !important. */
body.post-type-archive-hb_ai_brief .site-main > .bf-archive-header { margin-bottom: 24px !important; }
body.post-type-archive-hb_ai_brief .site-main > .hb-brief-navigation { margin-bottom: 12px !important; }
body.post-type-archive-hb_ai_brief .site-main > .hb-brief-results { margin-bottom: 24px !important; }
body.post-type-archive-hb_ai_brief .hb-brief-navigation {
  position: relative;
  margin: 0 0 12px;
  color: #111;
  background: #fff;
  border-bottom: 1px solid #d4d4d4;
}

.hb-brief-navigation__row { display: flex; align-items: stretch; gap: 8px; }
.hb-brief-tabs {
  display: flex;
  flex: 0 1 auto;
  min-width: 0;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: #b8b8b8 transparent;
  padding: 0;
}

.hb-brief-navigation .hb-brief-tab,
.hb-brief-navigation summary {
  box-sizing: border-box;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 12px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: #666;
  background: #fff;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.hb-brief-navigation .hb-brief-tab:hover,
.hb-brief-navigation summary:hover { color: #000; background: #f5f5f5; }
.hb-brief-navigation .hb-brief-tab[aria-current="page"],
.hb-brief-navigation .hb-brief-more--selected > summary {
  border-bottom-color: #111;
  color: #111;
  background: #fff;
  font-weight: 700;
}
.hb-brief-navigation .hb-brief-tab[aria-current="page"] .hb-brief-count,
.hb-brief-more--selected > summary .hb-brief-count { color: #555; }
.hb-brief-count { color: #666; font-size: 12px; font-weight: 450; font-variant-numeric: tabular-nums; }
.hb-brief-navigation .screen-reader-text {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  white-space: nowrap;
}
.hb-brief-navigation .hb-brief-tab:focus-visible,
.hb-brief-navigation summary:focus-visible,
.hb-brief-labels a:focus-visible { outline: 2px solid #777; outline-offset: -3px; }

.hb-brief-more { position: relative; flex: 0 0 auto; padding-top: 0; }
.hb-brief-more > summary { list-style: none; }
.hb-brief-more > summary::-webkit-details-marker { display: none; }
/* Draw the chevron independently of the font's symbol baseline. */
.hb-brief-more__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-left: 2px;
  font-size: 0;
  line-height: 0;
}
.hb-brief-more__arrow::before {
  content: "";
  box-sizing: border-box;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.hb-brief-more[open] .hb-brief-more__arrow::before { transform: translateY(2px) rotate(225deg); }
.hb-brief-more__links {
  position: absolute;
  z-index: 20;
  right: 0;
  top: calc(100% + 3px);
  min-width: 228px;
  max-width: calc(100vw - 44px);
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 4px 16px rgb(0 0 0 / 6%);
}
.hb-brief-more__links .hb-brief-tab { display: flex; justify-content: space-between; border-bottom: 0; }
.hb-brief-more__links .hb-brief-tab[aria-current="page"] { color: #111; background: #f3f3f3; }
.hb-brief-more__links .hb-brief-tab[aria-current="page"] .hb-brief-count { color: #555; }

/* Match the archive's monochrome typography and thin rules. */
body.post-type-archive-hb_ai_brief .paging-navigation {
  margin: 32px 0 56px;
  padding-top: 24px;
  border-top: 1px solid #ddd;
}
body.post-type-archive-hb_ai_brief .paging-navigation .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}
body.post-type-archive-hb_ai_brief .paging-navigation .page-numbers {
  box-sizing: border-box;
  min-width: 44px;
  min-height: 44px;
  height: 44px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: #fff;
  color: #666;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  box-shadow: none;
  transition: background-color .15s, color .15s, border-color .15s;
}
body.post-type-archive-hb_ai_brief .paging-navigation a.page-numbers:hover {
  background: #f3f3f3;
  border-color: #ddd;
  color: #111;
}
body.post-type-archive-hb_ai_brief .paging-navigation .page-numbers.current {
  background: #111;
  border-color: #111;
  color: #fff;
  font-weight: 700;
}
body.post-type-archive-hb_ai_brief .paging-navigation .page-numbers.dots {
  min-width: 24px;
  padding-inline: 3px;
  border: 0;
  background: transparent;
  color: #888;
}
body.post-type-archive-hb_ai_brief .paging-navigation a.page-numbers:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  body.post-type-archive-hb_ai_brief .paging-navigation .page-numbers { transition: none; }
}

body.post-type-archive-hb_ai_brief .bf-editorial-post__body { grid-template-rows: auto auto auto; }
body.post-type-archive-hb_ai_brief .bf-editorial-post__meta { grid-row: 1 / 4; }
body.post-type-archive-hb_ai_brief .bf-editorial-post__title { grid-row: 2; }
body.post-type-archive-hb_ai_brief .bf-editorial-post__excerpt { grid-row: 3; }
.hb-brief-results { margin: 0 0 20px; color: #555; font-size: 13px; line-height: 1.7; }
.hb-brief-labels {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  margin-bottom: 3px;
  font-size: 12px;
  line-height: 1.5;
}
.hb-brief-labels .hb-brief-label {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid #d4d4d4;
  border-radius: 3px;
  color: #444;
  background: #fff;
  text-decoration: none;
}
.hb-brief-labels .hb-brief-label--service { border-color: #111; color: #fff; background: #111; }
.hb-brief-labels .hb-brief-label--service:hover { color: #fff; background: #333; }
.hb-brief-product { color: #333; font-weight: 600; overflow-wrap: anywhere; }
.hb-brief-empty { padding: 38px 0 48px; border-bottom: 1px solid #ddd; color: #333; }
.hb-brief-empty h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.5; }
.hb-brief-empty p { margin: 0; color: #666; font-size: 15px; }

@media (max-width: 768px) {
  .hb-brief-navigation__row { gap: 5px; }
  .hb-brief-navigation .hb-brief-tab, .hb-brief-navigation summary { gap: 5px; padding-inline: 10px; font-size: 13px; }
  .hb-brief-tabs { gap: 0; }
  .hb-brief-labels { margin-bottom: 2px; }
}
