/* ---------- Sponsor ribbon (top of every page) ---------- */
.promo-strip {
  display: block;
  text-align: center;
  background: var(--color-primary-hover);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 6px var(--space-4);
}

.promo-strip strong {
  color: var(--color-accent);
  font-weight: 800;
}

.promo-strip:hover {
  text-decoration: none;
  color: #fff;
}

/* ---------- Page-to-page transitions ----------
   Cross-fade between pages instead of a hard white flash. The top bar gets its
   own transition name so it is carried across the navigation as one stable
   element (it doesn't fade out and back in with the page content). Browsers
   without cross-document view transitions simply ignore this. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.14s;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* ---------- Top nav ---------- */
.top-bar {
  background: var(--color-primary);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 10;
  view-transition-name: top-bar;
}

.top-bar-content {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.container-wide {
  max-width: 1320px;
}

.container-narrow {
  max-width: 520px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
  opacity: 0.92;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--color-accent);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

.nav-links {
  display: flex;
  gap: var(--space-5);
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a {
  position: relative;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
  font-size: 14px;
  padding: 4px 0;
}

.nav-links a:hover {
  color: #fff;
  text-decoration: none;
}

.nav-links a.active {
  color: #fff;
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-accent);
}

/* Collapse to the hamburger menu while there isn't room for the full row of
   nav items (up to 9 when a ranker is signed in), so it never wraps to a
   second line and overlaps the page. */
@media (max-width: 1080px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: var(--space-2) var(--space-5) var(--space-4);
    background: var(--color-primary);
    box-shadow: var(--shadow-lg);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a,
  .nav-links #auth-slot {
    width: 100%;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .nav-links a.active::after {
    display: none;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, box-shadow 0.15s, transform 0.05s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn-block {
  width: 100%;
}

.google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 3px;
  padding: 1px;
}

.hint {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 400;
}

/* ---------- Week / weight-class controls ---------- */
.controls-row {
  margin: 0 0 var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.controls-row label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

select, input[type="text"], input[type="date"],
input[type="email"], input[type="password"], textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color 0.15s;
}

select {
  max-width: 280px;
}

select:focus, input:focus, textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.weight-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-5);
}

.weight-tab {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.weight-tab:hover {
  border-color: var(--color-primary);
}

.weight-tab.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* Per-tab submit status dot: published (green) / draft (gold) / not started. */
.tab-status {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
}

.tab-status.published {
  background: var(--color-success);
}

.tab-status.draft {
  background: var(--color-accent);
}

.tab-status.empty {
  background: var(--color-border);
}

/* Week-level actions bar (progress + Full View / Submit all 14 / Remove). */
.week-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin: 0 0 var(--space-4);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.week-progress {
  font-weight: 700;
  font-size: 13px;
  color: var(--color-muted);
}

.week-progress.complete {
  color: var(--color-success);
}

.week-actions-btns {
  display: flex;
  gap: var(--space-2);
  margin-left: auto;
  flex-wrap: wrap;
}

.fullview-footer-btns {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* ---------- Ranking list ---------- */
.ranking-list {
  list-style: none;
  margin: 0 0 var(--space-5);
  padding: 0;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.player-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: var(--space-3);
  padding: 14px var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.player-row:last-child {
  border-bottom: none;
}

.player-row .rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-surface-2);
  color: var(--color-muted);
  font-weight: 800;
  font-size: 13px;
}

.player-row:nth-child(1) .rank {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.player-row .name {
  font-weight: 700;
  font-size: 15px;
}

.player-row .category {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 400;
  margin-top: 1px;
}

/* ---------- Vote bar (compact) ---------- */
.vote-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  padding: 7px 8px 7px var(--space-4);
  margin-bottom: var(--space-4);
}

.vote-q {
  font-weight: 700;
  font-size: 13.5px;
}

.vote-chips {
  display: flex;
  gap: var(--space-2);
  margin-left: auto;
}

.vote-chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.vote-chip:hover:not(:disabled) {
  border-color: var(--color-primary);
}

/* Past weeks are view-only: chips show the final tally but can't be clicked. */
.vote-chip:disabled {
  cursor: default;
  opacity: 0.65;
}

.vote-closed-note {
  font-size: 12px;
  color: var(--color-muted);
  font-style: italic;
}

.vote-chip.active-agree {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}

.vote-chip.active-disagree {
  background: var(--color-danger);
  border-color: var(--color-danger);
  color: #fff;
}

.vote-error:empty {
  display: none;
}

.vote-error {
  flex-basis: 100%;
  min-height: 0;
  margin: 0;
  text-align: right;
}

.comment-form-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* ---------- Comments ---------- */
.comments-section {
  margin-top: var(--space-2);
}

.comment {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
}

.comment-meta {
  font-size: 12px;
  color: var(--color-muted);
  margin-bottom: var(--space-1);
}

.comment-meta strong {
  color: var(--color-text);
}

.comment-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
}

