:root {
  --ink: #17242a;
  --muted: #56666d;
  --line: #d5dee1;
  --paper: #ffffff;
  --fog: #f4f7f7;
  --teal: #1f7a83;
  --teal-dark: #234e52;
  --coral: #cf5d45;
  --mustard: #d39a2f;
  --violet: #6f5aa7;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "IBM Plex Sans", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0;
}

a {
  color: var(--teal-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  color: white;
  background: var(--ink);
}

.skip-link:focus {
  top: 12px;
}

.publication-header {
  padding: 72px 24px 42px;
  text-align: center;
  border-top: 8px solid var(--teal-dark);
  background: var(--paper);
}

.section-index {
  margin: 0;
  color: var(--coral);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.publication-header h1 {
  margin: 0;
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 58px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0;
}

.paper-subtitle {
  max-width: 880px;
  margin: 14px auto 24px;
  color: var(--teal-dark);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px 18px;
  max-width: 900px;
  margin: 0 auto 8px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
}

.authors sup,
.affiliation sup,
.author-note sup {
  color: var(--coral);
}

.affiliation {
  margin: 7px auto 0;
  color: var(--muted);
  font-size: 15px;
}

.author-note {
  margin: 2px auto 22px;
  color: var(--muted);
  font-size: 13px;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 17px;
  color: white;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 5px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.button-link:hover,
.button-link:focus-visible {
  color: white;
  background: var(--teal);
  border-color: var(--teal);
  transform: translateY(-1px);
}

.teaser-section {
  padding: 0 24px 48px;
}

.figure-frame {
  margin: 0;
  background: var(--paper);
}

.figure-frame img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}

.hero-figure img {
  box-shadow: 0 16px 38px rgb(23 36 42 / 12%);
}

.figure-frame figcaption {
  max-width: 940px;
  margin: 13px auto 0;
  color: #46565d;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
}

.stats-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--fog);
}

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

.stats-grid > div {
  min-width: 0;
  padding: 28px 20px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.stats-grid > div:last-child {
  border-right: 0;
}

.stats-grid strong {
  display: block;
  color: var(--teal-dark);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 36px;
  line-height: 1.1;
}

.stats-grid span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.section-block {
  padding: 76px 24px;
}

.section-block + .section-block {
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 34px;
}

.constrained-heading {
  max-width: 980px;
  margin-right: auto;
  margin-left: auto;
}

.section-heading h2,
.standalone-heading,
.bibtex-header h2 {
  margin: -4px 0 6px;
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.standalone-heading {
  margin-bottom: 22px;
}

.section-heading p:last-child {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

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

.insight-grid article {
  padding-top: 17px;
  border-top: 4px solid var(--teal);
}

.insight-grid article:nth-child(2) {
  border-color: var(--coral);
}

.insight-grid article:nth-child(3) {
  border-color: var(--mustard);
}

.insight-grid h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
}

.insight-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.construction-section,
.abstract-section {
  background: var(--fog);
}

.results-table-wrap {
  overflow-x: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 12px 30px rgba(28, 48, 56, 0.07);
  scrollbar-color: #aebbc0 #edf1f2;
}

.results-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  color: #29383e;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.results-table caption {
  caption-side: bottom;
  padding: 13px 16px 15px;
  color: #52646b;
  background: #f8fafb;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
}

.results-table th,
.results-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #dfe6e8;
  text-align: right;
  white-space: nowrap;
}

.results-table thead th {
  color: #1d3037;
  background: #eaf1f2;
  font-weight: 700;
}

.results-table thead tr:first-child th {
  border-bottom-color: #b8c6ca;
}

.results-table thead tr:first-child > th:first-child,
.results-table tbody tr:not(.table-group) > th:first-child {
  min-width: 232px;
  text-align: left;
}

.results-table tbody th {
  color: #26383e;
  background: white;
  font-weight: 600;
}

.results-table tbody tr:not(.table-group):hover th,
.results-table tbody tr:not(.table-group):hover td {
  background: #f5f8f9;
}

.results-table .route-divider,
.results-table thead tr:first-child th:nth-child(2),
.results-table thead tr:nth-child(2) th:first-child,
.results-table tbody tr:not(.table-group) td:first-of-type {
  border-left: 2px solid #afbec3;
}

.results-table .table-group th {
  padding-top: 10px;
  padding-bottom: 10px;
  color: #1f343b;
  background: #dce7e9;
  border-bottom-color: #b8c6ca;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

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

.abstract-text {
  margin: 0;
  color: #2e3a40;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 18px;
  line-height: 1.78;
  text-align: justify;
}

.citation-section {
  color: var(--ink);
  background: #eef3f4;
  border-top: 1px solid #d4dee1;
}

.bibtex-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.bibtex-header h2 {
  margin: 0;
  color: var(--ink);
}

.bibtex-header button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  color: #304249;
  background: white;
  border: 1px solid #b8c6ca;
  border-radius: 4px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.bibtex-header button:hover,
.bibtex-header button:focus-visible {
  color: #0f7480;
  border-color: #5d9da4;
}

pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  color: #26383e;
  background: white;
  border: 1px solid #c8d4d7;
  border-left: 4px solid var(--coral);
  border-radius: 4px;
  box-shadow: 0 8px 22px rgba(29, 48, 56, 0.06);
  font-size: 13px;
  line-height: 1.55;
}

footer {
  padding: 32px 24px;
  color: #65757b;
  background: #eef2f3;
  border-top: 1px solid var(--line);
  font-size: 13px;
  text-align: center;
}

footer p {
  margin: 3px 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .publication-header h1 {
    font-size: 46px;
  }

  .paper-subtitle {
    font-size: 26px;
  }

}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .publication-header {
    padding: 48px 18px 30px;
  }

  .publication-header h1 {
    font-size: 38px;
  }

  .paper-subtitle {
    font-size: 22px;
  }

  .authors {
    font-size: 16px;
  }

  .teaser-section {
    padding: 0 12px 32px;
  }

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

  .stats-grid > div:nth-child(2) {
    border-right: 0;
  }

  .stats-grid > div:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }

  .section-block {
    padding: 52px 18px;
  }

  .section-heading {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
  }

  .section-heading h2,
  .standalone-heading,
  .bibtex-header h2 {
    font-size: 30px;
  }

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

  .abstract-text {
    font-size: 17px;
    text-align: left;
  }
}

@media (max-width: 430px) {
  .publication-header h1 {
    font-size: 32px;
    overflow-wrap: anywhere;
  }

  .paper-subtitle {
    font-size: 20px;
  }

  .button-link {
    min-width: 125px;
    justify-content: center;
  }

  .stats-grid strong {
    font-size: 30px;
  }
}

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

  * {
    transition: none !important;
  }
}
