/* ==========================================================================
   SunTeam v2 — Sun Leaders: monthly Top 20 hall of fame
   ========================================================================== */
.ld { overflow-x: clip; }

/* ---------- stage ---------- */
.ld-hero { position: relative; padding: 18px 0 0; color: #fff; background: radial-gradient(900px 500px at 50% 0%, #3A2F05 0%, #15130C 55%, #0E0F12 100%); overflow: hidden; isolation: isolate; }
.ld-hero .crumbs-row, .ld-hero .crumbs-row a { color: rgba(255,255,255,.55); }
.ld-hero .crumbs-row span { color: #fff; }
.ld-beams { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.ld-beams i { position: absolute; top: -10%; left: 50%; width: 220px; height: 120%; margin-left: -110px; background: linear-gradient(to bottom, rgba(255,228,92,.28), rgba(255,228,92,0) 75%); transform-origin: top center; filter: blur(8px); clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%); }
.ld-beams i:nth-child(1) { transform: rotate(-24deg); animation: ld-sweep 9s ease-in-out infinite; }
.ld-beams i:nth-child(2) { transform: rotate(0deg); opacity: .8; }
.ld-beams i:nth-child(3) { transform: rotate(24deg); animation: ld-sweep 9s ease-in-out infinite reverse; }
.ld-stars { position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(1.5px 1.5px at 10% 20%, #fff8, transparent), radial-gradient(1px 1px at 30% 60%, #fff6, transparent), radial-gradient(1.5px 1.5px at 70% 30%, #fff8, transparent), radial-gradient(1px 1px at 85% 70%, #fff6, transparent), radial-gradient(1px 1px at 55% 15%, #fff7, transparent), radial-gradient(1.5px 1.5px at 20% 80%, #fff5, transparent); animation: ld-twinkle 5s ease-in-out infinite; }

.ld-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; margin-top: 18px; }
.ld-head .eyebrow { background: rgba(255,212,0,.14); color: #FFE45C; }
.ld-head .lead { color: rgba(255,255,255,.65); max-width: 620px; margin: 0; }
.ld-head .hl::after { opacity: .35; }

.ld-months { display: flex; gap: 6px; width: fit-content; max-width: 100%; margin: 22px auto 0; padding: 6px; border-radius: 999px; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); overflow-x: auto; scrollbar-width: none; }
.ld-months button { position: relative; flex: none; height: 40px; padding-inline: 16px; border: 0; border-radius: 999px; background: none; color: rgba(255,255,255,.7); font: inherit; font-weight: 700; font-size: var(--fs-sm); cursor: pointer; transition: all .2s; }
.ld-months button:hover { color: #fff; }
.ld-months button.is-active { background: var(--sun-400); color: #111318; box-shadow: 0 8px 24px -8px rgba(255,212,0,.7); }
.live-dot { display: inline-block; width: 8px; height: 8px; margin-inline-start: 6px; border-radius: 50%; background: #F04438; box-shadow: 0 0 0 0 rgba(240,68,56,.6); animation: pulse-ring 1.6s infinite; }

/* podium */
.ld-podium { position: relative; display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 18px; max-width: 860px; margin: 40px auto 0; padding-top: 30px; }
.ld-confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.pd { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.ld-podium.anim .pd { animation: ld-rise .8s var(--ease) both; animation-delay: var(--d); }
.pd .crown { position: absolute; top: -34px; color: #FFD400; filter: drop-shadow(0 6px 14px rgba(255,212,0,.6)); animation: ld-float 3s ease-in-out infinite; }
.pd .crown .ic { width: 34px; height: 34px; }
.pd-name { font-size: var(--fs-md); font-weight: 900; margin-top: 6px; }
.pd-meta { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: rgba(255,255,255,.6); min-height: 18px; }
.pd-tags { display: flex; gap: 6px; justify-content: center; min-height: 24px; }
.pd-step { width: 100%; margin-top: 10px; border-radius: 22px 22px 0 0; display: grid; place-items: start center; padding-top: 14px; font-weight: 900; color: #111318; box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
.pd-step .num { font-size: 2.2rem; line-height: 1; opacity: .85; }
.pd-gold .pd-step { height: 170px; background: linear-gradient(180deg, #FFE45C, #F2C200 60%, #C99A00); }
.pd-silver .pd-step { height: 130px; background: linear-gradient(180deg, #F2F4F7, #C9CED6 60%, #98A2B3); }
.pd-bronze .pd-step { height: 100px; background: linear-gradient(180deg, #F6C9A0, #D9915A 60%, #A9622E); }

.ld-av { position: relative; width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; overflow: hidden; font-weight: 900; font-size: .9rem; background: #EFEFEC; color: #474D58; }
.ld-av img { width: 100%; height: 100%; object-fit: cover; }
.ld-av.xl { width: 96px; height: 96px; font-size: 1.4rem; box-shadow: 0 0 0 4px rgba(255,255,255,.12), 0 20px 40px -12px rgba(0,0,0,.6); }
.pd-gold .ld-av.xl { width: 116px; height: 116px; box-shadow: 0 0 0 4px #FFD400, 0 0 0 10px rgba(255,212,0,.22), 0 0 60px rgba(255,212,0,.45); }
.pd-silver .ld-av.xl { box-shadow: 0 0 0 4px #D0D5DD, 0 0 0 10px rgba(208,213,221,.18); }
.pd-bronze .ld-av.xl { box-shadow: 0 0 0 4px #D9915A, 0 0 0 10px rgba(217,145,90,.2); }

/* movement + streak badges */
.mv, .stk { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 800; white-space: nowrap; }
.mv .ic, .stk .ic { width: 13px; height: 13px; }
.mv.up { background: rgba(18,183,106,.16); color: #12B76A; }
.mv.down { background: rgba(240,68,56,.14); color: #F04438; }
.mv.down .ic { transform: scaleY(-1); }
.mv.new { background: rgba(79,195,247,.16); color: #2E90FA; }
.mv.same { background: rgba(127,127,127,.12); color: var(--text-3); }
.stk { background: rgba(255,212,0,.18); color: #B88A00; }
.ld-hero .mv.same { color: rgba(255,255,255,.6); }
.ld-hero .stk { color: #FFE45C; }

/* insights */
.ld-insights { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: -1px; padding: 16px; border-radius: 0 0 26px 26px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--sh-2); }
.ins { display: flex; align-items: center; gap: 12px; padding: 6px 8px; }
.ins + .ins { border-inline-start: 1px dashed var(--line-strong); }
.ins > .ic { width: 40px; height: 40px; padding: 9px; border-radius: 13px; background: var(--amber-soft); color: var(--accent-ink); flex: none; }
.ins b { display: block; font-weight: 900; }
.ins span { font-size: var(--fs-xs); color: var(--text-3); }
.ld-insights.anim .ins { animation: ld-fade .6s var(--ease) both; }

/* table */
.ld-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: var(--fs-xs); color: var(--text-3); }
.ld-legend span { display: inline-flex; align-items: center; gap: 4px; }
.ld-legend i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; }
.ld-legend i .ic { width: 12px; height: 12px; }
.ld-legend .up { background: rgba(18,183,106,.16); color: #12B76A; }
.ld-legend .down { background: rgba(240,68,56,.14); color: #F04438; }
.ld-legend .down .ic { transform: scaleY(-1); }
.ld-legend .new { background: rgba(79,195,247,.16); color: #2E90FA; }
.ld-legend .fire { background: rgba(255,212,0,.18); color: #B88A00; }
.ld-table { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.ld-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: transform .3s var(--ease), box-shadow .3s; }
.ld-row:hover { transform: translateX(-4px); box-shadow: inset 0 0 0 1.5px var(--sun-400), var(--sh-2); }
.ld-table.anim .ld-row { animation: ld-slide .5s var(--ease) both; animation-delay: var(--d); }
.ld-rank { width: 34px; height: 34px; flex: none; border-radius: 12px; display: grid; place-items: center; font-weight: 900; background: #111318; color: var(--sun-400); }
.ld-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ld-who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-who small { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); font-size: var(--fs-xs); }
.ld-tags { display: flex; gap: 6px; flex: none; }
.ld-empty { text-align: center; padding: 40px 0 60px; color: rgba(255,255,255,.7); }

@keyframes ld-rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes ld-slide { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes ld-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ld-float { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-6px) rotate(6deg); } }
@keyframes ld-sweep { 0%, 100% { transform: rotate(-24deg); } 50% { transform: rotate(-14deg); } }
@keyframes ld-twinkle { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ld-beams i, .ld-stars, .pd .crown, .ld-podium.anim .pd, .ld-table.anim .ld-row { animation: none; } }

@media (max-width: 960px) {
  .ld-insights { grid-template-columns: 1fr 1fr; }
  .ins:nth-child(3) { border-inline-start: 0; }
  .ld-table { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .ld-podium { gap: 8px; }
  .ld-av.xl { width: 66px; height: 66px; font-size: 1rem; }
  .pd-gold .ld-av.xl { width: 80px; height: 80px; }
  .pd-name { font-size: var(--fs-xs); }
  .pd-tags .stk { display: none; }
  .pd-gold .pd-step { height: 120px; } .pd-silver .pd-step { height: 92px; } .pd-bronze .pd-step { height: 72px; }
  .ld-insights { grid-template-columns: 1fr; }
  .ins + .ins { border-inline-start: 0; border-top: 1px dashed var(--line-strong); padding-top: 10px; }
  .ld-row .ld-tags .stk { display: none; }
}