#comment-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

#comment-form textarea {
  min-height: 80px;
  resize: vertical;
}

#comment-form .btn {
  align-self: flex-start;
}

/* Nested replies: an accent thread rail + the inline margin-left set per depth
   in JS makes the thread structure obvious without deep DOM nesting. The rail
   hangs the reply off its parent Instagram-style; JS clamps the indent at
   MAX_INDENT_LEVELS so deep chains stay on-screen on mobile. */
.comment-reply {
  border-left: 3px solid var(--color-accent);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  padding-left: var(--space-4);
}

/* Muted "↳ Reply to <Name>" attribution shown on replies (depth > 0) so each
   reply names the comment it answers. */
.comment-reply-to {
  font-size: 12px;
  font-style: italic;
  color: var(--color-muted);
  margin-bottom: var(--space-1);
}

.comment-actions {
  margin-top: var(--space-2);
}

.comment-reply-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
}

.comment-reply-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0 0 var(--space-3) 0;
  /* Matching accent rail so the in-progress reply visibly belongs to the
     comment it hangs beneath (JS sets the margin-left to indent it one step). */
  border-left: 3px solid var(--color-accent);
  padding-left: var(--space-4);
}

/* "Replying to <Name>…" hint in the reply form header. */
.comment-reply-hint {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-muted);
  margin: 0;
}

.comment-reply-hint:empty {
  display: none;
}

.comment-reply-form textarea {
  min-height: 56px;
  resize: vertical;
}

.comment-reply-form .btn {
  align-self: flex-start;
}

/* ---------- @-mentions ---------- */
/* An @mention rendered inside comment text: a subtle accent chip. Only known
   commenter names are ever wrapped in this span (escape-then-linkify), so it
   never carries user-controlled markup. */
.mention {
  color: var(--color-accent-ink);
  background: rgba(201, 162, 39, 0.18); /* --color-accent (#c9a227) at 18% */
  border-radius: var(--radius-sm);
  padding: 0 3px;
  font-weight: 600;
}

/* Wrapper injected by attachMentionAutocomplete so the dropdown can anchor to
   the textarea. Full-width flex item; the textarea keeps filling the form. */
.mention-anchor {
  position: relative;
  display: block;
  width: 100%;
}

.mention-anchor textarea {
  width: 100%;
}

/* Autocomplete surface card, floated just under the textarea. */
.mention-suggest {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  margin-top: var(--space-1);
  max-height: 220px;
  overflow-y: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: var(--space-1);
}

.mention-suggest-item {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
}

.mention-suggest-item.active,
.mention-suggest-item:hover {
  background: var(--color-surface-2);
  color: var(--color-primary);
}

/* ---------- Forms ---------- */
.form {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--space-6) var(--space-5);
}

.form-centered {
  text-align: center;
}

.form-error {
  color: var(--color-danger);
  font-size: 13px;
  min-height: 1.2em;
  margin-top: var(--space-3);
}

/* Same slot reused for a transient success confirmation. */
.form-error.form-note {
  color: var(--color-success);
}

/* ---------- Auth (sign-in / sign-up) ---------- */
.auth-card {
  max-width: 400px;
  margin: 0 auto;
  text-align: left;
}

