/*
 * challenges-section.css
 * Landing page challenges section — self-contained partial styles.
 * Partial: public/templates/public/components/challenges_section.html
 * Mobile-first. Single column → two columns at 768px+.
 * All classes namespaced to chal-* to avoid conflicts.
 */

/* ── SECTION SHELL ─────────────────────────────────────── */

.chal-section {
  background: var(--c-navy);
  border-top: 1px solid var(--c-border);
}

/* ── TWO-COLUMN LAYOUT ─────────────────────────────────── */

.chal-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
}

@media (min-width: 768px) {
  .chal-layout {
    flex-direction: row;
    align-items: start;
    gap: var(--space-8, 64px);
  }

  .chal-copy {
    flex: 1 1 0%;
    min-width: 0;
  }
  .chal-visual {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }
}

/* ── COPY COLUMN ───────────────────────────────────────── */

.chal-copy__title {
  font-family: var(--font-display);
  font-size: clamp(26px, 5vw, 44px);
  font-weight: 900;
  color: var(--c-text-100);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: var(--space-3) 0 var(--space-4);
}

.chal-copy__sub {
  font-size: 15px;
  line-height: 1.75;
  color: var(--c-text-55);
  margin-bottom: var(--space-5);
  max-width: 480px;
}

/* ── MECHANICS LIST ────────────────────────────────────── */

.chal-mechanics {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.chal-mechanic {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.chal-mechanic__icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.chal-mechanic__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text-100);
  margin-bottom: 3px;
}

.chal-mechanic__body {
  font-size: 13px;
  line-height: 1.65;
  color: var(--c-text-55);
}

/* ── CTAs ──────────────────────────────────────────────── */

.chal-ctas {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 480px) {
  .chal-ctas {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ── DUEL CARD ─────────────────────────────────────────── */

.chal-duel-card {
  background: var(--c-navy-card);
  border: 1px solid var(--c-border-md);
  border-radius: var(--r-lg);
  overflow: hidden;
}

/* Header bar */
.chal-duel-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(212, 175, 55, 0.05);
  border-bottom: 1px solid rgba(212, 175, 55, 0.14);
}

.chal-duel-card__status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-gold);
}

.chal-duel-card__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-emerald-lt);
  flex-shrink: 0;
  animation: blink 1.4s ease-in-out infinite;
}

.chal-duel-card__race {
  font-size: 11px;
  color: var(--c-text-35);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

/* Arena: two fighters + VS */
.chal-duel-card__arena {
  display: flex;
  align-items: stretch;
  padding: var(--space-4) var(--space-5);
  gap: 0;
}

/* Fighter panel */
.chal-duel-card__fighter {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3);
  text-align: center;
}

.chal-duel-card__fighter--right {
  /* mirror of left — no extra styles needed */
}

/* Avatar circle */
.chal-duel-card__av {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.chal-duel-card__av-placeholder {
  font-size: 20px;
  color: var(--c-text-35);
}

.chal-duel-card__cub-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text-100);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

/* Pick row: silk + horse name */
.chal-duel-card__pick-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--c-navy-raised);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  width: 100%;
  box-sizing: border-box;
}

.chal-duel-card__silk {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}

.chal-duel-card__pick-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: left;
}

.chal-duel-card__pick-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-text-35);
}

.chal-duel-card__pick-horse {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text-100);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.chal-duel-card__pick-horse--tbc {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--c-text-35);
  font-weight: 400;
}

/* Win/loss/draw record chips */
.chal-duel-card__record {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}

.chal-duel-card__record-num {
  font-weight: 700;
  color: var(--c-text-55);
}

.chal-duel-card__record-num--wins {
  color: var(--c-emerald-lt);
}
.chal-duel-card__record-sep {
  color: var(--c-text-35);
}

/* VS column */
.chal-duel-card__vs {
  flex: 0 0 48px;
  width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: var(--space-3) 0;
}

.chal-duel-card__vs-line {
  flex: 1;
  width: 1px;
  background: linear-gradient(
    to bottom,
    rgba(212, 175, 55, 0),
    rgba(212, 175, 55, 0.3) 30%,
    rgba(224, 90, 42, 0.3) 70%,
    rgba(224, 90, 42, 0)
  );
}

.chal-duel-card__vs-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--c-navy-raised);
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.15);
}

