:root {
  --ink: #242424;
  --muted: #555f6f;
  --light: #f6f7f9;
  --line: #d9dee7;
  --accent: #087f83;
  --danger: #d84233;
  --pill: #2f2f31;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.page {
  width: min(1000px, calc(100% - 34px));
  margin: 0 auto;
}

.paper-header {
  padding: 44px 0 22px;
  text-align: center;
}

.paper-header h1 {
  max-width: 860px;
  margin: 0 auto 20px;
  font-size: clamp(2.05rem, 4.8vw, 3.05rem);
  font-weight: 500;
  line-height: 1.12;
}

.authors,
.affiliation {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.08rem;
}

.authors {
  color: #0877cf;
}

.affiliation {
  margin-top: 5px;
  color: var(--muted);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 20px auto 0;
}

.button-row a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 15px;
  background: var(--pill);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.button-row a:hover {
  background: #000;
}

.paper-header .button-row:not(.light) {
  gap: 10px;
}

.paper-header .button-row:not(.light) a {
  border: 1px solid rgba(36, 36, 36, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #f7f8fa 100%);
  box-shadow: 0 8px 18px rgba(36, 36, 36, 0.08);
  color: var(--ink);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.paper-header .button-row:not(.light) a:hover,
.paper-header .button-row:not(.light) a:focus-visible {
  box-shadow: 0 12px 24px rgba(36, 36, 36, 0.12);
  transform: translateY(-1px);
}

.paper-header .button-row:not(.light) a:nth-child(1) {
  border-color: rgba(179, 27, 27, 0.22);
  background: linear-gradient(180deg, #fffafa 0%, #fff1f1 100%);
}

.paper-header .button-row:not(.light) a:nth-child(1) span {
  color: #b31b1b;
}

.paper-header .button-row:not(.light) a:nth-child(2),
.paper-header .button-row:not(.light) a:nth-child(3) {
  border-color: rgba(36, 41, 47, 0.2);
  background: linear-gradient(180deg, #ffffff 0%, #f2f4f7 100%);
}

.paper-header .button-row:not(.light) a:nth-child(2) span,
.paper-header .button-row:not(.light) a:nth-child(3) span {
  color: #24292f;
}

.paper-header .button-row:not(.light) a:nth-child(4) {
  border-color: rgba(255, 166, 0, 0.4);
  background: linear-gradient(180deg, #fffdf7 0%, #fff5d7 100%);
}

.paper-header .button-row:not(.light) a:nth-child(4) span {
  color: #bf7b00;
}

.paper-header .button-row:not(.light) a:nth-child(5) {
  border-color: rgba(8, 127, 131, 0.28);
  background: linear-gradient(180deg, #faffff 0%, #edfafa 100%);
}

.paper-header .button-row:not(.light) a:nth-child(5) span {
  color: var(--accent);
}

.paper-header .button-row:not(.light) a:nth-child(6) {
  border-color: rgba(66, 133, 244, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #f1f6ff 100%);
}

.paper-header .button-row:not(.light) a:nth-child(6) span {
  color: #1a73e8;
}

.button-row.light {
  justify-content: flex-start;
  margin-top: 16px;
}

.button-row.light a {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.button-row.light a:hover {
  border-color: var(--ink);
}

.button-row a span {
  margin-right: 5px;
}

.resource-buttons {
  gap: 10px;
}

.button-row.light .brand-button {
  gap: 8px;
  border-radius: 999px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button-row.light .brand-button:hover,
.button-row.light .brand-button:focus-visible {
  box-shadow: 0 10px 20px rgba(36, 36, 36, 0.08);
  transform: translateY(-1px);
}

.button-row.light .brand-button.github {
  border-color: rgba(36, 41, 47, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f6f8fa 100%);
}

.button-row.light .brand-button.github:hover,
.button-row.light .brand-button.github:focus-visible {
  border-color: rgba(36, 41, 47, 0.42);
}

.button-row.light .brand-button.hf {
  border-color: rgba(255, 166, 0, 0.34);
  background: linear-gradient(180deg, #fffdf7 0%, #fff6dc 100%);
}

.button-row.light .brand-button.hf:hover,
.button-row.light .brand-button.hf:focus-visible {
  border-color: rgba(255, 166, 0, 0.62);
}

.button-row.light .brand-button.google {
  border-color: rgba(66, 133, 244, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
}

.button-row.light .brand-button.google:hover,
.button-row.light .brand-button.google:focus-visible {
  border-color: rgba(66, 133, 244, 0.58);
}

.brand-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  margin-right: 0;
}

.brand-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

.github-icon {
  color: #24292f;
}

.hf-icon {
  font-size: 1rem;
  line-height: 1;
}

.paper-figure {
  max-width: 980px;
  margin: 54px auto 26px;
}

.paper-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
}

.lead {
  max-width: 820px;
  margin: 0 auto;
  color: #333;
  font-size: 1.08rem;
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  margin: 36px auto 20px;
  border: 1px solid rgba(8, 127, 131, 0.18);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(36, 36, 36, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.facts div {
  position: relative;
  padding: 18px 14px 17px;
  border-left: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  text-align: center;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.facts div:first-child {
  border-left: 0;
}

.facts div::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  content: "";
  opacity: 0.38;
  transition: opacity 160ms ease;
}

.facts div:hover,
.facts div:focus-within {
  z-index: 1;
  background: #fbfefe;
  box-shadow: 0 14px 28px rgba(8, 127, 131, 0.12);
  transform: translateY(-3px) scale(1.015);
}

.facts div:hover::before,
.facts div:focus-within::before {
  opacity: 1;
}

.facts strong {
  display: block;
  color: var(--accent);
  font-size: 1.6rem;
  line-height: 1.05;
  transition: transform 160ms ease;
}

.facts div:hover strong,
.facts div:focus-within strong {
  transform: scale(1.06);
}

.facts span {
  color: var(--muted);
  font-size: 0.9rem;
}

.section {
  padding: 42px 0 0;
}

.section h2 {
  margin: 0 0 12px;
  font-size: 1.55rem;
  font-weight: 650;
  text-align: center;
}

.section > p {
  max-width: 840px;
  margin: 0 auto 20px;
  color: var(--muted);
  text-align: center;
}

.benchmark-figures {
  display: grid;
  gap: 28px;
  margin: 28px 0 30px;
}

.benchmark-figures figure {
  max-width: 620px;
  margin: 0 auto;
}

.benchmark-figures .figure-note {
  max-width: 720px;
  margin: 0 auto 12px;
  color: var(--muted);
  font-size: 0.98rem;
  text-align: center;
}

.benchmark-figures img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.benchmark-figures figcaption {
  max-width: 900px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.benchmark-figures code {
  color: var(--ink);
}

.task-section-title {
  margin: 40px 0 14px;
  font-size: 1.32rem;
  font-weight: 650;
  text-align: center;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: min(1180px, calc(100vw - 72px));
  margin: 0 0 0 50%;
  transform: translateX(-50%);
}

.result-grid {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.result-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.task-grid article,
.result-card {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 17px;
  background: #fff;
}

.task-grid h4,
.result-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.task-grid p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.94rem;
}

.task-example {
  display: grid;
  align-content: center;
  min-height: 180px;
  margin: 14px 0;
  border: 1px solid #edf0f4;
  border-radius: 5px;
  padding: 12px;
  background: #fbfcfd;
}

.task-example img {
  display: block;
  width: 100%;
  max-height: 132px;
  object-fit: contain;
}

.task-example figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
}

.example-copy {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid rgba(8, 127, 131, 0.32);
  background: #ffffff;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.example-copy strong {
  color: var(--ink);
}

.example-copy code {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 0.78rem;
  white-space: normal;
}

.task-grid .task-meta {
  color: var(--ink);
  font-size: 0.9rem;
}

.task-details {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 6px 12px;
  margin: 14px 0;
  font-size: 0.9rem;
}

.task-details dt {
  color: var(--ink);
  font-weight: 700;
}

.task-details dd {
  margin: 0;
  color: var(--muted);
}

.task-details code {
  color: var(--ink);
  font-size: 0.86rem;
}

.task-grid a,
.result-card a {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.sync-status {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.result-card {
  display: flex;
  min-height: 216px;
  flex-direction: column;
  justify-content: space-between;
  border-color: rgba(12, 32, 55, 0.12);
  border-radius: 7px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  box-shadow: 0 12px 28px rgba(12, 32, 55, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.result-card:hover,
.result-card:focus-within {
  border-color: rgba(8, 127, 131, 0.22);
  box-shadow: 0 16px 34px rgba(12, 32, 55, 0.12);
  transform: translateY(-2px);
}

.result-label {
  display: inline-block;
  margin: 0;
  border-radius: 999px;
  padding: 5px 10px;
  background: linear-gradient(180deg, rgba(8, 127, 131, 0.1) 0%, rgba(8, 127, 131, 0.04) 100%);
  color: #065c60;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.score-label {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 0.74rem;
  font-style: italic;
  text-align: right;
}

.leaderboard-mini {
  width: 100%;
  margin: 16px 0 14px;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 0.88rem;
}

.leaderboard-mini th {
  border-bottom: 1px solid #e6ebf1;
  padding: 0 0 7px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.leaderboard-mini td {
  border-bottom: 1px solid #edf0f4;
  padding: 8px 0;
  vertical-align: middle;
}

.leaderboard-mini th:first-child,
.leaderboard-mini td:first-child {
  width: 38px;
}

.leaderboard-mini th:last-child,
.leaderboard-mini td:last-child {
  width: 70px;
  text-align: right;
}

.leaderboard-mini tbody tr:last-child td {
  border-bottom: 0;
}

.team-name {
  display: block;
  max-width: 118px;
  overflow-wrap: anywhere;
  font-weight: 700;
  line-height: 1.28;
}

.rank-medal {
  position: relative;
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(20, 24, 32, 0.18);
  border-radius: 50%;
  background: linear-gradient(145deg, #f7d77a 0%, #d79a1f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68), 0 3px 8px rgba(20, 24, 32, 0.12);
  color: #59400c;
  font-size: 0.78rem;
  font-weight: 900;
}

.rank-medal::before {
  position: absolute;
  top: -5px;
  left: 6px;
  width: 12px;
  height: 6px;
  border-radius: 1px 1px 0 0;
  background: #333333;
  content: "";
}

.rank-2 {
  background: linear-gradient(145deg, #d9d6cf 0%, #9b978c 100%);
  color: #4f4b42;
}

.rank-3 {
  background: linear-gradient(145deg, #c6914f 0%, #8a5b24 100%);
  color: #fff6e8;
}

.rank-4,
.rank-5 {
  background: linear-gradient(145deg, #9b9588 0%, #5e594f 100%);
  color: #fff7eb;
}

.empty-leaderboard {
  margin: 18px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.dataset-section {
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.dataset-section h2,
.dataset-section p {
  text-align: left;
  margin-left: 0;
}

.resource-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.46fr);
  gap: 28px;
  align-items: start;
}

.resource-main p {
  max-width: none;
}

.community-callout {
  margin-top: 0;
  border: 1px solid rgba(8, 127, 131, 0.18);
  border-radius: 8px;
  padding: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  box-shadow: 0 14px 30px rgba(36, 36, 36, 0.06);
}

.community-callout h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.community-callout p {
  max-width: none;
  margin-bottom: 0;
  color: var(--muted);
}

pre {
  overflow-x: auto;
  max-width: 760px;
  margin: 18px auto 0;
  border-radius: 4px;
  padding: 18px;
  background: #111827;
  color: #f5f7fb;
  font-size: 0.86rem;
}

.footer {
  margin-top: 52px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.footer p {
  margin: 6px 0;
}

.footer a {
  font-weight: 700;
}

@media (max-width: 850px) {
  .task-grid,
  .result-grid,
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .page {
    width: min(100% - 24px, 1000px);
  }

  .paper-header {
    padding-top: 28px;
  }

  .paper-header h1 {
    font-size: 1.82rem;
  }

  .paper-figure {
    margin-top: 32px;
  }

  .task-grid,
  .result-grid,
  .facts {
    grid-template-columns: 1fr;
  }

  .task-grid {
    width: 100%;
    margin-left: 0;
    transform: none;
  }

  .task-details {
    grid-template-columns: 1fr;
  }

  .section h2,
  .section > p {
    text-align: left;
  }

  .resource-layout {
    grid-template-columns: 1fr;
  }

  .community-callout {
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .facts div,
  .facts div::before,
  .facts strong,
  .paper-header .button-row:not(.light) a,
  .result-card,
  .button-row.light .brand-button {
    transition: none;
  }

  .facts div:hover,
  .facts div:focus-within,
  .facts div:hover strong,
  .facts div:focus-within strong,
  .paper-header .button-row:not(.light) a:hover,
  .paper-header .button-row:not(.light) a:focus-visible,
  .result-card:hover,
  .result-card:focus-within,
  .button-row.light .brand-button:hover,
  .button-row.light .brand-button:focus-visible {
    transform: none;
  }
}