.auth-card h1,
.auth-card .page-subtitle {
  text-align: center;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.auth-field label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

.auth-field input {
  width: 100%;
}

.auth-form .btn {
  margin-top: var(--space-1);
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-3);
  flex-wrap: wrap;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-5) 0;
  color: var(--color-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.btn-outline {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-outline:hover {
  background: var(--color-surface-2);
}

.btn-outline:disabled {
  opacity: 0.55;
  cursor: default;
}

.panel-note {
  color: var(--color-muted);
  font-size: 13px;
  margin: 0 0 var(--space-3);
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin: var(--space-3) 0;
}

/* ---------- Rank dashboard ---------- */
.dashboard-guide {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4) var(--space-3) calc(var(--space-4) + 1.2em);
  margin: 0 0 var(--space-5);
  color: var(--color-muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.dashboard-guide li {
  margin-bottom: var(--space-1);
}

.dashboard-guide strong {
  color: var(--color-text);
}

.builder-picker {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: flex-start;
  margin: var(--space-3) 0 var(--space-4);
}

.panel {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}

.panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.panel-header h2 {
  margin: 0;
}

.panel-hint {
  color: var(--color-muted);
  font-size: 12.5px;
}

.simple-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.simple-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  justify-content: space-between;
  font-size: 14px;
}

.simple-list li:last-child {
  border-bottom: none;
}

/* Roster CSV tools + inline edit row */
.roster-tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin: var(--space-2) 0 var(--space-3);
}

.roster-editing {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.roster-editing input {
  flex: 1 1 120px;
  min-width: 0;
  margin-bottom: 0;
}

.link-btn {
  background: none;
  border: none;
  color: var(--color-danger);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  padding: 4px 0;
  flex-shrink: 0;
}

.link-btn:hover {
  text-decoration: underline;
}

.builder-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-4) 0 var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.builder-actions {
  display: flex;
  gap: var(--space-2);
  margin-left: auto;
}

/* Tucked-away "new week" disclosure inside the Week picker. */
.new-week-details {
  margin-top: var(--space-2);
}

.new-week-details summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  width: fit-content;
}

.new-week-details .inline-form {
  margin-top: var(--space-2);
}

/* ---------- Full-view overlay (review all rankings before submitting) ---------- */
.fullview-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--space-4);
  overflow-y: auto;
}

.fullview-inner {
  background: var(--color-surface-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 1100px;
  margin: var(--space-4) 0;
  display: flex;
  flex-direction: column;
}

/* The double-click edit dialog reuses the overlay chrome but is a narrow form. */
.wrestler-edit-inner {
  max-width: 460px;
}

.wrestler-edit-form {
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.wrestler-edit-form .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wrestler-edit-form .field span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-muted);
}

.wrestler-edit-form input {
  margin-bottom: 0;
}

#we-optional-fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.fullview-header,
.fullview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  position: sticky;
  background: var(--color-surface-2);
  z-index: 1;
}

.fullview-header {
  top: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.fullview-header h2 {
  margin: 0;
}

.fullview-footer {
  bottom: 0;
  border-top: 1px solid var(--color-border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.fullview-content {
  padding: var(--space-4) var(--space-5);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-4);
}

.fv-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.fv-list-header h3 {
  margin: 0;
}

.fv-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
}

.fv-live {
  background: var(--color-success);
  color: #fff;
}

.fv-draft {
  background: var(--color-surface);
  color: var(--color-muted);
  border: 1px solid var(--color-border);
}

.publish-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  font-size: 14px;
}

.publish-toggle input {
  width: 17px;
  height: 17px;
  accent-color: var(--color-primary);
}

.save-indicator {
  color: var(--color-muted);
  font-size: 13px;
  min-width: 60px;
  text-align: right;
}

.builder-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

@media (max-width: 640px) {
  .builder-columns {
    grid-template-columns: 1fr;
  }

  .nav-links {
    gap: var(--space-3);
  }

  .player-row {
    padding: 12px var(--space-3);
  }
}

.builder-column input[type="text"] {
  width: 100%;
  margin-bottom: var(--space-2);
}

.drag-list {
  list-style: none;
  margin: 0;
  padding: var(--space-1);
  min-height: 64px;
  background: var(--color-surface-2);
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius);
}

.drag-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 9px 10px;
  margin-bottom: var(--space-1);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  cursor: grab;
}

.drag-item:last-child {
  margin-bottom: 0;
}

.drag-item.dragging {
  opacity: 0.4;
}