.chal-duel-card__vs-text {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 900;
  color: var(--c-gold);
  letter-spacing: 0.06em;
  line-height: 1;
}

/* Footer */
.chal-duel-card__footer {
  padding: 10px 16px;
  border-top: 1px solid var(--c-border);
  font-size: 11px;
  color: var(--c-text-35);
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* ── SEASON STANDINGS ──────────────────────────────────── */

.chal-standings {
  background: var(--c-navy-card);
  border: 1px solid var(--c-border-md);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.chal-standings__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--c-border);
}

.chal-standings__title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-75);
}

.chal-standings__link {
  font-size: 11px;
  font-weight: 700;
  color: var(--c-gold);
  text-decoration: none;
  transition: opacity 0.2s;
}
.chal-standings__link:hover {
  opacity: 0.75;
}

/* Row — each cub is a link */
.chal-standings__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--c-border);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.chal-standings__row:last-child {
  border-bottom: none;
}
.chal-standings__row:hover {
  background: rgba(255, 255, 255, 0.03);
}
.chal-standings__row--gold {
  background: rgba(212, 175, 55, 0.04);
}

.chal-standings__rank {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  color: var(--c-text-35);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.chal-standings__row--gold .chal-standings__rank {
  color: var(--c-gold);
}

.chal-standings__av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 900;
  color: #fff;
}

.chal-standings__name {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text-100);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chal-standings__record {
  font-size: 11px;
  color: var(--c-text-35);
  white-space: nowrap;
}

.chal-standings__rate {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-text-55);
  white-space: nowrap;
  min-width: 36px;
  text-align: right;
}

.chal-standings__rate--gold {
  color: var(--c-gold);
}

.chal-standings__empty {
  padding: 20px 16px;
  font-size: 13px;
  color: var(--c-text-35);
  text-align: center;
  line-height: 1.6;
}

/* ── Challenges duel layout ── */

.chal-section--duel {
  --chal-ink: #f5f2ea;
  --chal-muted: rgba(245, 242, 234, 0.58);
  --chal-faint: rgba(245, 242, 234, 0.38);
  --chal-gold: #d8b14a;
  --chal-gold-soft: #f0ce6b;
  --chal-card: rgba(10, 16, 27, 0.55);
  --chal-line: rgba(245, 242, 234, 0.1);
  position: relative;
  isolation: isolate;
  background-color: #070b12;
  background-image:
    linear-gradient(
      180deg,
      rgba(7, 11, 18, 0.55) 0%,
      rgba(7, 11, 18, 0.72) 55%,
      rgba(7, 11, 18, 0.88) 100%
    ),
    url("../img/challenges/challenges-bg.804483031687.webp");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  border-top: 0;
  padding: clamp(56px, 7vw, 88px) 0;
  color: var(--chal-ink);
}

.chal-section--duel .container {
  max-width: var(--max-w, 1280px);
}

.chal-section--duel .chal-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  width: 100%;
  margin-bottom: 18px;
}

.chal-section--duel .chal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: ui-monospace, "IBM Plex Mono", Menlo, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--chal-gold);
}

.chal-section--duel .chal-kicker::before {
  content: "";
  width: 24px;
  height: 1px;
  background: rgba(180, 144, 58, 0.65);
}

.chal-section--duel .chal-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.chal-section--duel .chal-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition:
    filter 0.15s,
    transform 0.15s,
    background 0.15s,
    border-color 0.15s;
}

.chal-section--duel .chal-cta--primary {
  background: var(--chal-gold-soft);
  color: #0a101b;
  border: 1px solid var(--chal-gold-soft);
}

.chal-section--duel .chal-cta--primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  color: #0a101b;
}

.chal-section--duel .chal-cta--primary img {
  display: block;
}

.chal-section--duel .chal-cta--ghost {
  --liquid: var(--chal-gold-soft);
  --ink: #0a101b;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: transparent;
  color: var(--chal-ink);
  border: 1px solid rgba(245, 242, 234, 0.28);
  transition:
    color 0.4s,
    border-color 0.4s;
}

.chal-section--duel .chal-cta--ghost::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: -25%;
  width: 150%;
  height: 200%;
  background: var(--liquid);
  border-radius: 45% 55% 0 0 / 25% 25% 0 0;
  transform: translateY(100%);
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
  pointer-events: none;
}

