/* ── RANKED PAGE ─────────────────────────────────────────────────────────── */

.rk-wrap {
  background: var(--bg, #0b1220);
  min-height: 100vh;
}

.rk-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 20px 72px;
}

/* Header */
.rk-header { margin-bottom: 0; }

.rk-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #6AA59C;
  margin-bottom: 14px;
}

.rk-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FF3131;
  flex-shrink: 0;
  animation: rk-blink 2.2s ease-in-out infinite;
}

@keyframes rk-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.rk-title {
  font-size: clamp(2.8rem, 7vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 16px;
  color: #e6edf6;
}

.rk-show-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: #94a3b8;
  background: rgba(106,165,156,0.08);
  border: 1px solid rgba(106,165,156,0.13);
  border-radius: 99px;
  padding: 5px 14px;
}

.rk-chip-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6AA59C;
  opacity: 0.7;
  flex-shrink: 0;
}

/* Week pills */
.rk-pills-scroll {
  overflow-x: auto;
  scrollbar-width: none;
  margin: 32px 0 28px;
}
.rk-pills-scroll::-webkit-scrollbar { display: none; }

.rk-pills {
  display: flex;
  gap: 6px;
  width: max-content;
  padding-bottom: 2px;
}

.rk-pill {
  padding: 6px 15px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: 1px solid rgba(106,165,156,0.13);
  background: transparent;
  color: #4e6070;
  transition: border-color 0.14s, color 0.14s, background 0.14s;
  white-space: nowrap;
  font-family: Inter, system-ui, sans-serif;
}
.rk-pill:hover:not(.active) {
  border-color: rgba(106,165,156,0.30);
  color: #94a3b8;
}
.rk-pill.active {
  background: #6AA59C;
  border-color: #6AA59C;
  color: #0b1220;
  font-weight: 700;
}

/* Section label */
.rk-section-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #4e6070;
  margin-bottom: 14px;
}
.rk-section-bar {
  display: inline-block;
  width: 3px;
  height: 13px;
  background: #6AA59C;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Contestant rows */
.rk-row {
  display: grid;
  grid-template-columns: 32px 38px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  background: rgba(15,25,41,0.85);
  border: 1px solid rgba(106,165,156,0.13);
  border-radius: 13px;
  margin-bottom: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.15s;
}
.rk-row:hover { border-color: rgba(106,165,156,0.30); }

.rk-row-first {
  border-color: rgba(245,158,11,0.22);
  background: linear-gradient(135deg, rgba(245,158,11,0.05) 0%, rgba(15,25,41,0.85) 60%);
}
.rk-row-first:hover { border-color: rgba(245,158,11,0.40); }

.rk-row-evicted {
  opacity: 0.38;
  border-style: dashed;
  pointer-events: none;
}

.rk-rank {
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #4e6070;
  text-align: center;
}
.rk-row-first .rk-rank { color: #f59e0b; }

.rk-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #0b1220;
  flex-shrink: 0;
}

.rk-meta { min-width: 0; }

.rk-name-line {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}
.rk-name-line span {
  font-size: 14.5px;
  font-weight: 600;
  color: #e6edf6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rk-crown { font-size: 12px; }

.rk-bar-track {
  height: 3px;
  background: rgba(106,165,156,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.rk-bar-fill {
  height: 100%;
  background: #6AA59C;
  border-radius: 2px;
  transition: width 0.7s cubic-bezier(.4,0,.2,1);
}
.rk-row-first .rk-bar-fill {
  background: linear-gradient(90deg, #6AA59C 30%, #f59e0b);
}

.rk-score-col { text-align: right; flex-shrink: 0; }

.rk-score {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #e6edf6;
  letter-spacing: -0.01em;
}

.rk-evicted-badge {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #FF3131;
  border: 1px solid rgba(255,49,49,0.30);
  border-radius: 4px;
  padding: 2px 5px;
  margin-top: 4px;
}

/* Score breakdown */
.rk-breakdown {
  margin-top: 28px;
  border: 1px solid rgba(106,165,156,0.13);
  border-radius: 13px;
  overflow: hidden;
}
.rk-bk-header {
  padding: 14px 18px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4e6070;
  border-bottom: 1px solid rgba(106,165,156,0.13);
  background: rgba(15,25,41,0.5);
}
.rk-bk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.rk-bk-cell {
  padding: 16px 18px;
  border-right: 1px solid rgba(106,165,156,0.13);
  border-bottom: 1px solid rgba(106,165,156,0.13);
}
.rk-bk-cell:nth-child(3n)      { border-right: none; }
.rk-bk-cell:nth-last-child(-n+3) { border-bottom: none; }
.rk-bk-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #4e6070;
  margin-bottom: 5px;
}
.rk-bk-val {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #6AA59C;
}

/* Disclaimer */
.rk-disclaimer {
  margin-top: 40px;
  font-size: 11px;
  line-height: 1.8;
  color: #4e6070;
  border-top: 1px solid rgba(106,165,156,0.13);
  padding-top: 22px;
}
.rk-disclaimer strong { color: #94a3b8; font-weight: 600; }

/* Empty */
.rk-empty {
  padding: 48px 20px;
  text-align: center;
  color: #4e6070;
  font-size: 14px;
}

/* Admin */
.rk-admin-wrap { margin-top: 8px; }

.rk-adm-divider {
  height: 1px;
  background: rgba(106,165,156,0.13);
  margin: 32px 0 24px;
}

.rk-adm-sublabel {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4e6070;
  margin-bottom: 10px;
}

.rk-adm-add-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.rk-adm-input { max-width: 200px; }

.rk-adm-note {
  margin-top: 20px;
  font-size: 13px;
  color: #4e6070;
}

@media (max-width: 520px) {
  .rk-bk-grid { grid-template-columns: repeat(2, 1fr); }
  .rk-bk-cell:nth-child(3n)        { border-right: revert; }
  .rk-bk-cell:nth-last-child(-n+3) { border-bottom: revert; }
  .rk-bk-cell:nth-child(2n)        { border-right: none; }
  .rk-bk-cell:nth-last-child(-n+2) { border-bottom: none; }
}