.drag-rank {
  color: var(--color-muted);
  font-weight: 800;
  width: 26px;
  flex-shrink: 0;
  font-size: 13px;
}

.drag-name {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
}

.drag-remove, .drag-add {
  border: none;
  background: var(--color-surface-2);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--color-text);
}

.drag-remove:hover {
  background: #fbdad8;
  color: var(--color-danger);
}

.drag-add:hover {
  background: #d3ecdc;
  color: var(--color-success);
}

/* Inline points editor on a ranked team row (Build a Ranking → Teams tab). */
.team-points-inline {
  flex: 0 0 72px;
  max-width: 72px;
  min-width: 0;
  margin-bottom: 0;
  padding: 4px 6px;
  text-align: center;
  font-size: 13px;
}

/* Up/down reorder controls — the touch-friendly alternative to drag on phones. */
.move-btns {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.move-btn {
  border: none;
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  width: 30px;
  height: 30px;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text);
  flex-shrink: 0;
}

.move-btn:hover:not(:disabled) {
  background: var(--color-border);
  color: var(--color-primary);
}

.move-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

/* ---------- Empty ranking slots + inline create ---------- */
.drag-item.empty-slot {
  background: transparent;
  border: 1.5px dashed var(--color-border);
  box-shadow: none;
  cursor: default;
}

.slot-add {
  flex: 1;
  border: none;
  background: none;
  text-align: left;
  color: var(--color-muted);
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}

.slot-add:hover {
  color: var(--color-primary);
}

/* "+ Add wrestler" affordance under the Available Wrestlers heading — lets a
   ranker create a wrestler straight into the current weight class. */
.available-add-row {
  display: flex;
  align-items: center;
  margin: 0 0 var(--space-3);
  min-height: 32px;
}

/* Make this add button clearly clickable (not the faint muted text the empty
   ranked-slot uses) so it stands out under the heading. */
.available-add-row .slot-add {
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 1px dashed var(--color-accent);
  border-radius: var(--radius-sm);
  color: var(--color-accent-ink);
  font-weight: 700;
}

.available-add-row .slot-add:hover {
  background: var(--color-surface-2);
  color: var(--color-primary);
}

.slot-create-form {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.slot-create-form input {
  flex: 1;
  min-width: 90px;
  padding: 6px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
}

/* ---------- Ranker's vs People's view toggle ---------- */
.view-toggle {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  margin: 0 0 var(--space-2);
}

.view-tab {
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--color-muted);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}

.view-tab:hover {
  color: var(--color-text);
}

.view-tab.active {
  background: var(--color-primary);
  color: #fff;
}

.view-caption {
  margin: 0 0 var(--space-3);
  color: var(--color-muted);
  font-size: 13px;
}

/* People's ranking rows carry a movement delta on the right. */
.people-row {
  grid-template-columns: 40px 1fr auto;
}

.delta {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.delta.up {
  color: var(--color-success);
}

.delta.down {
  color: var(--color-danger);
}

.delta.even {
  color: var(--color-muted);
  font-weight: 700;
}

/* ---------- Fan ranking builder ---------- */
.fan-rank-section {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
}

.fan-drag-list {
  list-style: none;
  margin: 0 0 var(--space-3);
  padding: var(--space-1);
  background: var(--color-surface-2);
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius);
}

.fan-drag-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 11px 12px;
  margin-bottom: var(--space-1);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  cursor: grab;
}

.fan-drag-item:last-child {
  margin-bottom: 0;
}

.fan-drag-item.dragging {
  opacity: 0.4;
}

.fan-drag-item:active {
  cursor: grabbing;
}

.fan-drag-item .drag-name {
  flex: 1;
}

.drag-handle {
  color: var(--color-border);
  font-size: 16px;
  letter-spacing: -3px;
  flex-shrink: 0;
}

/* Builder on the left, a read-only reference ranking on the right. */
.fan-rank-layout {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.fan-build-col {
  flex: 1 1 55%;
  min-width: 0;
}

.fan-ref-col {
  flex: 1 1 45%;
  min-width: 0;
}

.fan-col-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-muted);
  margin-bottom: var(--space-1);
}

.fan-ref-toggle {
  margin-bottom: var(--space-2);
}

