:root {
  color-scheme: light;
  --text: #333333;
  --muted: #666666;
  --link: #315f8c;
  --accent: #4d1e79;
  --button: #750d0d;
  --line: #e5e5e5;
  --soft: #f7f7f7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: #ffffff;
  color: var(--text);
  font-family: "Google Sans", "Noto Sans", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

body.pdf-page {
  height: 100vh;
  overflow: hidden;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  width: min(900px, calc(100% - 28px));
  margin: 0 auto;
}

.container.text {
  max-width: 860px;
}

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

h1 {
  margin: 0;
  color: #222222;
  font-size: 29px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.conference {
  margin: 15px 0 10px;
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
}

.authors {
  margin: 10px auto 0;
  max-width: 850px;
  font-size: 17px;
  line-height: 1.65;
}

.affiliations {
  margin: 12px auto 0;
  max-width: 850px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.buttons a,
.dataset-link a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--button);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.buttons a:hover,
.dataset-link a:hover {
  background: #8a4646;
  color: #ffffff;
  text-decoration: none;
}

.section {
  padding: 22px 0;
}

h2 {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
}

h3 {
  margin: 24px 0 8px;
  color: #555555;
  font-size: 17px;
  font-weight: 700;
}

p {
  margin: 0 0 12px;
}

.section-summary {
  color: var(--muted);
}

figure img {
  display: block;
  width: 100%;
  height: auto;
  background: #ffffff;
}

figure {
  margin: 18px 0 0;
  padding: 0;
  background: #ffffff;
}

figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
}

.table-wrap {
  margin: 15px 0 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

th,
td {
  padding: 6px 6px;
  border: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

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

td:first-child,
th:first-child {
  text-align: left;
  overflow-wrap: anywhere;
}

td strong {
  color: #9b1c1c;
}

.results-table th,
.results-table td {
  padding: 6px 6px;
}

.table-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 15px 0 20px;
}

.metric-table h3 {
  margin: 0 0 7px;
  color: #555555;
  font-size: 15px;
  text-align: center;
}

.metric-table th:first-child,
.metric-table td:first-child {
  width: 38%;
}

.grid {
  display: grid;
  gap: 18px;
}

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

.grid.tall figure img {
  max-height: 680px;
  object-fit: contain;
}

.dataset-link {
  margin: 16px 0 8px;
  text-align: center;
}

pre {
  overflow-x: auto;
  margin: 14px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8f8f8;
  color: #222222;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

footer {
  margin-top: 24px;
  padding: 28px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.pdf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 46px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.pdf-page iframe {
  display: block;
  width: 100%;
  height: calc(100vh - 46px);
  border: 0;
}

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

  h1 {
    font-size: 24px;
  }

  .conference {
    font-size: 18px;
  }

  .authors {
    font-size: 14px;
  }

  .affiliations,
  figcaption,
  footer {
    font-size: 13px;
  }

  h2 {
    font-size: 20px;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }

  .table-grid {
    grid-template-columns: 1fr;
  }

  table {
    font-size: 11px;
  }

  th,
  td,
  .results-table th,
  .results-table td {
    padding: 5px 5px;
  }
}
