:root {
  --history-ink: #1d2530;
  --history-muted: #69717b;
  --history-line: #dfe3e7;
  --history-surface: #f5f7f8;
  --history-accent: #e12454;
  --history-gold: #b88216;
  --history-silver: #77828e;
  --history-bronze: #9a5d38;
}

.history-title {
  min-height: 330px;
}

.history-lead {
  max-width: 680px;
  margin: 0 auto;
  font-size: 17px;
}

.history-page {
  padding: 64px 0 90px;
  color: var(--history-ink);
  background: linear-gradient(180deg, #f5f7f8 0, #fff 240px);
}

.history-container {
  max-width: 1120px;
}

.history-tabs {
  display: flex;
  align-items: flex-end;
  gap: 34px;
  margin-bottom: 52px;
  padding-bottom: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--history-line);
  scrollbar-width: none;
}

.history-tabs::-webkit-scrollbar {
  display: none;
}

.history-tab-group {
  display: grid;
  flex: 0 0 auto;
  gap: 3px;
}

.history-tab-group-label {
  padding: 0 14px;
  color: var(--history-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.history-tab-group-links {
  display: flex;
  gap: 4px;
}

.history-tab-group-links a {
  flex: 0 0 auto;
  padding: 9px 14px 13px;
  color: var(--history-muted);
  font-weight: 700;
  border-bottom: 3px solid transparent;
}

.history-tab-group-links a:hover,
.history-tab-group-links a.is-active {
  color: var(--history-accent);
  border-bottom-color: var(--history-accent);
}

.history-section-heading,
.history-profile-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.history-section-heading h2,
.history-profile-header h2 {
  margin: 4px 0 0;
  color: var(--history-ink);
  font-size: 34px;
  line-height: 1.2;
}

.history-kicker {
  color: var(--history-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.history-year-list {
  border-top: 1px solid var(--history-line);
}

.history-year-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 24px;
  min-height: 112px;
  padding: 20px 8px;
  color: var(--history-ink);
  border-bottom: 1px solid var(--history-line);
}

.history-year-row:hover {
  color: var(--history-accent);
  background: rgba(225, 36, 84, 0.035);
}

.history-year-number {
  font-size: 40px;
  font-weight: 800;
}

.history-year-name {
  display: grid;
  gap: 5px;
}

.history-year-name strong {
  font-size: 18px;
}

.history-year-name small,
.history-profile-header p,
.history-result small,
.history-ranking-table td small {
  display: block;
  color: var(--history-muted);
}

.history-back {
  display: inline-block;
  margin-bottom: 26px;
  color: var(--history-accent);
  font-weight: 700;
}

.history-source-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  padding: 11px 15px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  background: var(--history-ink);
  border-left: 4px solid var(--history-accent);
}

.history-source-link:hover,
.history-source-link:focus {
  color: #fff;
  background: var(--history-accent);
}

.history-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 38px;
  background: var(--history-ink);
}

.history-metrics div {
  display: grid;
  gap: 3px;
  padding: 22px 24px;
  color: #fff;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.history-metrics div:last-child {
  border-right: 0;
}

.history-metrics strong {
  font-size: 28px;
}

.history-metrics span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.history-tournament-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  overflow-x: auto;
  border-bottom: 1px solid var(--history-line);
}

.history-tournament-tabs a {
  flex: 0 0 auto;
  padding: 11px 16px;
  color: var(--history-muted);
  font-size: 13px;
  font-weight: 800;
  border-bottom: 3px solid transparent;
}

.history-tournament-tabs a:hover,
.history-tournament-tabs a.is-active {
  color: var(--history-accent);
  border-bottom-color: var(--history-accent);
}

.history-tournament-ranking-heading {
  margin-top: 34px;
}

.history-event-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.history-event {
  padding: 0 22px 6px;
  border: 1px solid var(--history-line);
  border-top: 4px solid var(--history-ink);
  background: #fff;
}

.history-event h3 {
  margin: 0 -22px 4px;
  padding: 18px 22px;
  color: var(--history-ink);
  font-size: 18px;
  border-bottom: 1px solid var(--history-line);
}

.history-result {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  min-height: 66px;
  padding: 9px 0;
  border-bottom: 1px solid #edf0f2;
}

