/*
 * The glass Brand Hub — layout + motion for the pieces in this folder.
 * Every colour comes from the --md-* contract (macro-themes.css); no hex here,
 * so the page follows glass-cleaned light and dark with the app toggle.
 * Motion is transform/opacity/stroke only and switches off under
 * prefers-reduced-motion.
 */

/* ───────────────────────────── page rhythm */
.bhg-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.bhg-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.bhg-crumb {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.bhg-crumb-title {
  font-size: 15px;
  font-weight: 750;
  color: var(--md-text);
  letter-spacing: -0.01em;
}
.bhg-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.bhg-panel-in {
  animation: bhg-rise 280ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* ───────────────────────────── pulse tiles */
.bhg-pulse {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}
@media (max-width: 900px) {
  .bhg-pulse {
    grid-template-columns: minmax(0, 1fr);
  }
}
.bhg-tile {
  padding: 16px 18px 14px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bhg-tile-label {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--md-text-muted);
}
.bhg-tile-value {
  font-family: var(--md-font-display);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--md-text);
  margin-top: 6px;
}
.bhg-tile-value[data-tone="negative"] {
  color: var(--md-negative);
}
.bhg-tile-value[data-tone="positive"] {
  color: var(--md-positive);
}
.bhg-tile-caption {
  font-size: 12px;
  line-height: 1.45;
  color: var(--md-text-secondary);
}
.bhg-spark {
  display: block;
  width: 100%;
  height: 46px;
  margin-top: 8px;
  overflow: visible;
}

/* ───────────────────────────── charts */
.bhg-chart {
  position: relative;
  width: 100%;
  min-width: 0;
}
.bhg-grid {
  stroke: var(--md-border);
  stroke-width: 1;
  opacity: 0.7;
}
.bhg-axis {
  font-size: 10px;
  fill: var(--md-text-muted);
  font-variant-numeric: tabular-nums;
}
.bhg-baseline {
  stroke: var(--md-border-strong);
  stroke-width: 1.2;
  stroke-dasharray: 4 4;
}
.bhg-baseline-label {
  font-size: 10px;
  font-weight: 650;
  fill: var(--md-text-muted);
}
.bhg-cross {
  stroke: var(--md-border-strong);
  stroke-width: 1;
}
.bhg-hoverdot {
  stroke: var(--md-surface-3);
  stroke-width: 2;
}
.bhg-dlabel {
  font-size: 11px;
  font-weight: 600;
  fill: var(--md-text-secondary);
}
.bhg-dlabel-strong {
  font-weight: 750;
  fill: var(--md-text);
}
.bhg-dlabel-val {
  font-variant-numeric: tabular-nums;
  fill: var(--md-text-muted);
  font-weight: 600;
}
.bhg-tip {
  position: absolute;
  z-index: 2;
  width: 188px;
  padding: 8px 10px;
  border-radius: var(--md-radius-sm);
  border: 1px solid var(--md-border);
  background: var(--md-surface-3);
  box-shadow: var(--md-shadow);
  pointer-events: none;
}
.bhg-tip-title {
  font-size: 11px;
  font-weight: 750;
  color: var(--md-text);
  margin-bottom: 4px;
}
.bhg-tip-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  line-height: 1.6;
  color: var(--md-text-secondary);
}
.bhg-tip-swatch {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}
.bhg-tip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bhg-tip-val {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--md-text);
}

