/* City Index 2.0 V1-B – shared compact ranked-city presentation.
   Context-independent: used by active Homepage/state landing and /staedte.
   This component intentionally owns no list length or page-specific layout. */

.nsd-ranked-cities {
  width: 100%;
  margin-top: var(--nsd-space-2, .5rem);
  color: var(--nsd-color-text, #eef8f3);
}

.nsd-ranked-cities__head,
.nsd-ranked-cities__row {
  display: grid;
  grid-template-columns: 1.55rem minmax(0, 1fr) 5rem 1rem;
  column-gap: .55rem;
  align-items: center;
}

.nsd-ranked-cities__head {
  padding: .48rem .58rem;
  border-top: 1px solid var(--nsd-border-subtle, rgba(255,255,255,.10));
  border-bottom: 1px solid var(--nsd-border-subtle, rgba(255,255,255,.10));
  color: var(--nsd-color-text-muted, rgba(225,245,238,.58));
  font-size: var(--nsd-type-label-size, .72rem);
  line-height: 1.2;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.nsd-ranked-cities__h--rank,
.nsd-ranked-cities__rank {
  text-align: right;
}

.nsd-ranked-cities__h--score,
.nsd-ranked-cities__score {
  justify-self: end;
  text-align: right;
}

.nsd-ranked-cities__h--more,
.nsd-ranked-cities__more {
  justify-self: end;
  text-align: right;
}

.nsd-ranked-cities__row {
  position: relative;
  min-height: 2.8rem;
  padding: .58rem;
  border: 0;
  background: transparent;
  color: var(--nsd-color-text-body, rgba(225,245,238,.84));
}

.nsd-ranked-cities__row:not(:last-child) {
  border-bottom: 1px solid var(--nsd-border-subtle, rgba(255,255,255,.08));
}

.nsd-ranked-cities__row:hover,
.nsd-ranked-cities__row:focus-within {
  background: rgba(255,255,255,.025);
}

.nsd-ranked-cities__rowlink {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--nsd-radius-sm, .55rem);
  text-decoration: none;
}

.nsd-ranked-cities__rowlink:focus-visible {
  outline: var(--nsd-focus-width, 2px) solid var(--nsd-focus-color, rgba(57,255,20,.62));
  outline-offset: calc(var(--nsd-focus-offset, 2px) * -1);
}

.nsd-ranked-cities__row > *:not(.nsd-ranked-cities__rowlink) {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.nsd-ranked-cities__rank {
  padding-right: .15rem;
  color: var(--nsd-color-text-muted, rgba(225,245,238,.70));
  font-variant-numeric: tabular-nums;
}

.nsd-ranked-cities__city {
  min-width: 0;
}

.nsd-ranked-cities__name {
  display: block;
  color: var(--nsd-color-text, #eef8f3);
  font-weight: 650;
  hyphens: auto;
  overflow-wrap: anywhere;
}

.nsd-ranked-cities__meta {
  display: block;
  margin-top: .12rem;
  color: var(--nsd-color-text-muted, rgba(158,176,184,.82));
  font-size: var(--nsd-type-meta-size, .82rem);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.nsd-ranked-cities__score {
  font-variant-numeric: tabular-nums;
}

.nsd-ranked-cities__score-badge {
  display: inline-flex;
  min-width: 2.45rem;
  align-items: center;
  justify-content: center;
  padding: .10rem .46rem;
  border: 1px solid var(--nsd-border-accent-soft, rgba(57,255,20,.20));
  border-radius: .55rem;
  background: var(--nsd-color-accent-soft, rgba(57,255,20,.08));
  color: var(--nsd-color-text, rgba(216,255,225,.92));
  font-size: .80rem;
  font-weight: 760;
  line-height: 1.1;
}

.nsd-ranked-cities__score-empty {
  color: var(--nsd-color-text-faint, rgba(225,245,238,.45));
}

.nsd-ranked-cities__more {
  color: var(--nsd-color-accent, #39ff14);
  font-size: 1.1rem;
  line-height: 1;
  opacity: .48;
  transition: opacity 160ms ease, transform 160ms ease;
}

.nsd-ranked-cities__row:hover .nsd-ranked-cities__more,
.nsd-ranked-cities__row:focus-within .nsd-ranked-cities__more {
  opacity: .82;
  transform: translateX(.08rem);
}

@media (max-width: 900px) {
  .nsd-ranked-cities__head,
  .nsd-ranked-cities__row {
    grid-template-columns: 1.35rem minmax(0, 1fr) 4.5rem .9rem;
    column-gap: .42rem;
  }
}

@media (max-width: 620px) {
  .nsd-ranked-cities__head,
  .nsd-ranked-cities__row {
    grid-template-columns: 1.15rem minmax(0, 1fr) 3.7rem .75rem;
    column-gap: .30rem;
    padding-left: .42rem;
    padding-right: .42rem;
  }

  .nsd-ranked-cities__head {
    font-size: .66rem;
  }

  .nsd-ranked-cities__meta {
    font-size: .76rem;
  }

  .nsd-ranked-cities__score-badge {
    min-width: 2.15rem;
    padding-inline: .34rem;
    font-size: .76rem;
  }
}