.chal-section--duel .chal-cta--ghost:hover::before,
.chal-section--duel .chal-cta--ghost:focus-visible::before {
  transform: translateY(5%);
  animation: sat-btn-liquid-wave 2.5s ease-in-out infinite 0.65s;
}

.chal-section--duel .chal-cta--ghost:hover,
.chal-section--duel .chal-cta--ghost:focus-visible {
  background: transparent;
  border-color: var(--chal-gold-soft);
  color: var(--ink);
  filter: none;
  transform: none;
}

.chal-section--duel .chal-head {
  max-width: 680px;
  margin: 0 0 36px;
}

.chal-section--duel .chal-head__title {
  margin: 0 0 14px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: #fff;
}

.chal-section--duel .chal-head__accent {
  color: #f0ce6b;
}

.chal-section--duel .chal-head__sub {
  margin: 0;
  max-width: 640px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--chal-muted);
}

.chal-section--duel .chal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 22px 28px;
  align-items: stretch;
}

.chal-section--duel .chal-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chal-section--duel .chal-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-height: 110px;
  padding: 22px 22px 22px 20px;
  border-radius: 14px;
  background: rgba(8, 12, 20, 0.72);
  border: 1px solid var(--chal-line);
  overflow: hidden;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.chal-section--duel .chal-step:hover {
  transform: translateY(-3px);
  background: rgba(12, 18, 28, 0.88);
  border-color: rgba(216, 177, 74, 0.4);
  box-shadow: 0 10px 28px -14px rgba(0, 0, 0, 0.65);
}

.chal-section--duel .chal-step:hover .chal-step__icon {
  border-color: rgba(216, 177, 74, 0.85);
  background: rgba(216, 177, 74, 0.12);
  transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
  .chal-section--duel .chal-step {
    transition: none;
  }
  .chal-section--duel .chal-step:hover {
    transform: none;
  }
  .chal-section--duel .chal-step__icon {
    transition: none;
  }
  .chal-section--duel .chal-step:hover .chal-step__icon {
    transform: none;
  }
  .chal-section--duel .chal-live,
  .chal-section--duel .chal-live__arena,
  .chal-section--duel .chal-live__vs,
  .chal-section--duel .chal-live__av {
    transition: none;
  }
  .chal-section--duel .chal-live:hover {
    transform: none;
  }
  .chal-section--duel .chal-live:hover .chal-live__vs {
    transform: none;
  }
}

.chal-section--duel .chal-step__watermark {
  position: absolute;
  top: -4px;
  right: 10px;
  z-index: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(64px, 14vw, 88px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  /* Simple dim fill + quieter outline stroke */
  color: rgba(80, 80, 81, 0.14);
  -webkit-text-stroke: 1px rgba(200, 215, 235, 0.18);
  opacity: 1;
  pointer-events: none;
  user-select: none;
}

.chal-section--duel .chal-step__icon,
.chal-section--duel .chal-step__copy {
  position: relative;
  z-index: 1;
}

.chal-section--duel .chal-step__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  margin-top: 4px;
  border-radius: 8px;
  border: 1px solid rgba(216, 177, 74, 0.55);
  background: rgba(216, 177, 74, 0.06);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease;
}

.chal-section--duel .chal-step__icon img {
  display: block;
  width: 16px;
  height: 16px;
}

.chal-section--duel .chal-step__title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 8px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 20px;
  font-weight: 500;
  color: #fff;
  line-height: 1.2;
}

.chal-section--duel .chal-step__num {
  font-family: ui-monospace, "IBM Plex Mono", Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--chal-faint);
}

.chal-section--duel .chal-step__body {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--chal-muted);
}

.chal-section--duel .chal-live {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 18px;
  border-radius: 16px;
  background: rgba(8, 12, 20, 0.85);
  border: 1px solid rgba(216, 177, 74, 0.18);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.chal-section--duel .chal-live:hover {
  transform: translateY(-3px);
  background: rgba(12, 18, 28, 0.92);
  border-color: rgba(216, 177, 74, 0.48);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.45);
}

.chal-section--duel .chal-live:hover .chal-live__arena {
  border-color: rgba(216, 177, 74, 0.22);
  background: rgba(216, 177, 74, 0.04);
}

.chal-section--duel .chal-live:hover .chal-live__vs {
  transform: scale(1.08);
  text-shadow: 0 0 18px rgba(216, 177, 74, 0.45);
}

