/* Audience shift board revamp */

#ba {
  position: relative;
  background: var(--bg2);
  padding: 0;
  display: block;
  min-height: auto;
  grid-template-columns: unset;
}

#ba .ba-wrap {
  max-width: 1280px;
  margin: 0 auto;
}

#ba .bah {
  text-align: center;
  margin: 0 auto clamp(36px, 5vw, 52px);
  padding-bottom: 0.2em;
  max-width: 980px;
}

#ba .bah .ba-head {
  margin: 0;
  line-height: 1.12;
}

#ba .bah .ba-head em {
  font-style: italic;
  color: var(--orange-em);
}

#ba .bah .ba-head.copy-unified em {
  font-style: normal;
  font-weight: 400;
  color: var(--text);
}

#ba .ba-payoff {
  margin: clamp(2rem, 4.5vw, 3.25rem) auto 0;
  max-width: 520px;
  padding: clamp(1rem, 2vw, 1.35rem) clamp(1.25rem, 3vw, 2rem);
  text-align: center;
  font-family: var(--sans);
  font-size: clamp(1rem, 1.55vw, 1.15rem);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: var(--text);
  border: 1px solid rgba(196, 104, 42, 0.22);
  border-radius: 10px;
  background: linear-gradient(
    180deg,
    rgba(196, 104, 42, 0.08) 0%,
    rgba(196, 104, 42, 0.02) 100%
  );
  box-shadow: 0 0 40px rgba(196, 104, 42, 0.06);
}

#ba .ba-payoff em {
  font-style: italic;
  font-weight: 500;
  color: var(--orange-em);
}

:is(.theme-v1, .theme-v2) #ba .bah {
  padding: 0 0 0.2em;
  max-width: 980px;
}

#ba .ba-board {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 76px 1fr;
  gap: 16px;
  align-items: stretch;
  margin-top: 4px;
  isolation: isolate;
}

#ba .ba-board::before {
  content: '';
  position: absolute;
  left: -8px;
  right: -8px;
  bottom: -8px;
  top: 0;
  border-radius: 26px;
  pointer-events: none;
  background: radial-gradient(ellipse at 15% 0%, rgba(224, 90, 26, 0.14), transparent 45%),
    radial-gradient(ellipse at 85% 100%, rgba(232, 184, 90, 0.12), transparent 48%);
  opacity: 0.6;
  z-index: 0;
}

#ba .ba-col {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 22px;
  border: 1px solid rgba(138, 128, 120, 0.2);
  background: rgba(18, 14, 10, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
}

#ba .ba-col::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.06) 40%, transparent 58%);
  transform: translateX(-120%);
  transition: transform 900ms cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: none;
}

#ba .ba-board.on .ba-col::after {
  transform: translateX(120%);
}

#ba .ba-col--after {
  border-color: rgba(224, 90, 26, 0.35);
  background: linear-gradient(
      140deg,
      rgba(224, 90, 26, 0.09),
      rgba(224, 90, 26, 0.02) 45%,
      rgba(18, 14, 10, 0.45) 100%
    );
  box-shadow: 0 18px 48px rgba(224, 90, 26, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#ba .balbl {
  display: block;
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

#ba .ba-col--before .balbl {
  color: var(--dim);
}

#ba .ba-col--after .balbl {
  color: var(--orange);
}

#ba .ba-rows {
  display: grid;
  gap: 10px;
}

#ba .ba-row {
  border-radius: 14px;
  padding: 12px 12px 10px;
  border: 1px solid rgba(138, 128, 120, 0.13);
  background: rgba(10, 8, 5, 0.22);
  transition: border-color 0.35s ease, transform 0.35s ease, background 0.35s ease;
}

#ba .ba-row__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 8px;
}

#ba .ba-col--after .ba-row:hover {
  border-color: rgba(224, 90, 26, 0.45);
  background: rgba(224, 90, 26, 0.07);
  transform: translateY(-2px);
}

#ba .ba-meter {
  height: 6px;
  border-radius: 999px;
  background: rgba(138, 128, 120, 0.16);
  overflow: hidden;
}

#ba .ba-meter__fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#ba .ba-col--before .ba-meter__fill {
  background: linear-gradient(
    90deg,
    rgba(194, 186, 170, 0.35) 0%,
    rgba(176, 168, 152, 0.95) 45%,
    rgba(138, 128, 120, 0.75) 100%
  );
}

