:root {
  color-scheme: light;
  --text: #151515;
  --muted: #555;
  --faint: #777;
  --rule: #d9d9d9;
  --paper: #ffffff;
  --link: #1b5aa6;
  --soft: #f7f7f7;
  --soft-blue: #f3f7fc;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.62;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 34px 22px 68px;
}

.paper-header {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 0 28px;
  text-align: center;
  border-bottom: 1px solid var(--rule);
}

.venue {
  margin: 0 0 12px;
  color: var(--faint);
  font-size: 0.95rem;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  max-width: 920px;
  margin: 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.15rem, 5vw, 4rem);
  font-weight: 650;
  line-height: 1.08;
}

.title-with-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.8vw, 18px);
}

.title-with-logo img {
  width: clamp(34px, 5vw, 58px);
  height: clamp(34px, 5vw, 58px);
  flex: 0 0 auto;
}

.title-with-logo span {
  display: inline-block;
}

.subtitle {
  margin: 12px auto 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.18rem, 2.4vw, 1.65rem);
  line-height: 1.28;
}

.authors {
  max-width: 880px;
  margin: 24px auto 0;
  color: var(--link);
  font-size: 1.05rem;
  line-height: 1.55;
}

.authors a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

sup {
  font-size: 0.68em;
}

.affiliations,
.correspondence {
  max-width: 900px;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

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

.paper-links a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 6px 14px;
  background: #fafafa;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.paper-links a:hover {
  border-color: var(--link);
  color: var(--link);
}

.teaser {
  max-width: 940px;
  margin: 34px auto 42px;
}

figure {
  margin: 0;
}

figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  background: #fff;
  cursor: zoom-in;
}

figure img:focus-visible,
.zoom-table:focus-visible {
  outline: 3px solid rgba(27, 90, 166, 0.35);
  outline-offset: 3px;
}

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

.section {
  max-width: 960px;
  margin: 0 auto;
  padding: 34px 0;
  border-top: 1px solid var(--rule);
}

.teaser + .section {
  border-top: 0;
}

.section-title {
  max-width: 780px;
  margin-bottom: 18px;
}

.kicker {
  margin: 0 0 6px;
  color: var(--link);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 650;
  line-height: 1.22;
}

h3 {
  margin: 0 0 7px;
  font-size: 1.04rem;
  line-height: 1.35;
}

.section p {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 1rem;
}

.section p:last-child {
  margin-bottom: 0;
}

.finding-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.finding-grid article {
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 16px;
  background: var(--soft-blue);
}

.finding-index {
  display: block;
  margin-bottom: 18px;
  color: var(--link);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.75rem;
  line-height: 1;
}

.finding-grid p,
.pipeline p {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 28px;
  align-items: start;
}

.argument-box {
  max-width: 880px;
  border-left: 4px solid var(--link);
  padding: 2px 0 2px 18px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 0;
}

.stats div {
  border-top: 2px solid var(--text);
  padding-top: 10px;
}

.stats dt {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
  font-weight: 650;
  line-height: 1;
}

.stats dd {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.mini-figure-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.mini-figure-grid img {
  aspect-ratio: 1.34 / 1;
  object-fit: contain;
}

.mini-figure-grid figcaption {
  text-align: center;
  font-size: 0.84rem;
}

.note {
  margin-top: 18px;
  border-left: 3px solid var(--link);
  padding-left: 14px;
  color: var(--muted);
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.pipeline article {
  position: relative;
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 16px;
  background: var(--soft);
}

.pipeline span {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--link);
  font-size: 0.82rem;
  font-weight: 750;
  text-transform: uppercase;
}

.method-row {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
}

.result-hero {
  margin-bottom: 26px;
}

.result-hero img {
  border-color: #cfcfcf;
}

.filter-pipeline {
  margin-bottom: 18px;
}

.two-column figcaption {
  text-align: left;
}

.zoom-table {
  overflow-x: auto;
  border: 1px solid var(--rule);
  background: #fff;
  cursor: zoom-in;
}

.delta-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.84rem;
  line-height: 1.35;
}

.delta-table caption {
  caption-side: top;
  padding: 10px 12px;
  color: var(--text);
  font-weight: 700;
  text-align: left;
}

.delta-table th,
.delta-table td {
  border-top: 1px solid var(--rule);
  padding: 8px 9px;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}

.delta-table thead th {
  background: var(--soft);
  font-weight: 700;
}

.delta-table th:first-child,
.delta-table td:first-child {
  text-align: left;
}

.delta-table tbody th {
  font-weight: 650;
}

.delta-table .pos {
  color: #116734;
}

.delta-table .neg {
  color: #9a2c2c;
}

.delta-table .summary-row th,
.delta-table .summary-row td {
  border-top: 2px solid #8a8a8a;
  background: #fafafa;
  font-weight: 750;
}

.wide-figure {
  max-width: 960px;
}

.wide-figure figcaption {
  text-align: center;
}

.compact {
  max-width: 820px;
}

.resource-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.resource-table th,
.resource-table td {
  border-top: 1px solid var(--rule);
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
}

.resource-table tr:first-child th,
.resource-table tr:first-child td {
  border-top: 0;
}

.resource-table th {
  width: 130px;
  color: var(--muted);
  font-weight: 650;
}

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

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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 58px 24px 24px;
  background: rgba(0, 0, 0, 0.78);
}

.lightbox.is-open {
  display: flex;
}

.lightbox-content {
  display: flex;
  width: min(96vw, 1400px);
  max-height: calc(100vh - 92px);
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
}

.lightbox-content img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 92px);
  border: 0;
  cursor: default;
  object-fit: contain;
}

.lightbox-content .zoom-table {
  width: 100%;
  max-height: calc(100vh - 92px);
  overflow: hidden;
  cursor: default;
  border: 0;
}

.lightbox-content .delta-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: clamp(0.66rem, 1.05vw, 0.95rem);
}

.lightbox-content .delta-table caption {
  padding: 9px 10px;
  font-size: clamp(0.76rem, 1.2vw, 1rem);
}

.lightbox-content .delta-table th,
.lightbox-content .delta-table td {
  padding: clamp(4px, 0.72vw, 8px);
  white-space: normal;
  word-break: normal;
}

.lightbox-close {
  position: fixed;
  top: 16px;
  right: 18px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 900px) {
  .finding-grid,
  .mini-figure-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-column,
  .method-row,
  .pipeline {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .page {
    padding: 22px 16px 48px;
  }

  .paper-links {
    align-items: stretch;
    flex-direction: column;
  }

  .paper-links a {
    width: 100%;
  }

  .authors {
    font-size: 1rem;
  }

  .title-with-logo {
    display: flex;
    align-items: center;
  }

  .finding-grid,
  .mini-figure-grid,
  .stats {
    grid-template-columns: 1fr;
  }

  .resource-table th {
    width: 92px;
  }

  .lightbox {
    padding: 52px 8px 12px;
  }

  .lightbox-content {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 64px);
  }

  .lightbox-content img,
  .lightbox-content .zoom-table {
    max-height: calc(100vh - 64px);
  }

  .lightbox-content .delta-table {
    font-size: clamp(0.48rem, 2.2vw, 0.68rem);
  }

  .lightbox-content .delta-table caption {
    padding: 6px;
    font-size: clamp(0.58rem, 2.4vw, 0.75rem);
  }

  .lightbox-content .delta-table th,
  .lightbox-content .delta-table td {
    padding: 3px;
  }
}