.chal-section--duel .chal-live:hover .chal-live__av {
  border-color: rgba(216, 177, 74, 0.55);
}

.chal-section--duel .chal-live__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-family: ui-monospace, "IBM Plex Mono", Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--chal-gold);
  text-transform: uppercase;
}

.chal-section--duel .chal-live__race {
  margin: 0 0 18px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
}

.chal-section--duel .chal-live__arena {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition:
    border-color 0.22s ease,
    background 0.22s ease;
}

.chal-section--duel .chal-live__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.chal-section--duel .chal-live__av {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #151a24;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.45);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 18px;
  transition: border-color 0.22s ease;
}

.chal-section--duel .chal-live__who {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.chal-section--duel .chal-live__pick {
  font-size: 12px;
  color: var(--chal-faint);
}

.chal-section--duel .chal-live__vs {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 16px;
  font-style: italic;
  color: var(--chal-gold);
  transition:
    transform 0.22s ease,
    text-shadow 0.22s ease;
}

.chal-section--duel .chal-live__meta {
  margin: 0 0 16px;
  text-align: center;
  font-family: ui-monospace, "IBM Plex Mono", Menlo, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--chal-faint);
}

.chal-section--duel .chal-live__standings {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--chal-line);
}

.chal-section--duel .chal-live__standings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.chal-section--duel .chal-live__standings-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(245, 242, 234, 0.8);
}

.chal-section--duel .chal-live__standings-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--chal-gold);
  text-decoration: none;
}

.chal-section--duel .chal-live__standings-link:hover {
  color: var(--chal-gold-soft);
}

.chal-section--duel .chal-live__standings-empty {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--chal-faint);
}

@media (max-width: 900px) {
  .chal-section--duel .chal-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  /* Kicker → title/sub → CTAs → body (CTAs after description) */
  .chal-section--duel > .container {
    display: flex;
    flex-direction: column;
  }

  .chal-section--duel .chal-top {
    display: contents;
  }

  .chal-section--duel .chal-kicker {
    order: 1;
    margin-bottom: 14px;
  }

  .chal-section--duel .chal-head {
    order: 2;
    margin-bottom: 14px;
  }

  .chal-section--duel .chal-ctas {
    order: 3;
    width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    margin: 0 0 28px;
  }

  .chal-section--duel .chal-body {
    order: 4;
  }

  .chal-section--duel .chal-cta {
    min-height: 34px;
    font-size: 12px;
    gap: 4px;
    white-space: nowrap;
  }

  /* Browse Cubs: content width + a bit more pad; My Challenges fills rest */
  .chal-section--duel .chal-cta--primary {
    flex: 0 1 auto;
    min-width: 0;
    padding: 6px 13px;
  }

  .chal-section--duel .chal-cta--ghost {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 10px;
  }

  .chal-section--duel .chal-cta--primary img {
    width: 11px;
    height: 11px;
  }

  .chal-section--duel .chal-step__title {
    flex-wrap: wrap;
    font-size: 18px;
  }
}

/* ── Standings, once challenges have settled ──────────────────────────
   The section only ever showed "first challenges settle this Saturday",
   so the moment a Cub had a record there was nowhere to put it. Rows use
   the same avatar and gold as the duel above them. */
.chal-section--duel .chal-live__table {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chal-section--duel .chal-live__row {
  display: grid;
  grid-template-columns: 18px 26px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(242, 236, 223, 0.04);
  border: 1px solid rgba(242, 236, 223, 0.08);
  font-size: 13px;
}

.chal-section--duel .chal-live__row--leader {
  background: rgba(216, 177, 74, 0.08);
  border-color: rgba(216, 177, 74, 0.28);
}

.chal-section--duel .chal-live__rank {
  font-size: 11px;
  font-weight: 800;
  color: var(--chal-faint);
  text-align: center;
}

.chal-section--duel .chal-live__row--leader .chal-live__rank {
  color: var(--chal-gold);
}

/* The duel avatar at row scale. */
.chal-section--duel .chal-live__av--sm {
  width: 26px;
  height: 26px;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.chal-section--duel .chal-live__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chal-section--duel .chal-live__record {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--chal-faint);
  white-space: nowrap;
}

.chal-section--duel .chal-live__record strong {
  color: var(--chal-gold);
}
