/* ── NFL Rankings — rankings.css ───────────────────────────────────────── */

:root {
  --rk-font:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --rk-bg:      #f1f5f9;
  --rk-surface: #ffffff;
  --rk-row-alt: #f8fafc;
  --rk-border:  #e2e8f0;
  --rk-text:    #0f172a;
  --rk-text2:   #475569;
  --rk-text3:   #94a3b8;
  --rk-accent:  #7c3aed;
  --rk-green:   #15803d;
  --rk-red:     #dc2626;
  --rk-amber:   #d97706;
  --rk-purple:  #7c3aed;
}
html[data-theme="dark"] {
  --rk-bg:      #0f172a;
  --rk-surface: #1e293b;
  --rk-row-alt: #182234;
  --rk-border:  #334155;
  --rk-text:    #f1f5f9;
  --rk-text2:   #94a3b8;
  --rk-text3:   #64748b;
  --rk-accent:  #8b5cf6;
  --rk-green:   #4ade80;
  --rk-red:     #f87171;
  --rk-amber:   #fbbf24;
  --rk-purple:  #c4b5fd;
}
html[data-theme="dim"] {
  --rk-bg:      #161b2e;
  --rk-surface: #1e2a3e;
  --rk-row-alt: #182337;
  --rk-border:  #2d3f5c;
  --rk-text:    #dde4f0;
  --rk-text2:   #8899bb;
  --rk-text3:   #5c7099;
  --rk-accent:  #8b5cf6;
  --rk-green:   #4ade80;
  --rk-red:     #f87171;
  --rk-amber:   #fbbf24;
  --rk-purple:  #c4b5fd;
}

.rk-page {
  max-width: 1400px;
  margin: 0 auto;
  margin-top: calc(var(--ticker-h, 34px) + var(--topbar-h, 36px) + var(--header-h, 64px));
  padding: 24px 20px 60px;
  font-family: var(--rk-font);
  color: var(--rk-text);
  background: var(--rk-bg);
}

/* ── Header ──────────────────────────────────────────────────────────── */
.rk-hd {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.rk-hd-left h1 { font-size: 28px; font-weight: 900; letter-spacing: -.02em; margin: 0; }
.rk-hd-left p { margin: 4px 0 0; color: var(--rk-text2); font-size: 14px; }
.rk-hd-back {
  font-size: 13px; font-weight: 600; color: var(--rk-accent);
  text-decoration: none; white-space: nowrap;
}
.rk-hd-back:hover { text-decoration: underline; }

/* ── Filters ─────────────────────────────────────────────────────────── */
.rk-filters {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  background: var(--rk-surface);
  border: 1px solid var(--rk-border);
  border-radius: 0;
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.rk-filter-group { display: flex; flex-direction: column; gap: 6px; }
.rk-filter-group label {
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--rk-text3);
}
.rk-search-group { flex: 1; min-width: 160px; }

/* Remove Bye Weeks — button + checkbox popover */
.rk-bye-group { position: relative; }
.rk-bye-btn {
  text-align: left;
  cursor: pointer;
  min-width: 190px;
}
.rk-bye-btn.rk-bye-btn-active {
  border-color: var(--rk-accent);
  color: var(--rk-accent);
  font-weight: 700;
}
.rk-bye-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  background: var(--rk-surface);
  border: 1px solid var(--rk-border);
  border-radius: 0;
  box-shadow: 0 12px 28px rgba(0,0,0,.25);
  padding: 8px;
  max-height: 260px;
  overflow-y: auto;
  min-width: 160px;
}
.rk-bye-panel.open { display: block; }
.rk-bye-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--rk-text);
  padding: 6px 8px;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
}
.rk-bye-opt:hover { background: var(--rk-row-alt); }
.rk-bye-opt input { accent-color: var(--rk-accent); }

