.leaderboard-shell {
  overflow: hidden;
}

.leaderboard-shell .back-link {
  display: block;
  margin: 0 auto 22px;
  text-align: center;
}

.leaderboard-hero,
.filter-dock,
.summary-card,
.view-panel,
.pulse-card,
.activity-row,
.page-note {
  background: rgba(15, 15, 15, 0.9);
  border: 2px solid #00cccc;
  border-radius: 12px;
  box-shadow: 0 0 18px rgba(0, 255, 255, 0.18);
}

.leaderboard-hero,
.filter-dock,
.view-panel {
  text-align: left;
}

.leaderboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 20px;
  margin-bottom: 22px;
  padding: 22px;
}

.eyebrow,
.meta-label,
.summary-card__label,
.panel-kicker,
.control span,
.pager-status {
  display: block;
  color: #00cccc;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.leaderboard-hero h2 {
  margin: 10px 0 12px;
  color: #e0e0e0;
  font-size: 2rem;
  line-height: 1.2;
  text-shadow: 0 0 8px rgba(0, 204, 204, 0.24);
}

.leaderboard-hero__lede,
.meta-card strong,
.summary-card__meta,
.panel-copy,
.page-note,
.pulse-card__meta,
.activity-row p {
  color: #e0e0e0;
}

.leaderboard-hero__meta {
  display: grid;
  gap: 14px;
  align-content: center;
}

.meta-card {
  padding: 18px;
  border: 1px solid rgba(0, 204, 204, 0.45);
  border-radius: 10px;
  background: rgba(12, 12, 12, 0.92);
}

.meta-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.2rem;
  font-weight: 700;
}

.filter-dock {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px;
}

.view-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.view-pill,
.pager-btn {
  border: 1px solid #00cccc;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.96);
  color: #00cccc;
  font: inherit;
  font-weight: 700;
  padding: 10px 18px;
  transition: all 0.25s ease;
}

.view-pill:hover,
.view-pill:focus-visible,
.pager-btn:hover,
.pager-btn:focus-visible {
  background: #00cccc;
  color: #000;
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.35);
  outline: none;
}

.view-pill.is-active {
  background: #00cccc;
  color: #000;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

.view-pill[aria-selected="true"] {
  background: #00cccc;
  color: #000;
}

.control-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
}

.control {
  min-width: 210px;
}

.control select {
  width: 100%;
  margin-top: 8px;
  padding: 11px 14px;
  border: 1px solid #00cccc;
  border-radius: 8px;
  background: rgba(8, 8, 8, 0.95);
  color: #e0e0e0;
  font: inherit;
}

.control select:focus-visible {
  outline: none;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.25);
}

.page-note {
  margin-bottom: 18px;
  padding: 14px 18px;
  text-align: center;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.summary-card {
  padding: 18px;
  text-align: left;
}

.summary-card__value {
  display: block;
  margin: 10px 0 8px;
  color: #e0e0e0;
  font-size: 2rem;
  font-weight: 700;
}

.view-panel {
  display: none;
  margin-bottom: 20px;
  padding: 20px;
}

.view-panel.is-active {
  display: block;
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

.panel-copy {
  margin: 0;
  text-align: right;
}

.table-shell {
  overflow-x: auto;
  border: 1px solid rgba(0, 204, 204, 0.45);
  border-radius: 10px;
  background: rgba(8, 8, 8, 0.96);
}

.leaderboard-table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 204, 204, 0.18);
  vertical-align: middle;
}

.leaderboard-table th {
  color: #00cccc;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(14, 14, 14, 0.96);
}

.leaderboard-table tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.02);
}

.leaderboard-table tbody tr:hover {
  background: rgba(0, 255, 255, 0.05);
}

.rank-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  min-height: 2.4rem;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(0, 204, 204, 0.12);
  color: #e0e0e0;
  border: 1px solid rgba(0, 204, 204, 0.35);
  font-weight: 700;
}

.leader-name {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e0e0e0;
  font-weight: 700;
}

.leader-name__status {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: #555;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
  flex: 0 0 auto;
}

.leader-name__status.is-online {
  background: #00ff99;
  box-shadow: 0 0 0 3px rgba(0, 255, 153, 0.12);
}

.context-copy,
.empty-row {
  color: #cfd6d6;
}

.metric-strong {
  color: #e0e0e0;
  font-weight: 700;
}

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.pager[hidden] {
  display: none;
}

.pager-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.pager-status {
  color: #e0e0e0;
}

.pulse-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.pulse-card {
  padding: 18px;
  text-align: left;
}

.pulse-card--offline {
  border-color: #ff4444;
  box-shadow: 0 0 18px rgba(255, 68, 68, 0.18);
}

.pulse-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.pulse-card__header h3 {
  margin: 0;
  color: #00cccc;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #00ff99;
  color: #00ff99;
  background: rgba(0, 255, 153, 0.08);
  font-size: 0.82rem;
}

.status-chip.is-offline {
  border-color: #ff4444;
  color: #ff9999;
  background: rgba(255, 68, 68, 0.08);
}

.pulse-card__count {
  display: block;
  color: #e0e0e0;
  font-size: 1.9rem;
  font-weight: 700;
}

.pulse-card__progress {
  margin: 14px 0;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.pulse-card__progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #00cccc, #00ff99);
}

.pulse-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pulse-stat {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.pulse-stat strong {
  display: block;
  margin-top: 4px;
  color: #e0e0e0;
}

.pulse-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid #00cccc;
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.96);
  color: #00cccc;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.25s ease;
}

.ghost-link:hover,
.ghost-link:focus-visible {
  background: #00cccc;
  color: #000;
  outline: none;
}

.activity-feed {
  display: grid;
  gap: 12px;
}

.activity-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
}

.activity-row__glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  border: 1px solid rgba(0, 204, 204, 0.4);
  background: rgba(0, 204, 204, 0.1);
  color: #00cccc;
  font-weight: 700;
}

.activity-row strong {
  color: #e0e0e0;
}

.activity-row p {
  margin: 4px 0 0;
}

.activity-row__time {
  color: #cfd6d6;
  white-space: nowrap;
  text-align: right;
}

@media (max-width: 1024px) {
  .leaderboard-hero {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pulse-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-copy {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .leaderboard-hero,
  .filter-dock,
  .summary-card,
  .view-panel,
  .pulse-card,
  .activity-row {
    padding: 16px;
  }

  .leaderboard-hero h2 {
    font-size: 1.55rem;
  }

  .control-strip,
  .pulse-actions {
    flex-direction: column;
  }

  .control {
    min-width: 0;
    width: 100%;
  }

  .summary-grid,
  .pulse-grid {
    grid-template-columns: 1fr;
  }

  .activity-row {
    grid-template-columns: auto 1fr;
  }

  .activity-row__time {
    grid-column: 2;
    text-align: left;
  }
}
