:root {
  --text: #222222;
  --muted: #666666;
  --light: #f7f7f7;
  --line: #dddddd;
  --link: #3273dc;
  --link-dark: #1d4f9a;
  --positive: #16833a;
  --negative: #b23b3b;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
}

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

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

a:hover {
  color: var(--link-dark);
  text-decoration: underline;
}

.container {
  width: min(100% - 32px, 980px);
  margin: 0 auto;
}

.container.narrow,
.text-column {
  width: min(100% - 32px, 860px);
}

.paper-hero {
  padding: 56px 0 18px;
  text-align: center;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 980px;
  margin: 0 auto 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.35rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}

h3 {
  margin: 18px 0 8px;
  font-size: 1.05rem;
  font-weight: 650;
}

.authors {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.authors a {
  color: var(--link);
}

.affiliations,
.notes {
  margin-bottom: 6px;
  color: var(--muted);
}

.notes {
  font-size: 0.94rem;
}

.link-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.link-button {
  display: inline-flex;
  min-width: 92px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid #333333;
  border-radius: 999px;
  background: #333333;
  color: #ffffff;
  padding: 0 16px;
  font-size: 0.95rem;
}

.link-button:hover {
  background: #000000;
  color: #ffffff;
  text-decoration: none;
}

.section {
  padding: 34px 0;
}

.section + .section {
  border-top: 1px solid #eeeeee;
}

.lead {
  width: min(100%, 860px);
  margin: 0 auto 22px;
  color: var(--text);
  text-align: center;
}

.text-column p {
  margin-bottom: 14px;
  text-align: justify;
}

.main-figure {
  margin: 0 auto;
  text-align: center;
}

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

.main-figure.compact img {
  width: min(100%, 720px);
}

figcaption {
  max-width: 900px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  text-align: center;
}

.simple-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
  width: min(100%, 920px);
  margin: 0 auto;
}

.simple-grid article {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.simple-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px auto 30px;
}

.summary-row > div {
  border: 1px solid var(--line);
  background: var(--light);
  padding: 16px;
  text-align: center;
}

.summary-number,
.summary-label {
  display: block;
}

.summary-number {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  line-height: 1.15;
}

.summary-label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.table-wrap {
  width: min(100%, 920px);
  max-height: 520px;
  margin: 0 auto 26px;
  overflow: auto;
  border: 1px solid var(--line);
  background: #ffffff;
}

.small-table {
  max-height: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

th,
td {
  border-bottom: 1px solid #eeeeee;
  padding: 9px 12px;
  text-align: left;
  white-space: nowrap;
}

th {
  background: var(--light);
  color: #333333;
  font-weight: 650;
}

.results-table th {
  position: sticky;
  top: 0;
}

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

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

pre {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--light);
  padding: 16px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.delta-positive {
  color: var(--positive);
}

.delta-negative {
  color: var(--negative);
}

.figure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.figure-grid figure {
  margin: 0;
}

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

.video-carousel {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  gap: 14px;
  align-items: center;
  margin-top: 22px;
}

.carousel-button {
  width: 42px;
  height: 42px;
  border: 1px solid #bbbbbb;
  border-radius: 50%;
  background: #ffffff;
  color: #333333;
  cursor: pointer;
  font: inherit;
  font-size: 1.8rem;
  line-height: 1;
}

.carousel-button:hover {
  border-color: #333333;
  background: #333333;
  color: #ffffff;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(var(--videos-per-page, 3), minmax(0, 1fr));
  gap: 18px;
}

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

.video-card[hidden] {
  display: none;
}

.video-card video {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #eeeeee;
  object-fit: cover;
}

.video-card-body {
  padding: 11px 12px 13px;
}

.video-card h3 {
  margin: 0 0 3px;
  font-size: 0.96rem;
}

.video-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

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

@media (max-width: 780px) {
  .paper-hero {
    padding-top: 36px;
  }

  .simple-grid,
  .summary-row,
  .figure-grid {
    grid-template-columns: 1fr;
  }

  .video-carousel {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 8px;
  }

  .carousel-button {
    width: 34px;
    height: 34px;
    font-size: 1.45rem;
  }

  .text-column p {
    text-align: left;
  }

  th,
  td {
    padding: 8px 10px;
  }
}