.history-result:last-child {
  border-bottom: 0;
}

.history-place {
  display: inline-grid;
  place-items: center;
  width: 38px;
  min-height: 32px;
  padding: 3px;
  color: var(--history-ink);
  font-weight: 800;
  border: 1px solid var(--history-line);
}

.history-place.is-gold { border-color: var(--history-gold); color: var(--history-gold); }
.history-place.is-silver { border-color: var(--history-silver); color: var(--history-silver); }
.history-place.is-bronze { border-color: var(--history-bronze); color: var(--history-bronze); }

.history-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--history-line);
  background: #fff;
}

.history-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.history-table th,
.history-table td {
  padding: 15px 18px;
  text-align: left;
  border-bottom: 1px solid var(--history-line);
}

.history-table th {
  color: var(--history-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  background: var(--history-surface);
}

.history-table tbody tr:last-child td {
  border-bottom: 0;
}

.history-table tbody tr:hover {
  background: #fafbfc;
}

.history-ranking-table th:not(:nth-child(2)),
.history-ranking-table td:not(:nth-child(2)) {
  width: 76px;
  text-align: center;
}

.history-ranking-table td:nth-child(2) {
  min-width: 230px;
}

.history-ranking-table .history-country-column {
  width: 104px !important;
  min-width: 104px;
  text-align: left !important;
  white-space: nowrap;
}

.history-ranking-table .history-club-column {
  width: auto !important;
  min-width: 190px;
  text-align: left !important;
}

.history-country-flag {
  display: inline-block;
  margin-right: 7px;
  font-size: 19px;
  line-height: 1;
  vertical-align: -2px;
}

.history-ranking-table small .history-country-flag {
  font-size: 15px;
  vertical-align: -1px;
}

.history-order {
  display: flex;
  border: 1px solid var(--history-line);
}

.history-order a {
  padding: 9px 14px;
  color: var(--history-muted);
  font-size: 13px;
  font-weight: 700;
}

.history-order a.is-active {
  color: #fff;
  background: var(--history-ink);
}

.history-profile-header {
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--history-line);
}

.history-profile-score {
  display: grid;
  min-width: 112px;
  text-align: right;
}

.history-profile-score strong {
  color: var(--history-accent);
  font-size: 38px;
  line-height: 1;
}

.history-profile-score span {
  color: var(--history-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.history-medal-strip {
  display: flex;
  gap: 24px;
  margin-bottom: 34px;
}

.history-medal-count {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--history-muted);
}

.history-medal-count strong { font-size: 24px; }
.history-medal-count.is-gold strong { color: var(--history-gold); }
.history-medal-count.is-silver strong { color: var(--history-silver); }
.history-medal-count.is-bronze strong { color: var(--history-bronze); }

.history-panel h3 {
  margin-bottom: 18px;
  color: var(--history-ink);
  font-size: 21px;
}

.history-empty {
  padding: 34px;
  color: var(--history-muted);
  text-align: center;
  border: 1px dashed var(--history-line);
  background: #fff;
}

@media (max-width: 767px) {
  .history-title { min-height: 280px; }
  .history-page { padding: 38px 0 65px; }
  .history-tabs { gap: 22px; margin: 0 -15px 36px; padding: 0 15px; }
  .history-tab-group-label { padding: 0 10px; }
  .history-tab-group-links a { padding: 8px 10px 11px; font-size: 13px; }
  .history-section-heading,
  .history-profile-header { align-items: flex-start; }
  .history-section-heading { flex-wrap: wrap; }
  .history-section-heading h2,
  .history-profile-header h2 { font-size: 27px; }
  .history-year-row { grid-template-columns: 76px minmax(0, 1fr) 20px; gap: 12px; min-height: 96px; }
  .history-year-number { font-size: 28px; }
  .history-metrics { grid-template-columns: repeat(2, 1fr); }
  .history-metrics div:nth-child(2) { border-right: 0; }
  .history-metrics div { padding: 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
  .history-event-grid { grid-template-columns: 1fr; }
  .history-ranking-heading { display: grid; }
  .history-order { width: max-content; }
  .history-table-wrap { margin-right: -15px; }
  .history-profile-score { min-width: 70px; }
}