/* Achievement badges (ui_badge.py). Tokens only: tier fills and inks come from tokens.css. */

.badge-row { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 8px;
             scroll-snap-type: x proximity; }

.badge { display: block; color: var(--ink); text-decoration: none; }
.badge:hover { text-decoration: none; }
.badge:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Large: a card with the medallion, then the tier, title and caption. */
.badge--lg { flex: 0 0 176px; scroll-snap-align: start; text-align: center;
             background: var(--surface); border: 1px solid var(--hairline);
             border-radius: var(--r-lg); padding: 18px 14px 16px; }
.badge--lg:hover { border-color: var(--ink-muted); }
.badge--lg:focus-visible { outline-offset: 2px; border-radius: var(--r-lg); }

.badge-medal { display: block; width: var(--badge-lg); height: var(--badge-lg);
               margin: 0 auto; overflow: visible; }
.badge-tier { display: block; margin-top: 12px; font-size: var(--t-label); font-weight: 700;
              letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); }
.badge-title { display: block; margin-top: 2px; font-size: 17px; font-weight: 700;
               line-height: 1.25; }
.badge-caption { display: block; margin-top: 4px; font-size: var(--t-meta);
                 line-height: 1.4; color: var(--ink-2); }

/* Chip: the medallion alone, on a cover card. */
.badge--chip { display: inline-flex; vertical-align: middle; border-radius: 999px; }
.badge--chip .badge-medal { width: var(--badge-chip); height: var(--badge-chip); margin: 0; }

/* The +N link at the end of a row. */
.badge-more { flex: 0 0 auto; align-self: center; display: inline-flex; align-items: center;
              min-height: 44px; padding: 0 16px; border: 1px solid var(--hairline);
              border-radius: 999px; color: var(--accent); font-weight: 700;
              font-size: var(--t-meta); text-decoration: none; }
.badge-more:hover { border-color: var(--ink-muted); text-decoration: none; }
.badge-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 640px) {
  .badge--lg { flex-basis: 148px; padding: 14px 10px 14px; }
}

/* Tier label in its tier colour; every fill clears AA as text on --surface. */
.badge-tier--platinum { color: var(--tier-platinum); }
.badge-tier--gold { color: var(--tier-gold); }
.badge-tier--silver { color: var(--tier-silver); }
.badge-tier--bronze { color: var(--tier-bronze); }
