.tl-activity-profile-page {
  --tl-primary: var(--bs-primary);
  --tl-primary-rgb: var(--bs-primary-rgb);
  --tl-link-hover: var(--bs-link-hover-color);
  --tl-ink: var(--bs-heading-color);
  --tl-muted: var(--bs-secondary-color);
  --tl-line: var(--bs-border-color);
  --tl-card-strong: var(--bs-card-bg, var(--bs-body-bg));
  --tl-surface-soft: var(--bs-light);
  --tl-surface-muted: var(--bs-tertiary-bg);
  --tl-control-bg: rgba(255, 255, 255, 0.96);
  --tl-control-border: rgba(255, 255, 255, 0.18);
  --tl-shadow: var(--bs-box-shadow);
  --tl-shadow-soft: var(--bs-box-shadow-sm);
  --tl-radius-xl: 30px;
  --tl-radius-lg: 22px;
  --tl-radius-md: 18px;
  --tl-hero-start: #15374f;
  --tl-hero-end: rgba(var(--bs-primary-rgb), 0.88);
  --tl-hero-panel: rgba(255, 255, 255, 0.14);
  --tl-hero-panel-border: rgba(255, 255, 255, 0.18);
  --tl-hero-divider: rgba(255, 255, 255, 0.12);
  --tl-hero-text: var(--bs-body-color);
  --tl-hero-muted: var(--bs-secondary-color);
  --tl-hover-border: rgba(var(--bs-primary-rgb), 0.24);
  --tl-focus-ring: rgba(var(--bs-primary-rgb), 0.18);
  --tl-page-glow-left: rgba(var(--bs-primary-rgb), 0.08);
  --tl-page-glow-right: rgba(20, 58, 86, 0.08);
  --tl-page-fill-top: rgba(248, 250, 252, 0.92);
  --tl-page-fill-bottom: rgba(255, 255, 255, 0.98);
  color: var(--tl-ink);
  background: none;
}

.tl-activity-profile-page #tl-profile-main {
  display: none;
}

.tl-activity-profile-shell,
.tl-activity-profile-sidebar {
  display: grid;
  gap: 1rem;
}

.tl-activity-profile-hero,
.tl-activity-profile-panel {
  border-radius: var(--tl-radius-xl);
  box-shadow: var(--tl-shadow);
}

.tl-activity-profile-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 0.95rem;
  padding: clamp(1rem, 1.6vw, 1.35rem);
  background:
    linear-gradient(135deg, var(--tl-hero-start), var(--tl-hero-end)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
  color: var(--tl-hero-text);
}

.tl-activity-profile-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -50% auto;
  width: 280px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.tl-activity-profile-headbar,
.tl-activity-profile-topline {
  position: relative;
  z-index: 1;
}

.tl-activity-profile-headbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.tl-activity-profile-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--tl-hero-panel);
  border: 1px solid var(--tl-hero-panel-border);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tl-activity-profile-topline {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 1rem;
  align-items: start;
}

.tl-activity-profile-copy {
  min-width: 0;
  display: grid;
  gap: 0.95rem;
}

.tl-activity-profile-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.tl-activity-profile-avatar-shell {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.tl-activity-profile-avatar-fallback,
.tl-activity-profile-avatar {
  position: absolute;
  inset: 0;
}

.tl-activity-profile-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(248, 251, 255, 0.8);
  z-index: 0;
  pointer-events: none;
}

.tl-activity-profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.tl-activity-profile-avatar[src=""] {
  display: none;
}

.tl-activity-profile-heading {
  min-width: 0;
}

.tl-activity-profile-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.tl-activity-profile-title {
  margin: 0;
  color: inherit;
  font-size: clamp(1.9rem, 3.1vw, 2.65rem);
  line-height: 1.03;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.tl-activity-profile-flag-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  min-height: 3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--tl-hero-panel);
  border: 1px solid var(--tl-hero-panel-border);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-size: 1.35rem;
  line-height: 1;
}

.tl-activity-profile-flag-chip:empty {
  display: none;
}

.tl-activity-profile-handle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.5rem;
}