.fan-ref-toggle .ref-tab {
  padding: 6px 12px;
  font-size: 12px;
}

.fan-ref-list {
  margin: 0;
}

.fan-ref-list .ref-row {
  padding-top: 8px;
  padding-bottom: 8px;
}

@media (max-width: 640px) {
  .fan-rank-layout {
    flex-direction: column;
  }
  .fan-build-col,
  .fan-ref-col {
    flex-basis: auto;
    width: 100%;
  }
}

.fan-rank-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.fan-rank-toolbar .save-indicator {
  text-align: left;
  min-width: auto;
}

/* ---------- Buttons: sizes + variants ---------- */
.btn-lg {
  padding: 14px 26px;
  font-size: 15px;
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-primary);
}

.btn-accent:hover {
  background: #b8920f;
}

.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-border);
}

.btn-ghost:hover {
  border-color: var(--color-primary);
  background: var(--color-surface);
}

/* Destructive action (e.g. delete account) — outlined until hover so it never
   competes with the primary button, then fills red to confirm the weight. */
.btn-danger {
  background: transparent;
  color: var(--color-danger);
  border: 1.5px solid var(--color-danger);
}

.btn-danger:hover {
  background: var(--color-danger);
  color: #fff;
}

.btn-danger:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn-ghost-light {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.16);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  white-space: nowrap;
}

.available-search-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: wrap;
}

.available-search-row #available-search {
  flex: 1;
  min-width: 0;
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 400px at 50% -160px, #21325c 0%, transparent 70%),
    var(--color-primary);
  color: #fff;
}

.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--space-8) var(--space-5);
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  margin-bottom: var(--space-4);
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.16);
  color: var(--color-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0 auto var(--space-4);
  max-width: 16ch;
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero-sub {
  margin: 0 auto var(--space-6);
  max-width: 54ch;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.82);
}

.cta-row {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Sections + cards ---------- */
.section {
  padding: var(--space-8) 0;
}

.section-tight {
  padding: var(--space-7) 0;
}

.section-head {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto var(--space-6);
}

.section-head h2 {
  font-size: 26px;
}

.section-head p {
  margin: 0;
  color: var(--color-muted);
  font-size: 16px;
}

.surface-band {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
}

.card h3 {
  font-size: 17px;
  margin-bottom: var(--space-2);
}

.card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 14.5px;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--space-4);
  border-radius: 10px;
  background: rgba(22, 33, 62, 0.06);
  color: var(--color-primary);
}

.card-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Numbered steps (how it works) ---------- */
.steps {
  display: grid;
  gap: var(--space-4);
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: var(--space-4);
  align-items: start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
}

.step h3 {
  font-size: 17px;
  margin: 4px 0 var(--space-2);
}

.step p {
  margin: 0;
  color: var(--color-muted);
  font-size: 14.5px;
}

/* ---------- Archive: week cards ---------- */
.week-cards {
  display: grid;
  gap: var(--space-3);
}

.week-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4) var(--space-5);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.05s;
}

.week-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow);
  text-decoration: none;
  transform: translateY(-1px);
}

.week-card .week-label {
  font-weight: 800;
  font-size: 16px;
  color: var(--color-text);
}

.week-card .week-date {
  color: var(--color-muted);
  font-size: 13px;
  margin-top: 2px;
}

.week-card .week-badge {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--color-surface-2);
  color: var(--color-muted);
}

.week-card .week-badge.current {
  background: var(--color-accent);
  color: var(--color-primary);
}

/* ---------- Skeleton loaders ---------- */
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton {
  display: inline-block;
  background: linear-gradient(
    90deg,
    var(--color-surface-2) 25%,
    var(--color-border) 50%,
    var(--color-surface-2) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
  }
}

/* Ranking-row skeleton: reuses .player-row so grid/padding/borders match the
   real rows and there's no layout shift when content loads. */
