:root {
  --blue: #1772d0;
  --text: #222;
  --muted: #666;
  --line: #d8d8d8;
  --soft: #f5f5f5;
  --page-width: 1040px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a:hover,
a:focus {
  color: #f09228;
}

img {
  display: block;
  max-width: 100%;
}

.topbar {
  width: min(var(--page-width), calc(100% - 40px));
  margin: 24px auto 0;
  font-size: 0.9rem;
}

main {
  width: min(var(--page-width), calc(100% - 40px));
  margin: 0 auto;
}

.paper-header {
  max-width: 940px;
  margin: 0 auto;
  padding: 50px 0 34px;
  text-align: center;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: clamp(1.25rem, 2.8vw, 1.8rem);
}

.authors {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.authors strong {
  color: var(--blue);
}

.affiliation {
  margin: 0 0 22px;
  color: var(--muted);
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.paper-links a {
  min-width: 76px;
  padding: 7px 13px;
  color: #fff;
  background: #333;
  border-radius: 5px;
  font-size: 0.9rem;
}

.paper-links a:hover,
.paper-links a:focus {
  background: var(--blue);
}

section {
  max-width: 930px;
  margin: 0 auto;
  padding: 42px 0;
}

.teaser {
  max-width: 1040px;
  padding-top: 12px;
  text-align: center;
}

figure {
  margin: 0;
}

.teaser img,
.figure-wide img,
.figure-grid img {
  width: 100%;
}

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

.tagline {
  max-width: 780px;
  margin: 30px auto 0;
  font-size: 1.2rem;
}

h2 {
  margin: 0 0 22px;
  font-size: 2rem;
  line-height: 1.2;
  text-align: center;
}

h3 {
  margin: 34px 0 5px;
  font-size: 1.2rem;
}

section > p {
  margin-top: 0;
}

.figure-wide {
  margin: 10px 0 30px;
}

.method-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 42px;
  margin: 28px 0 0;
  padding-left: 24px;
}

.method-list li {
  padding-left: 5px;
}

.section-intro,
.table-caption {
  color: var(--muted);
  text-align: center;
}

.key-results {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 30px 0 42px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.key-results p {
  margin: 0;
  padding: 20px 12px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.key-results p:last-child {
  border-right: 0;
}

.key-results strong,
.key-results span {
  display: block;
}

.key-results strong {
  color: var(--blue);
  font-size: 1.6rem;
}

.key-results span {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.table-caption {
  margin: 0 0 12px;
  font-size: 0.85rem;
}

.table-scroll {
  overflow-x: auto;
  border-top: 2px solid #555;
  border-bottom: 2px solid #555;
}

table {
  width: 100%;
  min-width: 570px;
  border-spacing: 0;
  border-collapse: collapse;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.benchmark-table {
  min-width: 980px;
}

th,
td {
  padding: 7px 8px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid #e5e5e5;
}

th:first-child {
  text-align: left;
}

thead th {
  background: #fafafa;
  font-weight: 700;
  text-align: center;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

.ours {
  background: #eef6fd;
}

.ours th {
  color: #0b579f;
}

.small-tables {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
  margin-top: 30px;
  align-items: start;
}

.small-tables > div {
  width: 100%;
  text-align: center;
}

.small-tables .table-scroll {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
}

.small-tables h3 {
  text-align: center;
}

.figure-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  margin-top: 34px;
}

pre {
  overflow-x: auto;
  margin: 0;
  padding: 20px;
  background: var(--soft);
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.coming-soon {
  color: var(--muted);
  text-align: center;
}

footer {
  margin-top: 40px;
  padding: 30px 20px;
  text-align: center;
  border-top: 1px solid #eee;
  font-size: 0.85rem;
}

@media (max-width: 760px) {
  .paper-header {
    padding-top: 38px;
  }

  section {
    padding: 32px 0;
  }

  .method-list,
  .small-tables,
  .figure-grid {
    grid-template-columns: 1fr;
  }

  .key-results {
    grid-template-columns: 1fr 1fr;
  }

  .key-results p:nth-child(2) {
    border-right: 0;
  }

  .key-results p:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 460px) {
  .topbar,
  main {
    width: calc(100% - 28px);
  }

  .authors {
    font-size: 1rem;
  }

  .paper-links a {
    min-width: 68px;
    padding: 6px 10px;
    font-size: 0.82rem;
  }

  .tagline {
    font-size: 1.05rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