.rk-seg { display: flex; border: 1px solid var(--rk-border); border-radius: 0; overflow: hidden; }
.rk-seg-btn {
  border: none; background: transparent; color: var(--rk-text2);
  font-family: var(--rk-font); font-size: 13.5px; font-weight: 700;
  padding: 8px 14px; cursor: pointer; transition: background .12s, color .12s;
  border-right: 1px solid var(--rk-border);
}
.rk-seg-btn:last-child { border-right: none; }
.rk-seg-btn:hover { background: var(--rk-row-alt); }
.rk-seg-btn.active { background: var(--rk-accent); color: #fff; }

.rk-select {
  border: 1px solid var(--rk-border);
  background: var(--rk-bg);
  color: var(--rk-text);
  font-family: var(--rk-font);
  font-size: 13.5px;
  padding: 8px 12px;
  border-radius: 0;
  min-width: 150px;
  outline: none;
}
.rk-select:focus { border-color: var(--rk-accent); }

.rk-count {
  margin-left: auto;
  font-size: 13px;
  color: var(--rk-text3);
  font-weight: 600;
  white-space: nowrap;
  padding-bottom: 8px;
}

/* ── Table ───────────────────────────────────────────────────────────── */
.rk-table-wrap {
  background: var(--rk-surface);
  border: 1px solid var(--rk-border);
  border-radius: 0;
  overflow: auto;
  max-height: calc(100vh - 320px);
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.25), 0 0 0 1px var(--rk-border);
}
.rk-loading {
  padding: 60px 20px;
  text-align: center;
  color: var(--rk-text3);
  font-size: 14px;
}
.rk-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
}
.rk-table thead th {
  position: sticky;
  top: 0;
  background: var(--rk-surface);
  border-bottom: 2px solid var(--rk-border);
  color: var(--rk-text3);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 10px 12px;
  text-align: right;
  white-space: nowrap;
  z-index: 2;
}
.rk-table th.rk-col-team,
.rk-table th.rk-col-player,
.rk-table th.rk-col-pos { text-align: left; }
.rk-table th.rk-col-num { text-align: right; }
.rk-sortable { cursor: pointer; user-select: none; }
.rk-sortable:hover { color: var(--rk-accent); }
.rk-sort-active { color: var(--rk-accent) !important; }

.rk-table tbody tr {
  border-left: 3px solid transparent;
  transition: background .1s;
}
.rk-table tbody tr:nth-child(even) { background: var(--rk-row-alt); }
.rk-table tbody tr:hover { background: rgba(59,130,246,.08); border-left-color: var(--team-color, var(--rk-accent)); }
.rk-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--rk-border);
  white-space: nowrap;
}
.rk-table td.rk-col-num { text-align: right; }
.rk-rank { color: var(--rk-text3); font-weight: 700; }
.rk-dash { color: var(--rk-text3); }

.rk-col-player { font-weight: 700; color: var(--rk-text); }
.rk-col-pts { font-weight: 800; color: var(--rk-text); }

.rk-team-chip { display: flex; align-items: center; gap: 6px; }
.rk-team-chip img { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.rk-team-alias {
  font-size: 11px; font-weight: 800; letter-spacing: .04em;
  color: var(--rk-text2);
}

.rk-pos-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: 0;
}
.rk-pos-QB { background: rgba(124,58,237,.14); color: var(--rk-purple); }
.rk-pos-RB { background: rgba(21,128,61,.14); color: var(--rk-green); }
.rk-pos-WR { background: rgba(29,78,216,.14); color: var(--rk-accent); }
.rk-pos-TE { background: rgba(217,119,6,.14); color: var(--rk-amber); }

/* ── Paywall preview ─────────────────────────────────────────────────── */
.rk-table-wrap.rk-gated {
  position: relative;
  max-height: 640px;
  overflow: hidden;
}
.rk-table tbody tr.rk-blurred td {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
}
.rk-paywall {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  top: 152px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(to bottom, transparent, var(--rk-surface) 22%);
}
.rk-paywall-card {
  text-align: center;
  max-width: 380px;
  padding: 24px 28px;
  border-radius: 0;
  background: var(--rk-surface);
  border: 1px solid var(--rk-border);
  box-shadow: 0 20px 40px rgba(0,0,0,.25);
}
.rk-paywall-lock { font-size: 30px; margin-bottom: 8px; }
.rk-paywall-card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 800; color: var(--rk-text); }
.rk-paywall-card p { margin: 0 0 16px; font-size: 13px; color: var(--rk-text2); line-height: 1.5; }
.rk-paywall-actions { display: flex; gap: 10px; justify-content: center; }
.rk-paywall-btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 0;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .1s, opacity .1s;
}
.rk-paywall-btn:hover { opacity: .9; }
.rk-paywall-btn-primary { background: var(--rk-accent); color: #fff; }
.rk-paywall-btn-ghost { background: transparent; color: var(--rk-text); border: 1px solid var(--rk-border); }

@media (max-width: 860px) {
  .rk-filters { gap: 12px; }
  .rk-count { margin-left: 0; width: 100%; padding-bottom: 0; }
  .rk-table { font-size: 12.5px; }
}