.player-row--skel .skel-rank {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.player-row--skel .skel-name {
  height: 14px;
  max-width: 100%;
  border-radius: 999px;
}

/* Archive week-card skeleton. */
.skel-week-lines {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.skel-line {
  height: 12px;
  border-radius: 999px;
}

.skel-line-lg {
  width: 160px;
  height: 15px;
}

.skel-line-sm {
  width: 100px;
}

.skel-badge {
  width: 64px;
  height: 22px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* ---------- Notices ---------- */
.notice {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  color: var(--color-muted);
  font-size: 14px;
}

.comment-quota {
  color: var(--color-muted);
  font-size: 12.5px;
  margin: var(--space-1) 0 0;
}

/* ---------- Site footer / GrappleTrade branding ---------- */
.site-footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.75);
  margin-top: var(--space-8);
}

.site-footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--space-6) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.footer-nav {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  font-weight: 600;
}

.footer-nav a:hover {
  color: #fff;
  text-decoration: none;
}

.powered-by {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  font-weight: 500;
}

.powered-by strong {
  color: #fff;
  font-weight: 800;
}

.powered-by:hover {
  text-decoration: none;
}

.powered-by:hover strong {
  color: var(--color-accent);
}

/* ---------- Team rankings (dashboard) ---------- */
.team-publish-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.switch-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.team-row {
  justify-content: flex-start;
  gap: var(--space-2);
}

.team-rank {
  font-weight: 700;
  color: var(--color-muted);
  min-width: 2.4em;
}

.team-name-input {
  flex: 2 1 160px;
  min-width: 0;
  margin-bottom: 0;
}

.team-points-input {
  flex: 1 1 90px;
  min-width: 0;
  max-width: 130px;
  margin-bottom: 0;
}

.team-row .link-btn {
  margin-left: auto;
}

/* ---------- Compact team manager (relocated into #team-builder-panel) ---------- */
.team-manage {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.team-manage h3 {
  margin: 0 0 2px;
  font-size: 14px;
}

.team-manage .panel-hint {
  display: block;
  margin-bottom: var(--space-2);
  font-size: 12px;
}

.team-manage .inline-form {
  margin: var(--space-2) 0;
  gap: var(--space-2);
}

.team-manage .inline-form input {
  flex: 1 1 140px;
  min-width: 0;
  padding: 6px 8px;
  font-size: 13px;
  margin-bottom: 0;
}

.team-manage #new-team-points {
  flex: 1 1 110px;
  max-width: 160px;
}

.team-manage .roster-tools {
  margin: var(--space-2) 0;
}

.team-manage .form-error {
  margin: var(--space-1) 0;
  font-size: 12.5px;
}

/* Tighter list rows inside the compact manager */
.team-manage .simple-list li {
  padding: 6px 0;
  gap: var(--space-2);
  font-size: 13px;
}

.team-manage .team-name-input,
.team-manage .team-points-input {
  padding: 5px 8px;
  font-size: 13px;
}

.team-manage .team-name-input {
  flex: 2 1 130px;
}

.team-manage .team-points-input {
  flex: 1 1 80px;
  max-width: 110px;
}

/* ---------- Team standings (public) ---------- */
/* Override .player-row's 2-col grid so the points can sit on the right. */
.team-standing-row {
  display: flex;
  align-items: center;
}

.team-standing-row .name {
  flex: 1 1 auto;
}

.team-standing-row .team-points {
  margin-left: auto;
  font-weight: 700;
  color: var(--color-accent-ink);
  white-space: nowrap;
}

/* ---------- Settings ---------- */
.settings-card {
  margin-bottom: var(--space-4);
}

.settings-identity {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.settings-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--color-border);
}

.settings-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-4);
  flex-wrap: wrap;
}

/* ---------- Comment reactions (up/down) ---------- */
.comment-reactions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.react-btn {
  border: none;
  background: none;
  color: var(--color-muted);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  font-family: inherit;
  transition: color 0.15s, background 0.15s;
}

.react-btn:hover:not(:disabled) {
  background: var(--color-bg, rgba(0, 0, 0, 0.04));
}

.react-btn:disabled {
  cursor: default;
  opacity: 0.55;
}

.react-btn.active-up {
  color: var(--color-success);
}

.react-btn.active-down {
  color: var(--color-danger);
}

.react-score {
  font-size: 13px;
  font-weight: 800;
  min-width: 1.4em;
  text-align: center;
  color: var(--color-muted);
}

.react-score.pos {
  color: var(--color-success);
}

.react-score.neg {
  color: var(--color-danger);
}

