:root {
  --ink: #1f2f3f;
  --muted: #586978;
  --green: #2d7d6e;
  --blue: #356f9f;
  --line: #d9e0e4;
  --soft: #f5f7f8;
  --wide: min(920px, calc(100vw - 48px));
  --reading: min(760px, calc(100vw - 48px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; width: 100%; max-width: 100%; height: auto; }
button { font: inherit; }
p, h1, h2, figure { margin-top: 0; }
.content-wide { width: var(--wide); margin-inline: auto; }
.content-reading { width: var(--reading); margin-inline: auto; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 8px 14px;
  color: #fff;
  background: var(--ink);
}
.skip-link:focus { top: 12px; }

.paper-header {
  padding: 58px 0 28px;
  text-align: center;
}
h1 {
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -.035em;
}
.paper-subtitle {
  margin: 0 auto 22px;
  color: #344b5f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(19px, 2.2vw, 25px);
  line-height: 1.3;
}
.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 24px;
  font-size: 16px;
}
.authors sup, .affiliations sup, .corresponding sup { color: var(--green); font-size: .7em; }
.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 24px;
  margin: 7px 0 0;
  color: #657482;
  font-size: 14px;
}
.corresponding { margin: 1px 0 0; color: #7c8891; font-size: 13px; }
.resource-links {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}
.resource-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #bfcbd2;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
.resource-link:hover { color: var(--green); border-color: var(--green); }
.resource-link:focus-visible { outline: 3px solid rgba(53,111,159,.35); outline-offset: 3px; }
.resource-link svg { width: 18px; height: 18px; fill: currentColor; }

.paper-section { padding: 48px 0; }
.first-section { padding: 0 0 24px; }
.compact-top { padding-top: 14px; }
.tinted-section { background: var(--soft); }
.abstract-section { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title {
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 2.8vw, 33px);
  line-height: 1.2;
  letter-spacing: -.02em;
}
.centered-title { text-align: center; }
.section-intro { margin-bottom: 26px; }
.section-intro .section-title { margin-bottom: 14px; }
.section-intro p, .abstract-section p { margin-bottom: 0; color: #3f5261; }

.media-figure, .paper-figure { margin: 0; }
.video-figure {
  max-width: 880px;
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid #cad3d9;
  background: #101a22;
}
.video-figure video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #101a22;
}
.paper-figure { max-width: 760px; margin-inline: auto; }
.teaser-figure { max-width: 620px; }
.wide-figure { max-width: 820px; }
.paper-figure figcaption {
  max-width: 780px;
  margin: 11px auto 0;
  color: #536471;
  font-size: 13.5px;
  line-height: 1.5;
  text-align: left;
}
.paper-figure figcaption strong { color: var(--ink); }
.zoomable {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  line-height: 0;
}
.zoomable:focus-visible { outline: 3px solid rgba(53,111,159,.45); outline-offset: 5px; }
.mobile-figure-stack { display: none; }

.result-summary {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 620px;
  margin: 6px auto 30px;
  padding: 17px 0;
  border-top: 1px solid #bec9cf;
  border-bottom: 1px solid #bec9cf;
  text-align: center;
}
.result-summary > div { display: grid; justify-items: center; line-height: 1.25; }
.result-summary strong {
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 39px;
  font-weight: 600;
}
.result-summary > div:last-child strong { color: #6f7f8b; }
.result-summary span:not(.comparison-mark) { color: var(--ink); font-size: 15px; font-weight: 700; }
.result-summary small { color: #687783; font-size: 12px; }
.comparison-mark { padding: 0 24px; color: #7a8790; font-size: 12px; }

.citation-section { border-top: 1px solid var(--line); }
.citation-block { position: relative; overflow: hidden; border: 1px solid var(--line); background: #f7f9fa; }
.copy-button {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  color: #435463;
  background: #fff;
  border: 1px solid #cad4da;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.copy-button:hover { border-color: var(--blue); color: var(--blue); }
pre {
  margin: 0;
  padding: 22px 78px 22px 22px;
  overflow-x: auto;
  color: #263847;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
}
.site-footer {
  padding: 25px 20px;
  color: #7b8790;
  border-top: 1px solid var(--line);
  text-align: center;
}
.site-footer p { margin: 0; font-size: 13px; }

.figure-dialog {
  width: min(96vw, 1500px);
  max-height: 94vh;
  padding: 42px 18px 18px;
  border: 0;
  background: #fff;
  box-shadow: 0 32px 100px rgba(0,0,0,.32);
}
.figure-dialog::backdrop { background: rgba(8,17,25,.76); }
.figure-dialog img { width: auto; max-width: 100%; max-height: calc(94vh - 62px); margin: auto; object-fit: contain; }
.dialog-close {
  position: absolute;
  right: 9px;
  top: 7px;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--ink);
  background: #eef2f4;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

@media (max-width: 720px) {
  :root {
    --wide: calc(100vw - 28px);
    --reading: calc(100vw - 36px);
  }
  body { font-size: 16px; }
  .paper-header { padding: 42px 0 24px; }
  .venue-line { font-size: 12px; }
  h1 { font-size: clamp(36px, 11vw, 48px); }
  .paper-subtitle { font-size: 18px; }
  .authors { gap: 2px 14px; font-size: 15px; }
  .affiliations { display: grid; gap: 0; font-size: 13px; }
  .paper-section { padding: 40px 0; }
  .first-section { padding: 0 0 24px; }
  .compact-top { padding-top: 16px; }
  .section-title { margin-bottom: 16px; font-size: 28px; }
  .section-intro { margin-bottom: 25px; }
  .paper-figure figcaption { margin-top: 10px; font-size: 13px; }
  .desktop-composite { display: none; }
  .mobile-figure-stack { display: grid; gap: 34px; }
  .result-summary { grid-template-columns: 1fr 62px 1fr; padding: 15px 0; }
  .result-summary strong { font-size: 34px; }
  .comparison-mark { padding: 0 6px; font-size: 10px; line-height: 1.2; }
  pre { padding: 54px 16px 18px; font-size: 11px; }
}

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

@media print {
  .skip-link, .figure-dialog, .copy-button { display: none !important; }
}
