.challenge-section { margin-top: 2rem; }
.challenge-section > h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: 1rem; }
.challenge-list { display: grid; gap: 1rem; }
.challenge-card { display: flex; align-items: center; gap: 1.5rem; padding: 1.25rem; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--surface); }
.challenge-featured { border-left: 3px solid var(--accent); }
.challenge-image { position: relative; flex: 0 0 12rem; width: 12rem; height: 8rem; overflow: hidden; border-radius: .4rem; background: var(--surface-2); }
.challenge-image img { width: 100%; height: 100%; object-fit: cover; }
.challenge-description { flex: 1; min-width: 0; }
.challenge-description h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.2; }
.challenge-featured h3 { font-size: clamp(1.4rem, 2vw, 1.8rem); }
.challenge-description h3 a:hover { color: var(--accent); }
.challenge-deadline { color: var(--pb); font-size: .875rem; margin-bottom: .5rem; }
.challenge-combo, .challenge-date { color: var(--ink-muted); font-size: .9375rem; margin-top: .5rem; }
.challenge-personal { margin-top: .75rem; font-size: 1rem; }
.challenge-action { flex-shrink: 0; }
.challenge-history { border-top: 1px solid var(--edge); padding-top: 1rem; }
.challenge-history > summary { cursor: pointer; font-weight: 600; padding-block: .75rem; }
.challenge-history > summary span { color: var(--ink-muted); font-weight: 400; margin-left: .5rem; font-size: .875rem; }
.challenge-history .challenge-list { margin-top: .75rem; }
.challenge-empty { padding-block: 2rem; color: var(--ink-muted); }
@media (max-width: 900px) { .challenge-image { flex-basis: 8rem; width: 8rem; height: 7rem; } }
@media (max-width: 640px) {
  .challenge-card { flex-wrap: wrap; gap: 1rem; }
  .challenge-image { flex-basis: 4.5rem; width: 4.5rem; height: 4.5rem; align-self: flex-start; }
  .challenge-action { width: 100%; }
  .challenge-description { flex-basis: calc(100% - 5.5rem); }
}

/* ---------- the "Happening now" board on /competitions ---------- */
.now-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: 1rem; }
.now-panel {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
}
.now-panel > * { margin: 0; }
.now-panel > .challenge-action { align-self: flex-start; margin-top: auto; }
.now-kicker { display: flex; align-items: center; gap: .6rem; color: var(--ink-muted); font-size: .875rem; }
.now-kicker .challenge-deadline { margin: 0; }
.now-panel h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 600; line-height: 1.15; }
.now-panel h3 a:hover { color: var(--accent); }
.now-panel .challenge-combo { margin-top: 0; }
.now-label { color: var(--ink-muted); font-size: .8125rem; }
.now-split { margin-top: .5rem; color: var(--ink-faint); font-size: .8125rem; }
.now-meta { color: var(--ink-muted); font-size: .875rem; }
.now-clock { font-family: var(--font-display); font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 1.05; margin-top: .2rem; }
.now-countdown { color: var(--pb); }
.now-next .now-meta { margin-top: .25rem; }
.now-standings .now-tower { margin-top: .4rem; }
.now-tower { width: 100%; font-size: .95rem; border-collapse: collapse; }
.now-tower td { padding: .35rem .4rem; border-bottom: 1px solid var(--edge); }
.now-tower tr:last-child td { border-bottom: 0; }
.now-tower .now-rank { width: 2rem; color: var(--ink-muted); font-size: .875rem; }
.now-tower td:last-child { text-align: right; white-space: nowrap; }
.now-tower .is-you { background: var(--surface-2); }
.now-tower .now-gap td { color: var(--ink-faint); text-align: center; padding-block: .1rem; }
.now-you { margin-left: .5rem; font-size: .7rem; color: var(--accent); }
.now-banner { position: relative; height: 7rem; overflow: hidden; border-radius: .4rem; background: var(--surface-2); }
.now-banner img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.now-points {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--edge);
  color: var(--ink-muted);
  font-size: .9375rem;
}
.now-points .now-points-leader, .now-points .now-points-you { color: var(--ink); }

/* ---------- a race being reported right now ---------- */
.live-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.5rem;
  padding: .75rem 1rem;
  border: 1px solid rgba(52, 211, 153, .35);
  background: var(--pb-soft);
  border-radius: var(--radius);
  color: var(--ink);
}
.live-strip-combo { color: var(--ink-muted); }
.live-strip-cta { margin-left: auto; }
.live-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--pb); flex: 0 0 auto; }
@media (prefers-reduced-motion: no-preference) {
  .live-dot { animation: live-pulse 1.8s ease-in-out infinite; }
  @keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
}

@media (max-width: 640px) {
  .now-clock { font-size: 1.5rem; }
  .now-panel > .challenge-action { align-self: stretch; width: 100%; }
  .live-strip-cta { margin-left: 0; }
}