.tl-activity-profile-handle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  background: rgba(9, 18, 28, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--tl-hero-text);
  font-weight: 700;
}

.tl-activity-profile-handle-row .badge {
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--tl-hero-text) !important;
}

.tl-activity-profile-subtitle {
  margin-top: 0.7rem;
  max-width: 42rem;
  color: var(--tl-hero-muted);
}

/*
   The three facts sit at the end of the header row, as label-over-value pairs
   with a hairline between them, and the follow button after them. They used to
   be .tl-activity-profile-detail: three panels the full width of the page,
   90px of card to say "None" twice, above a name that had a small ghost chip
   for the one action the page offers.
*/
.tl-activity-profile-facts {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-self: end;
}

.tl-activity-profile-fact {
  min-width: 0;
  padding-left: 1.5rem;
  border-left: 1px solid var(--tl-hairline);
}

.tl-activity-profile-fact:first-child {
  padding-left: 0;
  border-left: 0;
}

.tl-activity-profile-detail-label {
  display: block;
  margin-bottom: 0.28rem;
  color: var(--tl-hero-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tl-activity-profile-detail-value {
  display: block;
  color: var(--tl-hero-text);
  font-size: 0.95rem;
  line-height: 1.25;
  font-weight: 700;
  white-space: nowrap;
}

.tl-activity-profile-style-wrap {
  min-height: 0;
}

.tl-activity-profile-style-wrap:empty {
  display: none;
}

.tl-activity-profile-style-wrap .badge {
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--tl-hero-text) !important;
  padding: 0.4rem 0.68rem;
  border-radius: 999px;
  font-weight: 700;
}

.tl-activity-profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.tl-activity-profile-stat-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.6rem 0.75rem;
  align-items: center;
  padding: 0.82rem 0.9rem;
  border-radius: 20px;
  border: 1px solid var(--tl-hero-panel-border);
  background: var(--tl-hero-panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  min-height: 100%;
}

.tl-activity-profile-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 0.95rem;
}

