.tl-ranking-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-muted: var(--bs-tertiary-bg);
  --tl-control-bg: rgba(255, 255, 255, 0.96);
  --tl-control-border: rgba(255, 255, 255, 0.16);
  --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-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-ranking-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.tl-ranking-hero,
.tl-ranking-podium,
.tl-ranking-table-panel {
  border-radius: var(--tl-radius-xl);
  box-shadow: var(--tl-shadow);
}

.tl-ranking-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-ranking-hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -48% auto;
  width: 260px;
  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-ranking-topline,
.tl-ranking-toolbar {
  position: relative;
  z-index: 1;
}

.tl-ranking-headbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.tl-ranking-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem 1.1rem;
  align-items: start;
}

.tl-ranking-copy {
  min-width: 0;
}

.tl-ranking-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-ranking-reset-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 999px;
  background: var(--tl-hero-panel);
  border: 1px solid var(--tl-hero-panel-border);
  color: var(--tl-hero-text);
  text-decoration: none;
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, color 0.18s ease;
  flex: 0 0 auto;
}

.tl-ranking-reset-icon:hover,
.tl-ranking-reset-icon:focus {
  color: var(--tl-hero-text);
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}

.tl-ranking-reset-icon:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.24);
  outline-offset: 3px;
}

.tl-ranking-title {
  margin: 0.55rem 0 0;
  color: inherit;
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.tl-ranking-subtitle {
  margin-top: 0.45rem;
  color: var(--tl-hero-muted);
  max-width: 38rem;
}

.tl-ranking-summary-line {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-end;
  gap: 0.55rem;
  min-width: 0;
  max-width: 100%;
}

.tl-ranking-scope {
  align-self: stretch;
  min-width: 13rem;
  max-width: 100%;
  padding: 0.72rem 0.9rem;
  border-radius: 16px;
  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);
}

.tl-ranking-scope-label {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--tl-hero-muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tl-ranking-scope strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.25;
}

.tl-ranking-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-end;
  gap: 0.55rem;
}

.tl-ranking-stat-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.55rem 0.65rem;
  padding: 0.72rem 0.82rem;
  border-radius: 16px;
  border: 1px solid var(--tl-hero-panel-border);
  background: var(--tl-hero-panel);
  backdrop-filter: blur(10px);
}

.tl-ranking-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  font-size: 0.92rem;
}

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

.tl-ranking-stat-value {
  display: block;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--tl-hero-text);
}

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

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

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

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

.tl-ranking-form {
  padding-top: 0.95rem;
  border-top: 1px solid var(--tl-hero-divider);
}

.tl-ranking-page .tl-ranking-form-label {
  margin-bottom: 0.35rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tl-ranking-page .tl-ranking-form-label i {
  color: inherit;
}

.tl-ranking-select,
.tl-ranking-search .form-control {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid var(--tl-control-border);
  background-color: var(--tl-control-bg);
  color: var(--tl-ink);
}

.tl-ranking-select:focus,
.tl-ranking-search .form-control: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-ranking-page .tl-ranking-reset {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background-color: var(--tl-control-bg) !important;
  font-weight: 700;
  box-shadow: none;
  transform: none;
}

.tl-ranking-page .tl-ranking-reset:hover,
.tl-ranking-page .tl-ranking-reset:focus {
  color: var(--tl-ink) !important;
  background-color: var(--tl-control-bg) !important;
  border-color: rgba(var(--bs-primary-rgb), 0.35) !important;
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.14);
  transform: none;
}

.tl-ranking-podium,
.tl-ranking-table-panel {
  padding: 1rem;
  background: var(--tl-card-strong);
  border: 1px solid var(--tl-line);
}

.tl-ranking-results {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem;
}

.tl-ranking-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem;
}

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

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

.tl-ranking-search-wrap {
  min-width: min(100%, 19rem);
}

.tl-ranking-search {
  position: relative;
}

.tl-ranking-search i {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tl-muted);
  pointer-events: none;
}

.tl-ranking-search .form-control {
  padding-left: 2.5rem;
  border-color: var(--tl-line);
  background: var(--tl-card-strong);
}

.tl-ranking-loading,
.tl-ranking-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 5.25rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: var(--tl-card-strong);
  border: 1px solid var(--tl-line);
  color: var(--tl-muted);
}

.tl-ranking-empty-state {
  flex-direction: column;
  text-align: center;
}

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

.tl-ranking-empty-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--tl-ink);
}

.tl-ranking-empty-copy {
  margin: 0;
  color: var(--tl-muted);
}

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

.tl-ranking-leader {
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 1rem;
  border-radius: var(--tl-radius-lg);
  border: 1px solid rgba(var(--bs-primary-rgb), 0.12);
  background:
    radial-gradient(circle at top right, rgba(var(--bs-primary-rgb), 0.15), transparent 42%),
    linear-gradient(180deg, var(--tl-surface-muted), var(--tl-card-strong));
  overflow: hidden;
}

