:root {
  --bg: #ffffff;
  --text: #1f2933;
  --muted: #66788a;
  --line: #d9e2ec;
  --soft: #f7f9fb;
  --link: #2563a6;
  --max-width: 1080px;
  --content-width: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Sans 3", sans-serif;
  line-height: 1.7;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

.container {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 42px 0 72px;
}

.hero {
  padding: 8px 0 20px;
  text-align: center;
}

.hero-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin: 0 auto 18px;
}

.hero-logo {
  display: block;
  width: auto;
  height: 48px;
  object-fit: contain;
}

.stepfun-logo {
  height: 42px;
}

.thu-logo {
  height: 52px;
}

h1,
h2 {
  margin: 0;
  font-family: "Source Serif 4", serif;
  font-weight: 600;
  color: #111827;
}

.project-title {
  max-width: 100%;
  margin: 0 auto;
  font-size: clamp(1.18rem, 1.55vw, 1.55rem);
  line-height: 1.16;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.project-title span {
  display: block;
  white-space: nowrap;
}

h2 {
  margin-bottom: 14px;
  text-align: center;
  font-size: 2rem;
}

.authors,
.affiliations,
.content,
.section-intro,
figcaption,
th,
td,
pre,
.resource-list {
  font-size: 1.06rem;
}

.authors {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  max-width: 920px;
  margin: 16px auto 8px;
  color: var(--text);
}

.authors span {
  white-space: nowrap;
  font-weight: 600;
}

.affiliations {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 0;
  color: var(--muted);
}

.author-notes {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.authors sup,
.affiliations sup,
.author-notes sup {
  font-size: 0.72em;
  vertical-align: super;
}

.links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.link-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--text);
  font-weight: 600;
}

.link-pill:hover {
  text-decoration: none;
  border-color: #b8c6d3;
}

.page-back {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.98rem;
}

.leaderboard-hero {
  padding-bottom: 10px;
}

.leaderboard-title {
  max-width: none;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.1;
}

.leaderboard-subtitle {
  width: min(100%, var(--content-width));
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.leaderboard-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.leaderboard-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fb 100%);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.stat-label,
.stat-value,
.stat-caption {
  margin: 0;
}

.stat-label {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.stat-value {
  margin-top: 6px;
  font-family: "Source Serif 4", serif;
  font-size: 1.9rem;
  line-height: 1.05;
  color: #111827;
}

.stat-caption {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.98rem;
}

.leaderboard-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.leader-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.leader-card-first {
  border-color: #c9d9ea;
  background: linear-gradient(180deg, #fcfdff 0%, #f2f7fc 100%);
}

.leader-card h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.leader-rank,
.leader-score,
.leader-meta {
  margin: 0;
}

.leader-rank {
  color: var(--muted);
  font-weight: 600;
}

.leader-score {
  font-weight: 600;
}

.leader-meta {
  color: var(--muted);
}

.leader-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 14px 0 0;
  padding: 14px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
  color: #334155;
  font-size: 0.95rem;
}

.leader-metrics li {
  margin: 0;
}

.dimension-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.dimension-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.dimension-card h3,
.dimension-name,
.dimension-score {
  margin: 0;
}

.dimension-name {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.dimension-card h3 {
  margin-top: 6px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.dimension-score {
  margin-top: 8px;
  font-family: "Source Serif 4", serif;
  font-size: 1.55rem;
  line-height: 1.1;
  color: #111827;
}

.overall-table tbody tr:nth-child(-n + 3):not(.group-row) {
  background: #f8fbff;
}

.leaderboard-table tbody tr:hover:not(.group-row) {
  background: #fbfdff;
}

.group-row td {
  background: var(--soft);
  font-weight: 600;
}

.section {
  padding: 26px 0 10px;
  border-top: 1px solid var(--line);
}

.content {
  width: min(100%, var(--content-width));
  margin: 0 auto;
}

.content-left {
  width: 100%;
  margin: 0;
}

.content-center-vertical {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.content p {
  margin: 0 0 14px;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 28px;
  align-items: start;
}

.two-col-centered {
  align-items: center;
}

.figure {
  margin: 18px auto 0;
}

.figure-centered {
  margin-top: 0;
}

.figure-wide {
  max-width: 980px;
}

.figure img {
  border: 1px solid var(--line);
  background: #ffffff;
}

figcaption {
  margin-top: 10px;
  color: var(--muted);
  text-align: center;
}

.table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--soft);
  font-weight: 600;
}

.section-intro,
.note {
  color: var(--muted);
}

.resource-list {
  margin: 0;
  padding-left: 20px;
}

pre {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--soft);
  overflow-x: auto;
  line-height: 1.5;
}

@media (max-width: 800px) {
  .container {
    width: min(calc(100% - 24px), var(--max-width));
    padding-top: 28px;
  }

  .hero-logos {
    gap: 18px;
    margin-bottom: 14px;
  }

  .hero-logo {
    height: 40px;
  }

  .stepfun-logo {
    height: 34px;
  }

  .thu-logo {
    height: 42px;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .leaderboard-cards {
    grid-template-columns: 1fr;
  }

  .leaderboard-stats,
  .dimension-grid {
    grid-template-columns: 1fr 1fr;
  }

  h2 {
    font-size: 1.75rem;
  }

  .project-title span {
    white-space: normal;
  }
}

@media (max-width: 560px) {
  .leaderboard-stats,
  .dimension-grid,
  .leader-metrics {
    grid-template-columns: 1fr;
  }

  .stat-value {
    font-size: 1.7rem;
  }
}
