/* BastionGuard 1.10.3 — canonical responsive layout for member identity and PNG badges.
   Applied AFTER legacy community CSS. Keep dimensions intrinsic; do not crop badge artwork. */

/* Shared: remove the opposing auto margins and negative PNG margins from older layers. */
body.bbpress .bsg-aurora-page .bsg-member-badge-stack,
body.bbpress #bbpress-forums .bsg-member-badge-stack {
  display: inline-flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 2px !important;
  max-width: 100% !important;
  min-width: 0 !important;
  line-height: normal !important;
}
body.bbpress .bsg-aurora-page .bsg-member-badge-stack > .bsg-member-badge,
body.bbpress #bbpress-forums .bsg-member-badge-stack > .bsg-member-badge,
body.bbpress .bsg-aurora-page .bsg-member-badge-stack > .bsg-member-badge--image-only {
  flex: none !important;
  margin: 0 !important;
  max-width: 100% !important;
  min-width: 0 !important;
}
body.bbpress .bsg-aurora-page .bsg-member-badge-stack .bsg-badge-png {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: min(100%, 160px) !important;
  max-height: 52px !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center !important;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
}
/* Topic/reply author area: one compact centered stack on desktop. */
body.bbpress .bsg-aurora-page .bsg-aurora-post__heading .bsg-aurora-author-badges {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  margin: 3px 0 !important;
  gap: 2px !important;
}
body.bbpress .bsg-aurora-page .bsg-aurora-post__identity .bsg-member-badge-stack,
body.bbpress .bsg-aurora-page .bsg-aurora-author-badges .bsg-member-badge-stack {
  margin: 0 !important;
}
/* Profile: avatar and identity occupy two explicit columns. Badge artwork belongs
   to the identity column UNDER the username, never to the far right of the hero. */
body.bbpress .bsg-aurora-page--profile .bsg-aurora-profile-hero__primary {
  display: grid !important;
  grid-template-columns: 96px minmax(0, 1fr) !important;
  align-items: start !important;
  justify-content: start !important;
  justify-items: start !important;
  column-gap: 18px !important;
  min-width: 0 !important;
  width: 100% !important;
}
body.bbpress .bsg-aurora-page--profile .bsg-aurora-profile-hero__primary > img.avatar {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 96px !important;
  height: 96px !important;
  max-width: 100% !important;
}
body.bbpress .bsg-aurora-page--profile .bsg-aurora-profile-hero__identity {
  grid-column: 2 !important;
  grid-row: 1 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  justify-items: start !important;
  align-items: start !important;
  align-content: start !important;
  justify-content: start !important;
  flex: none !important;
  gap: 3px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}