/* ---------- "You vs. the field" comparison ---------- */
.fan-comparison:empty {
  display: none;
}

.fan-comparison {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius);
  background: var(--color-bg, rgba(0, 0, 0, 0.03));
  border: 1px solid var(--color-border);
}

.compare-head {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  margin-bottom: var(--space-3);
}

.compare-stats {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.compare-stat {
  display: flex;
  flex-direction: column;
}

.compare-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.1;
}

.compare-label {
  font-size: 12.5px;
  color: var(--color-muted);
  font-weight: 600;
}

.compare-note {
  margin: var(--space-2) 0 0;
  font-size: 13.5px;
  color: var(--color-text);
}

/* ---------- Prediction accuracy banner ---------- */
.prediction-stat {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--color-accent, var(--color-primary));
  text-decoration: none;
  color: var(--color-text);
}

.prediction-stat:hover {
  text-decoration: none;
  box-shadow: var(--shadow);
}

.prediction-stat-pct {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-primary);
}

.prediction-stat-label {
  font-size: 13.5px;
  color: var(--color-muted);
  font-weight: 600;
}

/* ---------- Biggest movers (home) ---------- */
.mover-card h3 {
  margin-bottom: var(--space-3);
}

.mover-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mover-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
}

.mover-row:last-child {
  border-bottom: none;
}

.mover-name {
  font-weight: 700;
  font-size: 14.5px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.mover-wc {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-muted);
  background: var(--color-bg, rgba(0, 0, 0, 0.04));
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* ---------- Skip link (keyboard users) ---------- */
.skip-link {
  position: absolute;
  left: var(--space-3);
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: var(--color-primary);
  font-weight: 800;
  font-size: 14px;
}

.skip-link:focus {
  top: var(--space-3);
  text-decoration: none;
}

/* ---------- Ranking panel toolbar (view toggle + share) ---------- */
.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin: 0 0 var(--space-2);
}

.panel-toolbar .view-toggle {
  margin: 0;
}

.share-wrap {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-left: auto;
}

.share-status {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-success);
}

.btn-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Week-over-week "New" badge ---------- */
.delta.new {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.18);
  color: var(--color-accent-ink);
}

/* Movement badge sits between the name and the points on a team row. */
.team-standing-row .delta {
  flex-shrink: 0;
}

/* ---------- Vote bar: split meter + build-your-own nudge ---------- */
.vote-bar {
  border-radius: var(--radius-lg);
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-4);
}

.vote-foot {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  padding: 2px 0 4px;
}

.vote-split {
  flex: 1 1 140px;
  max-width: 260px;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--color-danger);
}

.vote-split-agree {
  display: block;
  height: 100%;
  background: var(--color-success);
  /* A hairline of surface colour separates the two sides without relying on
     the red/green contrast alone. */
  box-shadow: 2px 0 0 var(--color-surface);
  transition: width 0.25s ease;
}

.vote-split-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-muted);
  white-space: nowrap;
}

.vote-nudge {
  margin-left: auto;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .vote-split-agree {
    transition: none;
  }
}

/* ---------- Home: this week's No. 1s ---------- */
.leaders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: var(--space-3);
}

.leader-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.05s;
}

.leader-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow);
  text-decoration: none;
  transform: translateY(-1px);
}

.leader-wc {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 36px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.leader-who {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.leader-name {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.leader-school {
  font-size: 13px;
  color: var(--color-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The No. 1s and movers read as one "this week" block, so don't stack two
   full section paddings between them. */
#leaders-section:not([style*="none"]) + #movers-section {
  padding-top: 0;
}

/* Movers are links to their weight class but should read as names, not links. */
a.mover-name {
  color: var(--color-text);
}

a.mover-name:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* ---------- Leaderboard: the visitor's own row ---------- */
.player-row.is-me {
  background: rgba(201, 162, 39, 0.10);
  box-shadow: inset 4px 0 0 var(--color-accent);
}

.you-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 1px;
}

/* ---------- Small screens: rankings page ---------- */
@media (max-width: 640px) {
  .share-wrap {
    margin-left: 0;
  }

  .vote-chips {
    margin-left: 0;
  }

  .vote-nudge {
    margin-left: 0;
  }
}

.vote-nudge {
  color: var(--color-primary);
}
