/* Premium league table with mobile stacked-card layout */

.methodology-section .table-wrap {
  max-width: 1100px;
  margin: 0 auto;
  max-height: 720px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.city-table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  min-width: 880px;
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.city-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--paper);
  border-bottom: 1px solid var(--line-strong);
  padding: 14px 12px;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.city-table thead th[aria-sort="ascending"],
.city-table thead th[aria-sort="descending"] { color: var(--ink); }

.city-table thead th button {
  all: unset;
  cursor: pointer;
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
}

.city-table tbody td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: middle;
}

.city-table tbody tr {
  transition: background var(--dur-fast);
}

.city-table tbody tr:hover { background: rgba(46, 123, 232, 0.04); }

.city-table .rank {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
}

.city-table .rank.rank-top { color: var(--brand-navy); }
.city-table .rank.rank-mid { color: var(--ink-soft); }
.city-table .rank.rank-bottom { color: var(--scale-5); }

.city-table .table-city-button {
  all: unset;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
}

.city-table .table-city-button:hover { color: var(--brand-sky); }

.city-table .score-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 130px;
}

.city-table .score-cell .score-bar-bg {
  background: var(--brand-sky-soft);
  height: 6px;
  border-radius: 3px;
  flex: 0 0 60px;
  position: relative;
  overflow: hidden;
}

.city-table .score-cell .score-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--brand-sky);
  border-radius: 3px;
}

.city-table .score-cell .value {
  font-family: var(--font-mono);
  font-weight: 600;
}

.city-table .cta-stash {
  color: var(--brand-sky);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

.city-table .cta-stash:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .methodology-section .table-wrap {
    overflow: visible;
    max-height: none;
    border: none;
    border-radius: 0;
    background: transparent;
  }
  .city-table { min-width: 0; }
  .city-table thead { display: none; }
  .city-table, .city-table tbody, .city-table tr, .city-table td { display: block; }
  .city-table tbody tr {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 12px;
    background: var(--surface);
  }
  .city-table tbody tr:hover { background: var(--surface); }
  .city-table tbody td {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    padding: 4px 0;
    border: none;
    align-items: center;
  }
  .city-table tbody td::before {
    content: attr(data-label);
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .city-table .score-cell { min-width: 0; }
}