body.bbpress .bsg-aurora-page--profile .bsg-aurora-profile-hero__identity > :is(small,h2,p,.bsg-aurora-profile-badge-row) {
  grid-column: 1 !important;
  position: static !important;
  float: none !important;
  justify-self: start !important;
  align-self: start !important;
  text-align: left !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
body.bbpress .bsg-aurora-page--profile .bsg-aurora-profile-hero__identity > h2 {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
}
body.bbpress .bsg-aurora-page--profile .bsg-aurora-profile-badge-row {
  display: block !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin: 2px 0 6px !important;
  padding: 0 !important;
}
body.bbpress .bsg-aurora-page--profile .bsg-aurora-profile-badge-row > .bsg-member-badge-stack,
body.bbpress .bsg-aurora-page--profile .bsg-aurora-profile-badge-row .bsg-member-badge {
  align-items: flex-start !important;
  align-self: flex-start !important;
  justify-content: flex-start !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
/* Sidebar profile card intentionally remains centered. */
body.bbpress .bsg-aurora-page--profile .bsg-community-member-card > .bsg-member-badge-stack {
  align-items: center !important;
  margin: 2px auto !important;
}

@media (max-width: 700px) {
  /* Older 1.9.6 styles still impose a two-column desktop post grid. Eliminate it. */
  body.bbpress .bsg-aurora-page .bsg-aurora-conversation > .bsg-aurora-post,
  body.bbpress .bsg-aurora-page .bsg-aurora-conversation .bsg-aurora-post--reply {
    display: block !important;
    grid-template-columns: none !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }
  body.bbpress .bsg-aurora-page .bsg-aurora-conversation .bsg-aurora-post__heading {
    display: grid !important;
    grid-template-columns: 46px minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
    gap: 10px !important;
    align-items: start !important;
    justify-items: start !important;
    text-align: left !important;
    padding: 12px !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(8,107,235,0.2) !important;
    min-height: 0 !important;
  }
  body.bbpress .bsg-aurora-page .bsg-aurora-conversation .bsg-aurora-post__heading > img.avatar {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 46px !important;
    height: 46px !important;
    border-radius: 10px !important;
    max-width: 100% !important;
  }
  body.bbpress .bsg-aurora-page .bsg-aurora-post__identity {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 3px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
  }
  body.bbpress .bsg-aurora-page .bsg-aurora-post__identity .bsg-aurora-author-badges,
  body.bbpress .bsg-aurora-page .bsg-aurora-post__identity .bsg-member-badge-stack {
    align-items: flex-start !important;
    justify-content: flex-start !important;
    align-self: flex-start !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  body.bbpress .bsg-aurora-page .bsg-aurora-post__identity .bsg-member-badge {
    align-self: flex-start !important;
  }
  body.bbpress .bsg-aurora-page .bsg-aurora-post__identity .bsg-badge-png {
    max-height: 44px !important;
    max-width: min(100%, 145px) !important;
  }
  body.bbpress .bsg-aurora-page .bsg-aurora-conversation .bsg-aurora-post__body {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 51px 13px 14px !important;
    overflow-wrap: anywhere;
  }
  body.bbpress .bsg-aurora-page .bsg-aurora-conversation .bsg-aurora-post__actions {
    display: flex !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 12px !important;
  }
  body.bbpress .bsg-aurora-page--profile .bsg-aurora-profile-hero__primary {
    grid-template-columns: 64px minmax(0, 1fr) !important;
    gap: 11px !important;
  }
  body.bbpress .bsg-aurora-page--profile .bsg-aurora-profile-hero__primary > img.avatar {
    width: 64px !important;
    height: 64px !important;
  }
  body.bbpress .bsg-aurora-page--profile .bsg-aurora-profile-hero__identity > h2 {
    font-size: clamp(17px, 5vw, 22px) !important;
  }
}
@media (max-width: 380px) {
  body.bbpress .bsg-aurora-page .bsg-aurora-conversation .bsg-aurora-post__heading {
    grid-template-columns: 40px minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 10px !important;
  }
  body.bbpress .bsg-aurora-page .bsg-aurora-conversation .bsg-aurora-post__heading > img.avatar {
    width: 40px !important;
    height: 40px !important;
  }
}


/* 1.10.3 — discussion title and consistent numeric columns. */
body.bbpress .bsg-aurora-page .bsg-aurora-panel__heading h2.bsg-aurora-discussion-title {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 7px !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
  font-size: clamp(17px, 1.8vw, 22px) !important;
  line-height: 1.4 !important;
}
body.bbpress .bsg-aurora-discussion-title > span:first-child {
  min-width: 0 !important;
}

/* Profile stats: same icon baseline, value/label columns, card height and spacing. */
body.bbpress .bsg-aurora-page--profile .bsg-aurora-profile-hero--enhanced .bsg-aurora-profile-metrics {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
}
body.bbpress .bsg-aurora-page--profile .bsg-aurora-profile-hero--enhanced .bsg-aurora-profile-metrics > .bsg-aurora-profile-metric {
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr) !important;
  grid-template-rows: 1fr !important;
  align-items: center !important;
  justify-items: stretch !important;
  gap: 11px !important;
  min-width: 0 !important;
  min-height: 74px !important;
  padding: 13px 15px !important;
  text-align: left !important;
}
body.bbpress .bsg-aurora-page--profile .bsg-aurora-profile-metric > i {
  display: grid !important;
  place-items: center !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  align-self: center !important;
  margin: 0 !important;
}
body.bbpress .bsg-aurora-page--profile .bsg-aurora-profile-metric__content {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  justify-content: center !important;
  align-items: flex-start !important;
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}
body.bbpress .bsg-aurora-page--profile .bsg-aurora-profile-metric__content strong {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  font-size: 19px !important;
  font-variant-numeric: tabular-nums !important;
  line-height: 1.25 !important;
  text-align: left !important;
}
body.bbpress .bsg-aurora-page--profile .bsg-aurora-profile-metric__content small {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  font-size: 11px !important;
  line-height: 1.3 !important;
  color: #4d5d73 !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  text-align: left !important;
}
/* Forum statistics sidebar stays aligned even for long names and 5-figure counts. */
body.bbpress .bsg-aurora-page .bsg-community-statistics__rows > div {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 12px !important;
  align-items: center !important;
}
body.bbpress .bsg-community-statistics__rows > div > :last-child {
  min-width: 48px !important;
  text-align: right !important;
  font-variant-numeric: tabular-nums !important;
}
/* Every forum category uses the same numbered grid tracks. */
@media (min-width: 1101px) {
  body.bbpress .bsg-aurora-page .bsg-aurora-forum-row {
    grid-template-columns: 50px minmax(0, 2.5fr) minmax(72px, .44fr) minmax(72px, .44fr) minmax(160px, 1.04fr) 22px !important;
  }
}
body.bbpress .bsg-aurora-page .bsg-aurora-forum-row__number strong {
  font-variant-numeric: tabular-nums !important;
  line-height: 1.25 !important;
}
/* Homepage totals: stable three-column grid; unreliable online counter removed. */
body.bbpress .bsg-aurora-page .bsg-aurora-stats {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: min(100%, 720px) !important;
  align-items: stretch !important;
}
body.bbpress .bsg-aurora-page .bsg-aurora-stat {
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr) !important;
  gap: 8px !important;
  justify-content: start !important;
  align-items: center !important;
  padding-right: 7px !important;
  min-width: 0 !important;
  margin: 0 !important;
}
body.bbpress .bsg-aurora-page .bsg-aurora-stat > span:last-child {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  justify-content: center !important;
  align-items: flex-start !important;
  min-width: 0 !important;
}
body.bbpress .bsg-aurora-page .bsg-aurora-stat strong,
body.bbpress .bsg-aurora-page .bsg-aurora-stat small {
  margin: 0 !important;
  line-height: 1.25 !important;
  text-align: left !important;
}
body.bbpress .bsg-aurora-page .bsg-aurora-stat strong {font-variant-numeric: tabular-nums !important;}
@media (max-width: 700px) {
  body.bbpress .bsg-aurora-page--profile .bsg-aurora-profile-hero--enhanced .bsg-aurora-profile-metrics,
  body.bbpress .bsg-aurora-page .bsg-aurora-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body.bbpress .bsg-aurora-page--profile .bsg-aurora-profile-hero--enhanced .bsg-aurora-profile-metrics > .bsg-aurora-profile-metric {
    grid-template-columns: 29px minmax(0, 1fr) !important;
    gap: 7px !important;
    min-height: 65px !important;
    padding: 9px !important;
  }
  body.bbpress .bsg-aurora-page--profile .bsg-aurora-profile-metric > i {
    width: 29px !important;
    height: 29px !important;
    min-width: 29px !important;
    display: grid !important;
  }
  /* Three equally sized tiles instead of leaving a fourth empty slot. */
  body.bbpress .bsg-aurora-page .bsg-aurora-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  body.bbpress .bsg-aurora-page .bsg-aurora-stat {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 3px !important;
    text-align: center !important;
    border: 0 !important;
  }
  body.bbpress .bsg-aurora-page .bsg-aurora-stat > span:last-child {
    align-items: center !important;
    text-align: center !important;
  }
  body.bbpress .bsg-aurora-page .bsg-aurora-stat strong,
  body.bbpress .bsg-aurora-page .bsg-aurora-stat small {
    text-align: center !important;
  }
  body.bbpress .bsg-aurora-page .bsg-aurora-stat small {
    overflow-wrap: anywhere !important;
  }
}
@media (max-width: 370px) {
  body.bbpress .bsg-aurora-page--profile .bsg-aurora-profile-hero--enhanced .bsg-aurora-profile-metrics > .bsg-aurora-profile-metric {
    grid-template-columns: 26px minmax(0, 1fr) !important;
    padding: 8px !important;
    gap: 5px !important;
  }
  body.bbpress .bsg-aurora-page--profile .bsg-aurora-profile-metric > i {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
  }
}
