.leg-hero {
    position: relative;
    background: #0B1220;  /* default dark — fallback for unknown party */
    color: #FFFFFF;
    padding: var(--sp-12) 0 var(--sp-10);
    overflow: hidden;
  }
  /* Solid party-themed backgrounds with a diagonal gradient for depth */
  .leg-hero[data-party="D"] {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 60%, #172554 100%);
  }
  .leg-hero[data-party="R"] {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 60%, #7f1d1d 100%);
  }
  .leg-hero[data-party="I"] {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 60%, #4c1d95 100%);
  }
  /* Subtle radial accent on top so it's not a flat slab */
  .leg-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 75% 25%, rgba(255,255,255,0.12), transparent 55%);
    pointer-events: none;
  }
  .leg-hero-inner { position: relative; z-index: 1; }
  .leg-hero img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.3);
    box-shadow: var(--shadow-lg);
  }
  .leg-hero .placeholder {
    width: 140px; height: 140px; border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.5);
  }
  .leg-hero h1, .leg-hero .text-meta { color: #FFFFFF !important; }
  .leg-hero .meta { color: rgba(255,255,255,0.85); }
  /* The party badge in the hero — solid-color backgrounds mean a colored pill
     would vanish. Use a high-contrast white/translucent pill instead so the
     label still reads cleanly on top of the party-colored background. */
  .leg-hero .party-badge {
    background: rgba(255,255,255,0.18) !important;
    color: #FFFFFF !important;
    border: 1px solid rgba(255,255,255,0.4);
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--r-pill);
    font-size: var(--fs-sm);
    letter-spacing: 0.04em;
  }
  /* Stat tiles riding on the colored hero — translucent so the party color shows through */
  .leg-hero .stat-tile {
    background: rgba(255,255,255,0.1) !important;
    border-color: rgba(255,255,255,0.2) !important;
    color: var(--always-white) !important;
    backdrop-filter: blur(4px);
  }
  .leg-hero .stat-tile .stat-label,
  .leg-hero .stat-tile .stat-meta { color: rgba(255,255,255,0.75) !important; }
  .leg-hero .stat-tile .stat-value { color: var(--always-white) !important; }
  /* Hero action buttons — make them readable on solid color backgrounds */
  .leg-hero .btn { color: #FFFFFF; }
  .leg-hero .btn-warning {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.35);
    color: #FFFFFF;
  }
  .leg-hero .btn-warning:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.55);
    color: #FFFFFF;
  }