.tl-activity-profile-stat-label {
  display: block;
  margin-bottom: 0.16rem;
  color: var(--tl-hero-muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tl-activity-profile-stat-value {
  display: block;
  color: var(--tl-hero-text);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.tl-activity-profile-stat-unit {
  font-size: 0.72em;
  font-weight: 700;
  color: var(--tl-hero-muted);
  letter-spacing: 0;
}

.tl-accent-gold .tl-activity-profile-stat-icon {
  color: #facc15;
  background: rgba(250, 204, 21, 0.16);
}

.tl-accent-sky .tl-activity-profile-stat-icon {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.16);
}

.tl-accent-rose .tl-activity-profile-stat-icon {
  color: #fda4af;
  background: rgba(251, 113, 133, 0.16);
}

.tl-accent-emerald .tl-activity-profile-stat-icon {
  color: #86efac;
  background: rgba(16, 185, 129, 0.18);
}

.tl-activity-profile-panel {
  padding: 1rem;
  background: var(--tl-card-strong);
  border: 1px solid var(--tl-line);
}

.tl-activity-profile-results-panel,
.tl-activity-profile-sidecard {
  display: grid;
  gap: 0.95rem;
}

.tl-activity-profile-results-head,
.tl-activity-profile-card-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem;
}

.tl-activity-profile-results-copy {
  min-width: 0;
}

.tl-activity-profile-section-kicker {
  color: var(--tl-primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tl-activity-profile-section-title {
  color: var(--tl-ink);
  font-size: clamp(1.2rem, 1.8vw, 1.75rem);
  font-weight: 800;
}

.tl-activity-profile-results-note {
  margin-top: 0.4rem;
  color: var(--tl-muted);
}

.tl-activity-profile-filter {
  min-width: min(100%, 12rem);
}

.tl-activity-profile-form-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--tl-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tl-activity-profile-select {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid var(--tl-line);
  background: var(--tl-card-strong);
  color: var(--tl-ink);
}

.tl-activity-profile-select:focus {
  border-color: rgba(var(--bs-primary-rgb), 0.35);
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.14);
}

.tl-activity-profile-archive {
  background: transparent;
  padding: 0;
}

.tl-activity-profile-archive.tl-activities-page {
  background: transparent;
}

.tl-activity-profile-archive .tl-activities-form {
  padding-top: 0;
  border-top: 0;
}

.tl-activity-profile-archive .tl-results-head {
  margin-bottom: 0.9rem;
}

.tl-activity-profile-archive .tl-results-kicker {
  color: var(--tl-primary);
}

.tl-activity-profile-archive .tl-results-title,
.tl-activity-profile-archive .tl-activity-card-title a,
.tl-activity-profile-archive .tl-activity-link,
.tl-activity-profile-archive .tl-activity-equipment,
.tl-activity-profile-archive .tl-activity-metric-value,
.tl-activity-profile-archive .tl-stat-value {
  color: var(--tl-ink);
}

.tl-activity-profile-archive .tl-form-label,
.tl-activity-profile-archive .tl-stat-label,
.tl-activity-profile-archive .tl-activity-detail-label,
.tl-activity-profile-archive .tl-activity-date {
  color: var(--tl-muted);
}

.tl-activity-profile-archive .tl-stat-card,
.tl-activity-profile-archive .tl-activity-card {
  border-color: var(--tl-line);
  background: var(--tl-card-strong);
  box-shadow: var(--tl-shadow-soft);
}

.tl-activity-profile-archive .tl-activity-card:hover {
  border-color: var(--tl-line);
  box-shadow: var(--tl-shadow-soft);
  transform: none;
}

.tl-activity-profile-best-list {
  display: grid;
  gap: 0.7rem;
}

.tl-activity-profile-best-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  padding: 0.95rem 1rem;
  border-radius: var(--tl-radius-lg);
  border: 1px solid var(--tl-line);
  background:
    radial-gradient(circle at top right, rgba(var(--bs-primary-rgb), 0.12), transparent 42%),
    linear-gradient(180deg, var(--tl-surface-muted), var(--tl-card-strong));
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tl-activity-profile-best-item:hover,
.tl-activity-profile-best-item:focus-visible {
  transform: translateY(-2px);
  color: inherit;
  border-color: var(--tl-hover-border);
  box-shadow: var(--tl-shadow-soft);
}

.tl-activity-profile-best-item:focus-visible {
  outline: 3px solid var(--tl-focus-ring);
  outline-offset: 3px;
}

.tl-activity-profile-best-item--fallback {
  transition: none;
}

.tl-activity-profile-best-item--fallback:hover,
.tl-activity-profile-best-item--fallback:focus-visible {
  transform: none;
  box-shadow: none;
}

/* Sport, then what and when: the chip sat on its own line above the title,
   which made every row a line taller than the mockup draws it. */
.tl-activity-profile-best-copy {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.1rem 0.7rem;
  align-items: center;
}

.tl-activity-profile-best-copy > .tl-activity-profile-best-label {
  grid-row: 1 / span 2;
}

.tl-activity-profile-best-label {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
  color: var(--tl-primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tl-activity-profile-best-title {
  color: var(--tl-ink);
  font-size: 1.02rem;
  line-height: 1.2;
  font-weight: 800;
}

.tl-activity-profile-best-meta {
  margin-top: 0.24rem;
  color: var(--tl-muted);
  font-size: 0.88rem;
}

.tl-activity-profile-best-metrics {
  display: grid;
  justify-items: end;
  gap: 0.1rem;
  min-width: 0;
  text-align: right;
}

.tl-activity-profile-best-metrics strong {
  color: var(--tl-ink);
  font-size: 1.04rem;
  line-height: 1.08;
}

.tl-activity-profile-best-metrics span {
  color: var(--tl-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.tl-activity-profile-best-empty {
  color: var(--tl-muted);
  font-size: 1rem;
  font-weight: 700;
}

.tl-best[data-has="0"] {
  display: none;
}

.tl-best-fallback[data-has="1"] {
  display: none;
}

.tl-activity-profile-ranking-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.tl-activity-profile-ranking-metric {
  display: grid;
  justify-items: start;
  gap: 0.35rem;
  padding: 0.95rem 1rem;
  border-radius: var(--tl-radius-lg);
  border: 1px solid var(--tl-line);
  background:
    radial-gradient(circle at top right, rgba(var(--bs-primary-rgb), 0.12), transparent 42%),
    linear-gradient(180deg, var(--tl-surface-muted), var(--tl-card-strong));
}

.tl-activity-profile-ranking-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 14px;
  background: rgba(var(--bs-primary-rgb), 0.12);
  color: var(--tl-primary);
  font-size: 1rem;
}

.tl-activity-profile-ranking-label {
  color: var(--tl-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tl-activity-profile-ranking-value {
  color: var(--tl-ink);
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
}

@media (min-width: 1200px) {
  .tl-activity-profile-sidebar {
    position: sticky;
    top: 1rem;
    align-self: start;
  }
}

@media (max-width: 1199.98px) {
  .tl-activity-profile-topline {
    grid-template-columns: 1fr;
  }

  .tl-activity-profile-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .tl-activity-profile-results-head,
  .tl-activity-profile-card-head {
    flex-direction: column;
    align-items: start;
  }

  .tl-activity-profile-filter {
    width: 100%;
  }

  .tl-activity-profile-ranking-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .tl-activity-profile-page {
    --tl-radius-xl: 24px;
    --tl-radius-lg: 20px;
  }

  .tl-activity-profile-hero {
    gap: 0.8rem;
    padding: 0.95rem;
  }

  .tl-activity-profile-identity {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .tl-activity-profile-avatar-shell {
    width: 84px;
    height: 84px;
    border-radius: 24px;
  }

  .tl-activity-profile-title {
    font-size: clamp(1.7rem, 6.8vw, 2.1rem);
  }

  .tl-activity-profile-facts {
    justify-self: start;
    gap: 0.6rem 1.1rem;
  }

  .tl-activity-profile-fact {
    padding-left: 1.1rem;
  }

  .tl-activity-profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tl-activity-profile-panel {
    padding: 0.9rem;
  }

  .tl-activity-profile-best-item {
    grid-template-columns: 1fr;
  }

  .tl-activity-profile-best-metrics {
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 575.98px) {
  .tl-activity-profile-shell,
  .tl-activity-profile-sidebar {
    gap: 0.85rem;
  }

  .tl-activity-profile-hero,
  .tl-activity-profile-panel {
    border-radius: 24px;
  }

  .tl-activity-profile-kicker {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
  }

  .tl-activity-profile-handle {
    width: 100%;
    justify-content: center;
  }

  .tl-activity-profile-stats {
    gap: 0.5rem;
  }

  .tl-activity-profile-stat-card {
    padding: 0.7rem 0.75rem;
  }

  .tl-activity-profile-stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    font-size: 0.85rem;
  }

  .tl-activity-profile-stat-label,
  .tl-activity-profile-form-label,
  .tl-activity-profile-detail-label,
  .tl-activity-profile-ranking-label {
    font-size: 0.62rem;
  }

  .tl-activity-profile-select {
    min-height: 42px;
  }
}

[data-bs-theme="dark"] .tl-activity-profile-page {
  --tl-muted: var(--bs-body-color);
  --tl-line: var(--bs-border-color);
  --tl-card-strong: var(--bs-mode, var(--bs-body-bg));
  --tl-surface-soft: var(--bs-light);
  --tl-surface-muted: rgba(255, 255, 255, 0.02);
  --tl-control-bg: var(--bs-mode, var(--bs-body-bg));
  --tl-control-border: var(--bs-border-color);
  --tl-shadow: none;
  --tl-shadow-soft: none;
  --tl-hero-start: #151C24;
  --tl-hero-end: #151C24;
  --tl-hero-panel: rgba(255, 255, 255, 0.04);
  --tl-hero-panel-border: #24303B;
  --tl-hero-divider: #24303B;
  --tl-hover-border: rgba(var(--bs-primary-rgb), 0.28);
  --tl-focus-ring: rgba(var(--bs-primary-rgb), 0.28);
  --tl-page-glow-left: rgba(var(--bs-primary-rgb), 0.05);
  --tl-page-glow-right: transparent;
  --tl-page-fill-top: #0E1319;
  --tl-page-fill-bottom: #0E1319;
}

[data-bs-theme="dark"] .tl-activity-profile-archive .badge.bg-warning {
  color: #202124;
}
/* ==========================================================================
   Activity Deck: athlete profile on instruments
   ========================================================================== */

.tl-activity-profile-page .tl-activity-profile-panel,
.tl-activity-profile-page .tl-activity-profile-stat-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.625rem;
  box-shadow: none;
}
.tl-activity-profile-page .tl-activity-profile-stat-value,
.tl-activity-profile-page .tl-stat-value,
.tl-activity-profile-page .tl-activity-metric-value,
.tl-activity-profile-page .tl-activity-profile-best-item strong {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}
.tl-activity-profile-page .tl-activity-profile-stat-label,
.tl-activity-profile-page .tl-activity-profile-best-label,
.tl-activity-profile-page .tl-activity-detail-label {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Long values (equipment brand + model, place names) wrap instead of
   spilling into the neighbouring detail column. */
.tl-activity-profile-archive .tl-activity-detail { min-width: 0; }
.tl-activity-profile-archive .tl-activity-equipment,
.tl-activity-profile-archive .tl-activity-link,
.tl-activity-profile-archive .tl-activity-detail-label {
  overflow-wrap: anywhere;
}

/* ==========================================================================
   Activity Deck open hero: no card, page-ground header like the home page.
   Same information, lighter chrome: eyebrow kicker, open title, inline
   mono scope and stat line instead of glass panels.
   ========================================================================== */
.tl-activity-profile-hero {
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  /* No top padding: the page frame (.tl-page) owns the distance from the
     navbar, so every page opens at the same height. */
  padding: 0;
  color: var(--bs-body-color);
  overflow: visible;
}
.tl-activity-profile-hero::after { display: none; }
.tl-activity-profile-kicker {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  /* The page kicker, same as .tl-pagehead-kicker everywhere else: block
     rather than inline-flex, the CTA orange, and no leading rule. */
  display: block;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tl-cta);
}
.tl-activity-profile-kicker::before { content: none; }

/* Name on the left, the three facts and the follow button at the far right.
   Below 992px they stack: two columns on a phone left the name in a 40px
   channel with the facts sitting on top of it. */
.tl-activity-profile-topline {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.6rem 1.5rem;
}

@media (max-width: 991.98px) {
  .tl-activity-profile-topline {
    grid-template-columns: minmax(0, 1fr);
  }

  .tl-activity-profile-facts {
    justify-self: start;
  }
}
.tl-activity-profile-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: baseline;
  gap: 0.5rem 1.8rem;
}
.tl-activity-profile-hero .tl-activity-profile-stat-card,
.tl-activity-profile-hero .tl-stat-card {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  min-width: 0;
  min-height: 0;
  grid-template-columns: none;
}
.tl-activity-profile-hero .tl-activity-profile-stat-card .tl-activity-profile-stat-icon,
.tl-activity-profile-hero .tl-stat-card .tl-activity-profile-stat-icon { display: none; }
.tl-activity-profile-hero .tl-activity-profile-stat-card .tl-activity-profile-stat-body,
.tl-activity-profile-hero .tl-stat-card .tl-activity-profile-stat-body {
  display: flex;
  flex-direction: row-reverse;
  align-items: baseline;
  gap: 0.45rem;
}
.tl-activity-profile-hero .tl-activity-profile-stat-card .tl-activity-profile-stat-label,
.tl-activity-profile-hero .tl-stat-card .tl-activity-profile-stat-label {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: lowercase;
  color: var(--bs-secondary-color);
}
.tl-activity-profile-hero .tl-activity-profile-stat-card .tl-activity-profile-stat-value,
.tl-activity-profile-hero .tl-stat-card .tl-activity-profile-stat-value {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: normal;
  font-variant-numeric: tabular-nums;
  color: var(--bs-body-color);
}
.tl-activity-profile-hero .tl-activity-profile-stat-card .tl-stat-icon,
.tl-activity-profile-hero .tl-stat-card .tl-stat-icon { display: none; }
.tl-activity-profile-hero .tl-activity-profile-stat-card .tl-stat-body,
.tl-activity-profile-hero .tl-stat-card .tl-stat-body {
  display: flex;
  flex-direction: row-reverse;
  align-items: baseline;
  gap: 0.45rem;
}
.tl-activity-profile-hero .tl-activity-profile-stat-card .tl-stat-label,
.tl-activity-profile-hero .tl-stat-card .tl-stat-label {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: lowercase;
  color: var(--bs-secondary-color);
}
.tl-activity-profile-hero .tl-activity-profile-stat-card .tl-stat-value,
.tl-activity-profile-hero .tl-stat-card .tl-stat-value {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: normal;
  font-variant-numeric: tabular-nums;
  color: var(--bs-body-color);
}

/* The ranking snapshot: three figures, no icon discs ------------------- */
.tl-activity-profile-ranking-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.tl-activity-profile-ranking-metric {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.6rem 0.75rem;
  border: 0;
  border-radius: 8px;
  background: var(--tl-paper, #F3F2EC);
  box-shadow: none;
}

.tl-activity-profile-ranking-icon {
  display: none;
}

.tl-activity-profile-ranking-label {
  font-family: var(--tl-font-mono, ui-monospace, monospace);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tl-dim, #8B8F80);
}

.tl-activity-profile-ranking-value {
  font-family: var(--tl-font-display, 'Bricolage Grotesque', system-ui, sans-serif);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--tl-ink, #23281F);
}

.tl-activity-profile-ranking-note {
  margin: 0.7rem 0 0;
}

/* Athlete totals, as one band ------------------------------------------ */
.tl-athlete-totals {
  /* Third child of a two-column header grid, so without this it took the
     first column of a second row and the band stopped halfway across. */
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  margin-top: 1.25rem;
  /* Edge to edge, like the mockup: a band under the name rather than a card
     inside the page. Reaches back through the page gutter the same way the
     Compete hero does, so it cannot drift from it. */
  margin-inline: calc(-1 * var(--tl-page-gutter));
  padding: 1rem var(--tl-page-gutter);
  border-top: 1px solid var(--tl-hairline, #DFDCCB);
  border-bottom: 1px solid var(--tl-hairline, #DFDCCB);
  background: var(--tl-paper-deep, #EFEDE2);
}

.tl-athlete-totals-label {
  flex: 0 0 auto;
}

.tl-athlete-totals-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.75rem 2rem;
  flex: 1 1 auto;
  min-width: 0;
}

.tl-athlete-total {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.tl-athlete-total-value {
  font-family: var(--tl-font-display, 'Bricolage Grotesque', system-ui, sans-serif);
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--tl-ink, #23281F);
  font-variant-numeric: tabular-nums;
}

.tl-athlete-total-value small {
  font-size: 0.5em;
  font-weight: 700;
  margin-left: 0.2em;
  color: var(--tl-muted, #5C6253);
}

.tl-athlete-total-label {
  font-family: var(--tl-font-mono, ui-monospace, monospace);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tl-dim, #8B8F80);
}

/* An athlete who has set no handle gets no bare "@". */
.tl-activity-profile-handle:empty,
.tl-activity-profile-handle-row:has(.tl-activity-profile-handle:empty) {
  display: none;
}

/* How full the ten-activity snapshot is. The caption under it names the ten. */
.tl-activity-profile-ranking-bar {
  height: 6px;
  margin-top: 1rem;
  border-radius: 999px;
  background: var(--tl-hairline, #DFDCCB);
  overflow: hidden;
}

.tl-activity-profile-ranking-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--tl-accent, #46603C);
}

/* The totals band on a phone: label above the figures, not beside them. It was
   a word in the left margin with a column of numbers running past it.
   At the end of the file on purpose: .tl-athlete-totals is declared below the
   header rules, so an override placed with them would lose on source order. */
@media (max-width: 991.98px) {
  .tl-athlete-totals {
    display: block;
  }

  .tl-athlete-totals-label {
    display: block;
    margin-bottom: 0.6rem;
  }
}