/* ───────────────────────────── movement band */
.bhg-move {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}
@media (max-width: 1023px) {
  .bhg-move {
    grid-template-columns: minmax(0, 1fr);
  }
}
.bhg-movers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.bhg-mover {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-radius: var(--md-radius-sm);
  background: var(--md-surface-2);
  border: 1px solid var(--md-border);
  min-width: 0;
}
.bhg-mover-tag {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.bhg-mover-tag[data-role="riser"] {
  color: var(--md-accent-text, var(--md-accent));
}
.bhg-mover-tag[data-role="faller"] {
  color: var(--md-warning);
}
.bhg-mover-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--md-text);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bhg-mover-line {
  font-size: 12px;
  color: var(--md-text-secondary);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.bhg-mover-btn {
  margin-top: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--md-accent-text, var(--md-accent));
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.bhg-mover-btn:focus-visible {
  outline: 2px solid var(--md-accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.bhg-note {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--md-text-muted);
  margin-top: 8px;
}

/* ───────────────────────────── rhythm */
.bhg-rhythm {
  display: block;
  width: 100%;
  overflow: visible;
}
.bhg-bar {
  transform-box: fill-box;
  transform-origin: bottom;
  animation: bhg-grow 520ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* ───────────────────────────── lean-in list */
.bhg-lean {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.bhg-lean-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-radius: var(--md-radius-sm);
  background: var(--md-surface-2);
  font-size: 13px;
  min-width: 0;
}
.bhg-lean-name {
  font-weight: 700;
  color: var(--md-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bhg-lean-meta {
  font-size: 11.5px;
  color: var(--md-text-secondary);
  font-variant-numeric: tabular-nums;
}
.bhg-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 8px;
}
.bhg-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--md-text-secondary);
  min-width: 0;
}
.bhg-legend-item[data-strong="true"] {
  color: var(--md-text);
  font-weight: 650;
}
.bhg-legend-swatch {
  width: 10px;
  height: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}
.bhg-legend-val {
  font-variant-numeric: tabular-nums;
  color: var(--md-text-muted);
}


/* ───────────────────────────── lift bars (diverging around "your average") */
.bhg-lift {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.bhg-lift-legend,
.bhg-lift-row {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.5fr) 52px;
  gap: 14px;
  align-items: center;
  min-width: 0;
}
.bhg-lift-legend {
  padding: 0 10px 6px;
}
.bhg-lift-legend-track {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--md-text-muted);
}
.bhg-lift-legend-track > span:first-child {
  text-align: left;
}
.bhg-lift-legend-track > span:last-child {
  text-align: right;
}
.bhg-lift-legend-mid {
  color: var(--md-text-secondary);
}
.bhg-lift-row {
  padding: 9px 10px;
  /* The name column's scope line wraps (One Product round 2, text-shortening): the row's parts sit at the top so
     a two-line scope keeps the bar and the figure beside the name. */
  align-items: start;
  border-radius: var(--md-radius-sm);
  border-top: 1px solid var(--md-border);
  text-align: left;
  background: transparent;
  width: 100%;
  font: inherit;
  color: inherit;
}
.bhg-lift-row:first-of-type {
  border-top: none;
}
.bhg-lift-row-btn {
  cursor: pointer;
  border-left: none;
  border-right: none;
  border-bottom: none;
  transition: background 160ms ease;
}
.bhg-lift-row-btn:hover {
  background: var(--md-surface-2);
}
.bhg-lift-row-btn:focus-visible {
  outline: 2px solid var(--md-accent);
  outline-offset: -2px;
}
.bhg-lift-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.bhg-lift-label {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--md-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* The scope line carries the base, the verdict, the share and the category's figure — never cut on screen
   ("vs your typical post · Test it · und…"): it wraps. Only the name above may end in an ellipsis. */
.bhg-lift-sub {
  font-size: 11.5px;
  color: var(--md-text-muted);
  white-space: normal;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.bhg-lift-track {
  position: relative;
  height: 12px;
  /* On the name's first line when the row aligns to the top. */
  margin-top: 4px;
  border-radius: 999px;
  background: var(--md-surface-2);
  min-width: 0;
}
.bhg-lift-mid {
  position: absolute;
  left: 50%;
  top: -4px;
  bottom: -4px;
  width: 1.5px;
  margin-left: -0.75px;
  background: var(--md-border-strong);
  border-radius: 1px;
}
.bhg-lift-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: var(--md-text-muted);
  opacity: 0.55;
  animation: bhg-grow-x 620ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.bhg-lift-bar[data-tone="working"] {
  background: var(--md-positive);
  opacity: 0.9;
}
.bhg-lift-bar[data-tone="short"] {
  background: var(--md-warning);
  opacity: 0.9;
}
.bhg-lift-val {
  font-size: 13px;
  font-weight: 750;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--md-text-secondary);
}
.bhg-lift-val[data-tone="working"] {
  color: var(--md-positive);
}
.bhg-lift-val[data-tone="short"] {
  color: var(--md-warning);
}
@media (max-width: 560px) {
  .bhg-lift-legend {
    display: none;
  }
  .bhg-lift-row {
    grid-template-columns: minmax(0, 1fr) 48px;
    grid-template-areas: "name val" "track track";
    row-gap: 6px;
  }
  .bhg-lift-row .bhg-lift-name {
    grid-area: name;
  }
  .bhg-lift-row .bhg-lift-val {
    grid-area: val;
  }
  .bhg-lift-row .bhg-lift-track {
    grid-area: track;
  }
}
@keyframes bhg-grow-x {
  from {
    transform: scaleX(0);
  }
}


/* ───────────────────────────── stacks, briefs, meters */
.bhg-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.bhg-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}
.bhg-two > :only-child {
  grid-column: 1 / -1;
}
@media (max-width: 900px) {
  .bhg-two {
    grid-template-columns: minmax(0, 1fr);
  }
}
.bhg-brief {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 24px;
  padding: 22px 24px;
  min-width: 0;
}
.bhg-brief > :only-child {
  grid-column: 1 / -1;
}
@media (max-width: 760px) {
  .bhg-brief {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 18px;
  }
}
.bhg-brief-title {
  font-family: var(--gs-serif);
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--md-text);
  margin: 8px 0 6px;
}
.bhg-brief-title em {
  font-style: normal;
  color: var(--md-accent-text, var(--md-accent));
}
.bhg-brief-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--md-text-secondary);
  max-width: 62ch;
}
.bhg-brief-stat {
  border-left: 1px solid var(--md-border);
  padding-left: 22px;
  min-width: 0;
}
@media (max-width: 760px) {
  .bhg-brief-stat {
    border-left: none;
    border-top: 1px solid var(--md-border);
    padding: 14px 0 0;
  }
}
.bhg-inline-stat {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}
.bhg-inline-stat-value {
  font-family: var(--md-font-display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--md-text);
  line-height: 1;
}
.bhg-inline-stat-label {
  font-size: 13px;
  color: var(--md-text-secondary);
}
.bhg-meters {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.bhg-meter-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.bhg-meter-label {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--md-text);
}
.bhg-meter-val {
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--md-text);
}
.bhg-meter-track {
  margin-top: 6px;
  height: 8px;
  border-radius: 999px;
  background: var(--md-surface-2);
  overflow: hidden;
}
.bhg-meter-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--md-accent);
  transform-origin: left center;
  animation: bhg-grow-x 620ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.bhg-meter-hint {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--md-text-muted);
}
.bhg-bullets {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bhg-bullets li {
  position: relative;
  padding-left: 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--md-text-secondary);
}
.bhg-bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--md-accent);
}
.bhg-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}


