.player-ranking-history {
  --player-history-accent: #285a72;
  --player-history-accent-dark: #204b61;
  --player-history-accent-soft: #eaf1f5;
  --player-history-border: #dce4e9;
  --player-history-heading: #26343d;
  --player-history-muted: #65737c;
  background: #f5f8fa;
  color: var(--player-history-heading);
  margin-top: 91px;
  min-height: 70vh;
  padding: 1.5rem .75rem 3rem;
}

.player-ranking-history__container { margin: 0 auto; max-width: 1000px; }

.player-ranking-history__hero,
.player-ranking-history__panel {
  background: #fff;
  border: 1px solid var(--player-history-border);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(35, 57, 69, .06);
}

.player-ranking-history__hero {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
  padding: 1.2rem;
}

.player-ranking-history__back { margin-bottom: 1rem; }
.player-ranking-history__back form { margin: 0; }

.player-ranking-history__back-link {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--player-history-accent);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  gap: .45rem;
  padding: 0;
  text-decoration: none;
}

.player-ranking-history__back-link:hover { color: var(--player-history-accent-dark); }

.player-ranking-history__eyebrow,
.player-ranking-history__event-label {
  color: var(--player-history-accent);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  margin: 0 0 .25rem;
  text-transform: uppercase;
}

.player-ranking-history__title {
  color: var(--player-history-heading);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}

.player-ranking-history__player {
  align-items: center;
  display: flex;
  gap: 1rem;
}

.player-ranking-history__avatar {
  background: var(--player-history-accent-soft);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--player-history-border);
  flex: 0 0 87px;
  height: 87px;
  object-fit: cover;
  width: 87px;
}

.player-ranking-history__subtitle { color: var(--player-history-muted); margin: .65rem 0 0; }

.player-ranking-history__hero-icon {
  align-items: center;
  background: var(--player-history-accent-soft);
  border-radius: 14px;
  color: var(--player-history-accent);
  display: none;
  flex: 0 0 62px;
  font-size: 1.55rem;
  height: 62px;
  justify-content: center;
  margin-left: 1.5rem;
  width: 62px;
}

.player-ranking-history__panel { min-width: 0; overflow: hidden; }

.player-ranking-history__section-header {
  align-items: center;
  display: flex;
  gap: .8rem;
  padding: 1.2rem;
}

.player-ranking-history__section-header h2 {
  color: var(--player-history-heading);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.player-ranking-history__section-icon {
  align-items: center;
  background: var(--player-history-accent-soft);
  border-radius: 9px;
  color: var(--player-history-accent);
  display: inline-flex;
  flex: 0 0 44px;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.player-ranking-history__timeline {
  border-top: 1px solid var(--player-history-border);
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
}

.player-ranking-history__event {
  border: 1px solid var(--player-history-border);
  border-radius: 11px;
  overflow: hidden;
}

.player-ranking-history__event-header {
  align-items: flex-start;
  background: #EAF1F5;
  border-bottom: 1px solid var(--player-history-border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.15rem;
}

.player-ranking-history__event-header h3 {
  color: var(--player-history-heading);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.player-ranking-history__year {
  align-items: center;
  background: #eaf1f5;
  border: 1px solid #285a72;
  border-radius: 999px;
  color: #166534;
  display: inline-flex;
  font-size: .75rem;
  font-weight: 700;
  gap: .35rem;
  padding: .4rem .65rem;
}

.player-ranking-history__metrics {
  display: grid;
  grid-template-columns: 1fr;
  margin: 0;
}

.player-ranking-history__metric {
  border-bottom: 1px solid #e7edef;
  min-width: 0;
  padding: 1rem;
}
.player-ranking-history__metric--featured { background: #fbfcfd; }
.player-ranking-history__metric dt { color: var(--player-history-muted); font-size: .68rem; font-weight: 700; letter-spacing: .045em; margin-bottom: .4rem; text-transform: uppercase; }
.player-ranking-history__metric dd { color: var(--player-history-heading); font-family: "Montserrat", Arial, sans-serif; font-size: 1.15rem; font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.player-ranking-history__metric--featured dd { color: var(--player-history-accent); }

.player-ranking-history__movement {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-family: "PT Sans", Arial, sans-serif;
  font-size: .68rem;
  gap: .2rem;
  margin-left: .3rem;
  padding: .18rem .38rem;
  vertical-align: middle;
}

.player-ranking-history__movement--up { background: #e6f5ed; color: #267449; }
.player-ranking-history__movement--down { background: #fceceb; color: #a23c35; }
.player-ranking-history__empty-value { color: #8b969d; }
.player-ranking-history__not-played { background: #eef2f4; border-radius: 6px; color: var(--player-history-muted); font-size: .75rem; padding: .2rem .4rem; }

.player-ranking-history__empty { border-top: 1px solid var(--player-history-border); color: var(--player-history-muted); padding: 3rem 1rem; text-align: center; }
.player-ranking-history__empty > span { align-items: center; background: var(--player-history-accent-soft); border-radius: 12px; color: var(--player-history-accent); display: inline-flex; font-size: 1.25rem; height: 52px; justify-content: center; width: 52px; }
.player-ranking-history__empty h3 { color: var(--player-history-heading); font-family: "Montserrat", Arial, sans-serif; font-size: 1rem; margin: .8rem 0 .3rem; }
.player-ranking-history__empty p { margin: 0; }
.player-ranking-history__back-link:focus-visible { outline: 3px solid rgba(40, 90, 114, .28); outline-offset: 3px; }

@media (min-width: 601px) {
  .player-ranking-history { padding: 3rem 1rem 4rem; }
  .player-ranking-history__hero,
  .player-ranking-history__panel { border-radius: 13px; }
  .player-ranking-history__hero {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    padding: 1.75rem 2rem;
  }
  .player-ranking-history__avatar { flex-basis: 108px; height: 108px; width: 108px; }
  .player-ranking-history__hero-icon { display: inline-flex; }
  .player-ranking-history__section-header,
  .player-ranking-history__timeline { padding: 1.5rem; }
  .player-ranking-history__event-header {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
  }
  .player-ranking-history__metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .player-ranking-history__metric:nth-child(even) { border-left: 1px solid #e7edef; }
  .player-ranking-history__metric:last-child { border-bottom: 0; grid-column: 1 / -1; }
}

@media (min-width: 821px) {
  .player-ranking-history__metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .player-ranking-history__metric { border-bottom: 0; border-left: 1px solid #e7edef; }
  .player-ranking-history__metric:first-child { border-left: 0; }
  .player-ranking-history__metric:last-child { grid-column: auto; }
}

@media (max-width: 600px) {
  .player-ranking-history__metric:last-child { grid-column: auto; }
}