.tl-ranking-leader::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.tl-ranking-leader-rank,
.tl-ranking-leader-score,
.tl-ranking-leader-best,
.tl-ranking-leader-body,
.tl-ranking-leader-avatar {
  position: relative;
  z-index: 1;
}

.tl-ranking-leader-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  border-radius: 16px;
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--tl-ink);
  background: rgba(255, 255, 255, 0.72);
}

.tl-ranking-leader-avatar {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.78);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #17324a;
}

.tl-ranking-leader-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tl-ranking-leader-name {
  font-size: 1.05rem;
  line-height: 1.15;
  font-weight: 800;
  color: var(--tl-ink);
}

.tl-ranking-leader-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.55rem;
  margin-top: 0.35rem;
  color: var(--tl-muted);
  font-size: 0.84rem;
}

.tl-ranking-leader-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--tl-ink);
  font-weight: 700;
}

.tl-ranking-leader-score {
  display: grid;
  justify-items: end;
  gap: 0.08rem;
  color: var(--tl-ink);
}

.tl-ranking-leader-score strong {
  font-size: 1.2rem;
  line-height: 1;
}

.tl-ranking-leader-score span,
.tl-ranking-leader-best {
  font-size: 0.78rem;
  color: var(--tl-muted);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* THE PODIUM IS NOT MADE OF METAL.
 *
 * Three tinted gradients: canary yellow, slate and amber, each a radial wash
 * over a white card. Medal colours are a convention from somewhere else, and
 * on paper the yellow one reads as a highlighter mark. The three cards are
 * the same card; what separates them is the rank on the left, and only the
 * leader takes a colour, in the ochre this site already uses for a top
 * figure. */
.tl-ranking-leader-gold,
.tl-ranking-leader-silver,
.tl-ranking-leader-bronze {
  background: var(--tl-panel, #FAF9F4);
}

.tl-ranking-leader-gold {
  border-color: color-mix(in srgb, var(--tl-terra, #A9743E) 45%, var(--tl-hairline, #DFDCCB));
}

.tl-ranking-leader-gold .tl-ranking-leader-rank {
  background: var(--tl-terra, #A9743E);
  color: var(--tl-paper, #F3F2EC);
}

.tl-ranking-table-panel .table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: rgba(var(--bs-primary-rgb), 0.04);
  margin: 0;
  display: table !important;
  table-layout: auto;
  border-collapse: collapse;
}

.tl-ranking-table-panel .table > thead {
  display: table-header-group !important;
}

.tl-ranking-table-panel .table > tbody {
  display: table-row-group !important;
}

.tl-ranking-table-panel .table > :not(caption) > tr {
  display: table-row !important;
}

.tl-ranking-table-panel .table > :not(caption) > tr > th,
.tl-ranking-table-panel .table > :not(caption) > tr > td {
  display: table-cell !important;
}

.tl-ranking-table-panel thead th {
  padding-block: 0.85rem;
  border-bottom-width: 1px;
  color: var(--tl-muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tl-ranking-table-panel tbody td {
  padding-block: 0.95rem;
  vertical-align: middle;
}

/* The rank is a number, not a status. It wore a tinted pill in the theme's
   primary, which on the board made every row look flagged. The mockup sets
   it in the display face and gives only the top three the accent. */
.tl-rank-pos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--tl-dim, #8B8F80);
  font-family: var(--tl-font-display, 'Bricolage Grotesque', system-ui, sans-serif);
  font-weight: 800;
  font-size: 1rem;
}

.tl-ranking-table-panel tbody tr:nth-child(-n + 3) .tl-rank-pos {
  color: var(--tl-cta, #C86B3F);
}

.tl-rank-athlete-link {
  display: inline-grid;
  gap: 0.12rem;
  color: var(--tl-ink);
  text-decoration: none;
}

.tl-rank-athlete-link:hover {
  color: var(--tl-primary);
}

.tl-rank-athlete-name {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.tl-rank-athlete-sub {
  color: var(--tl-muted);
  font-size: 0.8rem;
}

.tl-rank-country-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  background: var(--tl-surface-muted);
  border: 1px solid var(--tl-line);
  color: var(--tl-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.tl-rank-country-chip-empty {
  opacity: 0.72;
}

.tl-rank-number,
.tl-rank-date {
  display: inline-block;
  color: var(--tl-ink);
  font-weight: 800;
}

.tl-rank-date {
  color: var(--tl-muted);
  font-weight: 700;
}

.tl-ranking-pagination {
  margin-top: 1rem;
}

.tl-ranking-pagination .page-link {
  min-width: 42px;
  min-height: 42px;
  border-radius: 12px !important;
  border-color: rgba(var(--bs-primary-rgb), 0.1);
  color: var(--tl-muted);
  background: var(--tl-card-strong);
  box-shadow: none;
}

.tl-ranking-pagination .page-item.active .page-link,
.tl-ranking-pagination .page-link:hover,
.tl-ranking-pagination .page-link:focus {
  color: var(--tl-primary);
  border-color: rgba(var(--bs-primary-rgb), 0.22);
  background: rgba(var(--bs-primary-rgb), 0.1);
}

.tl-ranking-pagination .page-item.disabled .page-link {
  opacity: 0.45;
}

[data-bs-theme="dark"] .tl-ranking-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-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-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-ranking-leader {
  border-color: rgba(var(--bs-primary-rgb), 0.18);
}

[data-bs-theme="dark"] .tl-ranking-leader-rank,
[data-bs-theme="dark"] .tl-ranking-leader-avatar,
[data-bs-theme="dark"] .tl-ranking-leader-flag {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--bs-heading-color);
}

[data-bs-theme="dark"] .tl-ranking-leader-gold,
[data-bs-theme="dark"] .tl-ranking-leader-silver,
[data-bs-theme="dark"] .tl-ranking-leader-bronze {
  background: var(--tl-panel);
}

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

  .tl-ranking-summary-line,
  .tl-ranking-stats {
    justify-content: flex-start;
  }

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

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

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

  .tl-ranking-title {
    font-size: clamp(1.6rem, 7vw, 2rem);
  }

  .tl-ranking-summary-line {
    justify-content: flex-start;
    gap: 0.45rem;
  }

  .tl-ranking-scope {
    min-width: 0;
    width: 100%;
  }

  .tl-ranking-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 0.45rem;
  }

  .tl-ranking-stat-card {
    padding: 0.65rem 0.7rem;
  }

  .tl-ranking-form {
    padding-top: 0.8rem;
  }

  .tl-ranking-page .tl-ranking-form-label {
    margin-bottom: 0.28rem;
    font-size: 0.68rem;
  }

  .tl-ranking-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .tl-ranking-search-wrap {
    min-width: 0;
    width: 100%;
  }

  .tl-ranking-leader {
    grid-template-columns: auto auto 1fr;
  }

  .tl-ranking-leader-score,
  .tl-ranking-leader-best {
    grid-column: 3;
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 575.98px) {
  .tl-ranking-shell {
    gap: 0.85rem;
  }

  .tl-ranking-hero,
  .tl-ranking-podium,
  .tl-ranking-table-panel {
    border-radius: 24px;
  }

  .tl-ranking-hero {
    padding: 0.9rem;
  }

  .tl-ranking-summary-line {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 0.45rem;
  }

  .tl-ranking-scope {
    grid-column: 1 / -1;
    padding: 0.6rem 0.75rem;
  }

  .tl-ranking-stats {
    display: contents;
  }

  .tl-ranking-stat-card {
    padding: 0.58rem 0.65rem;
    gap: 0.45rem 0.55rem;
    border-radius: 14px;
  }

  .tl-ranking-stat-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 0.8rem;
  }

  .tl-ranking-stat-label {
    font-size: 0.58rem;
    margin-bottom: 0.1rem;
  }

  .tl-ranking-stat-value {
    font-size: 0.96rem;
  }

  .tl-ranking-form .row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin: 0;
  }

  .tl-ranking-form .row > [class*="col-"] {
    width: auto;
    max-width: none;
    padding: 0;
    margin: 0;
  }

  .tl-ranking-page .tl-ranking-form-label {
    margin-bottom: 0.2rem;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
  }

  .tl-ranking-search .form-control,
  .tl-ranking-select,
  .tl-ranking-reset {
    min-height: 40px;
    border-radius: 12px;
  }

  .tl-ranking-podium,
  .tl-ranking-table-panel {
    padding: 0.9rem;
  }

  .tl-ranking-leader {
    grid-template-columns: auto 1fr;
    gap: 0.7rem;
  }

  .tl-ranking-leader-avatar {
    width: 54px;
    height: 54px;
    border-radius: 16px;
  }

  .tl-ranking-leader-body,
  .tl-ranking-leader-score,
  .tl-ranking-leader-best {
    grid-column: 2;
  }

  .tl-ranking-pagination .pagination {
    justify-content: center !important;
  }
}
/* ==========================================================================
   Activity Deck: rankings as a results sheet
   ========================================================================== */

.tl-ranking-page .tl-ranking-table-panel {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.625rem;
  box-shadow: none;
}
.tl-ranking-page #tl-ranking-table thead th {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}
.tl-ranking-page .tl-rank-pos,
.tl-ranking-page .tl-rank-number,
.tl-ranking-page .tl-rank-date,
.tl-ranking-page .tl-rank-country-chip {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}
.tl-ranking-page .tl-rank-number { font-weight: 600; }
.tl-ranking-page .tl-stat-value,
.tl-ranking-page .tl-tasks-scope strong {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}


/* ==========================================================================
   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-ranking-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-ranking-hero::after { display: none; }
.tl-ranking-kicker {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  gap: 0.5rem;
}
.tl-ranking-kicker::before {
  content: "";
  width: 0.85rem;
  height: 3px;
  border-radius: 2px;
  background: var(--bs-primary);
  flex: 0 0 auto;
}
.tl-ranking-topline {
  grid-template-columns: 1fr;
  gap: 0.6rem;
}
.tl-ranking-summary-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: baseline;
  gap: 0.5rem 1.8rem;
}
.tl-ranking-scope,
.tl-ranking-hero .tl-tasks-scope {
  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;
}
.tl-ranking-scope-label {
  order: 2;
  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-ranking-scope strong,
.tl-ranking-hero .tl-tasks-scope strong {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 1.02rem;
  font-variant-numeric: tabular-nums;
  color: var(--bs-body-color);
}
.tl-ranking-hero .tl-ranking-stat-card,
.tl-ranking-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-ranking-hero .tl-ranking-stat-card .tl-ranking-stat-icon,
.tl-ranking-hero .tl-stat-card .tl-ranking-stat-icon { display: none; }
.tl-ranking-hero .tl-ranking-stat-card .tl-ranking-stat-body,
.tl-ranking-hero .tl-stat-card .tl-ranking-stat-body {
  display: flex;
  flex-direction: row-reverse;
  align-items: baseline;
  gap: 0.45rem;
}
.tl-ranking-hero .tl-ranking-stat-card .tl-ranking-stat-label,
.tl-ranking-hero .tl-stat-card .tl-ranking-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-ranking-hero .tl-ranking-stat-card .tl-ranking-stat-value,
.tl-ranking-hero .tl-stat-card .tl-ranking-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-ranking-hero .tl-ranking-stat-card .tl-stat-icon,
.tl-ranking-hero .tl-stat-card .tl-stat-icon { display: none; }
.tl-ranking-hero .tl-ranking-stat-card .tl-stat-body,
.tl-ranking-hero .tl-stat-card .tl-stat-body {
  display: flex;
  flex-direction: row-reverse;
  align-items: baseline;
  gap: 0.45rem;
}
.tl-ranking-hero .tl-ranking-stat-card .tl-stat-label,
.tl-ranking-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-ranking-hero .tl-ranking-stat-card .tl-stat-value,
.tl-ranking-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);
}
.tl-ranking-reset-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.5rem;
  background: transparent;
  border: 1px solid var(--bs-border-color);
  backdrop-filter: none;
  box-shadow: none;
  color: var(--bs-secondary-color);
}

/* ==========================================================================
   The board and its podium, side by side

   The top three sat in a full-width band above the running order, so the
   two things a reader compares were never on screen together. The mockup
   puts the podium in a narrow left column beside the board.
   ========================================================================== */

.tl-ranking-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 992px) {
  .tl-ranking-body {
    grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
    align-items: start;
  }
}

.tl-ranking-body .tl-ranking-podium,
.tl-ranking-body .tl-ranking-results {
  min-width: 0;
}

/* The podium stacks in its own column, so the three-across grid it had
   would give each leader a third of 22rem. */
.tl-ranking-body .tl-ranking-leaders-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* The search moved into the filter bar, so the results heading is a heading
   again rather than a heading plus a form control. */
.tl-ranking-results-head {
  align-items: baseline;
}

.tl-filterbar .tl-ranking-search {
  position: relative;
  display: flex;
  align-items: center;
}

.tl-filterbar .tl-ranking-search i {
  position: absolute;
  left: 0.7rem;
  font-size: 0.75rem;
  color: var(--tl-dim, #8B8F80);
  pointer-events: none;
}

.tl-filterbar .tl-ranking-search .form-control {
  padding-left: 2rem;
  min-width: 14rem;
}

/* Where the reader stands, under the podium ---------------------------- */
.tl-your-position {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.75rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--tl-hairline);
  border-radius: 12px;
  background: var(--tl-panel);
}

.tl-your-position-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.tl-your-position-who {
  font-family: var(--tl-font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tl-dim);
}

.tl-your-position-figure {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
}

.tl-your-position-figure strong {
  font-family: var(--tl-font-display);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--tl-ink);
}

.tl-your-position-of {
  font-family: var(--tl-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tl-muted);
}

/* The gap to close and the slots left to fill: what turns a position into
   something a reader can act on. */
.tl-your-position-notes {
  color: var(--tl-cta);
}