/* ───────────────────────────── splits, pairings, report modules */
.bhg-split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  min-width: 0;
}
@media (max-width: 1100px) {
  .bhg-split {
    grid-template-columns: minmax(0, 1fr);
  }
}
.bhg-two-tight {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  min-width: 0;
}
.bhg-two-tight > :only-child {
  grid-column: 1 / -1;
}
@media (max-width: 700px) {
  .bhg-two-tight {
    grid-template-columns: minmax(0, 1fr);
  }
}
.bhg-col-label {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--md-text-muted);
}
.bhg-col-label[data-tone="working"] {
  color: var(--md-positive);
}
.bhg-col-label[data-tone="short"] {
  color: var(--md-warning);
}
.bhg-bullets[data-tone="working"] li::before {
  background: var(--md-positive);
}
.bhg-bullets[data-tone="short"] li::before {
  background: var(--md-warning);
}
.bhg-pairs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.bhg-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-radius: var(--md-radius-sm);
  background: var(--md-surface-2);
  border: 1px solid transparent;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  min-width: 0;
}
.bhg-pair-btn {
  cursor: pointer;
  transition: border-color 160ms ease;
}
.bhg-pair-btn:hover {
  border-color: var(--md-border-strong);
}
.bhg-pair-btn:focus-visible {
  outline: 2px solid var(--md-accent);
  outline-offset: 2px;
}
.bhg-pair-name {
  font-size: 13px;
  font-weight: 650;
  color: var(--md-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bhg-modules {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.bhg-module {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name go" "tldr go";
  column-gap: 14px;
  row-gap: 3px;
  align-items: center;
  padding: 12px 4px;
  border: none;
  border-top: 1px solid var(--md-border);
  background: transparent;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  width: 100%;
  min-width: 0;
}
.bhg-module:first-child {
  border-top: none;
}
.bhg-module:hover .bhg-module-go {
  transform: translateX(3px);
  color: var(--md-accent-text, var(--md-accent));
}
.bhg-module:focus-visible {
  outline: 2px solid var(--md-accent);
  outline-offset: 2px;
  border-radius: 6px;
}
.bhg-module-name {
  grid-area: name;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--md-text);
}
.bhg-module-tldr {
  grid-area: tldr;
  font-size: 13px;
  line-height: 1.5;
  color: var(--md-text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bhg-module-go {
  grid-area: go;
  color: var(--md-text-muted);
  transition: transform 160ms ease, color 160ms ease;
}
.bhg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}


/* ───────────────────────────── ratio tiles (paid vs organic) */
.bhg-ratio-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  min-width: 0;
}
.bhg-ratio {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: var(--md-radius-sm);
  background: var(--md-surface-2);
  min-width: 0;
}
.bhg-ratio-value {
  font-family: var(--md-font-display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--md-positive);
}
.bhg-ratio-value[data-tone="short"] {
  color: var(--md-warning);
}
.bhg-ratio-label {
  font-size: 12px;
  line-height: 1.4;
  color: var(--md-text-secondary);
}
.gs-chip[data-tone="quiet"] {
  color: var(--md-text-secondary);
  background: var(--md-surface-2);
}


/* ───────────────────────────── format map */
.bhg-caption {
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
  fill: var(--md-text-muted);
}
.bhg-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: bhg-pop 420ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.bhg-dot-mark {
  fill: var(--md-text-muted);
  fill-opacity: 0.55;
  stroke: var(--md-surface-3);
  stroke-width: 1.5;
}
.bhg-dot-mark[data-tone="working"] {
  fill: var(--md-positive);
  fill-opacity: 0.9;
}
.bhg-dot-mark[data-tone="short"] {
  fill: var(--md-warning);
  fill-opacity: 0.85;
}
.bhg-dot-halo {
  fill: none;
  stroke: var(--md-positive);
  stroke-opacity: 0.35;
  stroke-width: 2;
}
@keyframes bhg-pop {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
}

/* ───────────────────────────── motion */
.bhg-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: bhg-draw 900ms cubic-bezier(0.3, 0.6, 0.2, 1) forwards;
}
.bhg-raw,
.bhg-label-in {
  animation: bhg-fade 500ms ease-out both;
  animation-delay: 650ms;
}
@keyframes bhg-draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes bhg-fade {
  from {
    opacity: 0;
  }
}
@keyframes bhg-grow {
  from {
    transform: scaleY(0);
  }
}
@keyframes bhg-rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .bhg-draw {
    animation: none;
    stroke-dasharray: none;
    stroke-dashoffset: 0;
  }
  .bhg-raw,
  .bhg-label-in,
  .bhg-bar,
  .bhg-lift-bar,
  .bhg-meter-fill,
  .bhg-dot,
  .bhg-panel-in {
    animation: none;
  }
}
.bhg-chips .gs-chip {
  font-size: 12px;
  padding: 4px 11px;
}