#ba .ba-col--after .ba-meter__fill {
  background: linear-gradient(
    90deg,
    #c94e14 0%,
    var(--orange) 35%,
    var(--gold2) 70%,
    #f0c878 100%
  );
  box-shadow: 0 0 16px rgba(224, 90, 26, 0.35);
}

#ba .ba-board.on .ba-row {
  animation: baRowLift 500ms ease both;
}

#ba .ba-board.on .ba-row:nth-child(2) { animation-delay: 70ms; }
#ba .ba-board.on .ba-row:nth-child(3) { animation-delay: 120ms; }
#ba .ba-board.on .ba-row:nth-child(4) { animation-delay: 170ms; }
#ba .ba-board.on .ba-row:nth-child(5) { animation-delay: 220ms; }

#ba .ba-board.on .ba-meter__fill {
  width: var(--w);
}

#ba .ba-board.on .ba-col--before .ba-row:nth-child(1) .ba-meter__fill { transition-delay: 0.05s; }
#ba .ba-board.on .ba-col--before .ba-row:nth-child(2) .ba-meter__fill { transition-delay: 0.12s; }
#ba .ba-board.on .ba-col--before .ba-row:nth-child(3) .ba-meter__fill { transition-delay: 0.19s; }
#ba .ba-board.on .ba-col--before .ba-row:nth-child(4) .ba-meter__fill { transition-delay: 0.26s; }
#ba .ba-board.on .ba-col--before .ba-row:nth-child(5) .ba-meter__fill { transition-delay: 0.33s; }

#ba .ba-board.on .ba-col--after .ba-row:nth-child(1) .ba-meter__fill { transition-delay: 0.08s; }
#ba .ba-board.on .ba-col--after .ba-row:nth-child(2) .ba-meter__fill { transition-delay: 0.16s; }
#ba .ba-board.on .ba-col--after .ba-row:nth-child(3) .ba-meter__fill { transition-delay: 0.24s; }
#ba .ba-board.on .ba-col--after .ba-row:nth-child(4) .ba-meter__fill { transition-delay: 0.32s; }
#ba .ba-board.on .ba-col--after .ba-row:nth-child(5) .ba-meter__fill { transition-delay: 0.4s; }

#ba .ba-col--after .ba-delta {
  opacity: 0;
  transition: opacity 0.45s ease 1.05s;
}

#ba .ba-board.on .ba-col--after .ba-delta {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  #ba .ba-board.on .ba-meter__fill {
    width: var(--w);
    transition: none;
  }

  #ba .ba-board.on .ba-col--after .ba-delta {
    opacity: 1;
    transition: none;
  }
}

#ba .ba-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#ba .ba-mid__line {
  width: 1px;
  flex: 1;
  min-height: 64px;
  background: linear-gradient(to bottom, transparent, rgba(224, 90, 26, 0.45), transparent);
}

#ba .ba-mid__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 1px solid rgba(224, 90, 26, 0.45);
  color: var(--gold2);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(224, 90, 26, 0.08);
  box-shadow: 0 0 20px rgba(224, 90, 26, 0.18);
}

#ba .ba-delta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold2);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(224, 90, 26, 0.32);
  background: rgba(224, 90, 26, 0.12);
  white-space: nowrap;
}

@keyframes baRowLift {
  from { transform: translateY(8px); opacity: 0.5; }
  to { transform: translateY(0); opacity: 1; }
}

body.theme-light #ba {
  background: var(--bg);
}

body.theme-light #ba .ba-col {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(52, 44, 36, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body.theme-light #ba .ba-col--after {
  border-color: rgba(201, 78, 20, 0.35);
  background: linear-gradient(140deg, rgba(201, 78, 20, 0.08), rgba(255, 255, 255, 0.7));
  box-shadow: 0 14px 34px rgba(201, 78, 20, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

body.theme-light #ba .ba-board::before {
  background: radial-gradient(ellipse at 15% 0%, rgba(201, 78, 20, 0.14), transparent 45%),
    radial-gradient(ellipse at 85% 100%, rgba(184, 134, 46, 0.12), transparent 48%);
}

@media (max-width: 980px) {
  #ba .ba-board {
    grid-template-columns: 1fr;
  }

  #ba .ba-mid {
    flex-direction: row;
    justify-content: center;
  }

  #ba .ba-mid__line {
    width: 72px;
    height: 1px;
    min-height: 0;
    background: linear-gradient(to right, transparent, rgba(224, 90, 26, 0.45), transparent);
  }
}
