:root {
  --ink: #14211f;
  --muted: #5c6966;
  --paper: #f7f8f5;
  --white: #ffffff;
  --line: #d9ded9;
  --teal: #0d6f66;
  --teal-dark: #09534d;
  --mint: #dceee8;
  --coral: #dd684c;
  --coral-soft: #f6dfd7;
  --yellow: #f1c75b;
  --black: #0b1110;
  --shadow: 0 12px 32px rgba(20, 33, 31, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}

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

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 4vw;
  color: #f6faf7;
  background: rgba(11, 17, 16, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
}

.brand {
  color: #ffffff;
  font-size: 17px;
  font-weight: 760;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-header nav a {
  color: #d6dfdc;
  font-size: 13px;
  font-weight: 640;
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: #ffffff;
}

.hero {
  padding: 72px 4vw 30px;
  color: #ffffff;
  background: var(--black);
}

.hero-copy {
  width: min(980px, 100%);
  margin: 0 auto 42px;
  text-align: center;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(46px, 8vw, 88px);
  font-weight: 700;
  line-height: 0.98;
}

.subtitle {
  max-width: 900px;
  margin: 20px auto 0;
  color: #e8efed;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(20px, 3vw, 34px);
  line-height: 1.2;
}

.paper-authors {
  max-width: 960px;
  margin: 24px auto 0;
  color: #edf3f1;
}

.paper-authors p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
}

.paper-authors sup {
  color: #f1a184;
  font-size: 0.7em;
  font-weight: 700;
}

.paper-authors .paper-affiliations {
  margin-top: 8px;
  color: #bfcac7;
  font-size: 14px;
}

.paper-authors .author-notes {
  margin-top: 5px;
  color: #8fa09b;
  font-size: 12px;
}

.summary {
  max-width: 730px;
  margin: 22px auto 0;
  color: #bfcac7;
  font-size: 16px;
}

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

.hero-links a,
.case-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid #52605c;
  border-radius: 5px;
  background: transparent;
  color: #edf3f1;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.hero-links a {
  min-width: 126px;
}

.hero-links svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-links a:hover,
.hero-links a:focus-visible,
.case-controls button:hover,
.case-controls button:focus-visible {
  border-color: #ffffff;
  outline: none;
}

.hero-carousel {
  width: min(1380px, 100%);
  margin: 0 auto;
  padding: 16px;
  border: 1px solid #2f3a37;
  border-radius: 5px;
  background: #111a18;
}

.hero-carousel-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 2px 14px;
}

.hero-carousel-bar > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.hero-carousel-bar span {
  color: #8fa09c;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-carousel-bar strong {
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
}

.hero-carousel-viewport {
  overflow: visible;
}

.hero-carousel-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 12px;
}

.hero-comparison-card {
  min-width: 0;
}

.hero-case-title {
  margin: 0;
  padding: 0 2px 7px;
  color: #dce5e2;
  font-size: 11px;
  font-weight: 740;
}

.hero-comparison-placeholder {
  display: grid;
  aspect-ratio: 48 / 23;
  place-items: center;
  border: 1px solid #33413e;
  color: #687773;
  background: #0d1513;
  font-size: 11px;
  font-weight: 700;
}

.hero-before-after {
  --split: 50%;
  position: relative;
  aspect-ratio: 48 / 23;
  overflow: hidden;
  background: #050807;
  isolation: isolate;
}

.hero-before-after video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #050807;
}

.hero-after {
  z-index: 0;
}

.hero-before {
  z-index: 1;
  clip-path: inset(0 calc(100% - var(--split)) 0 0);
  transform: translateY(var(--before-offset-y, 0)) scale(var(--before-scale, 1));
}

.hero-comparison-label {
  position: absolute;
  top: 12px;
  z-index: 3;
  padding: 5px 9px;
  border-radius: 3px;
  background: rgba(11, 17, 16, 0.82);
  color: #ffffff;
  font-size: 10px;
  font-weight: 780;
}

.hero-comparison-label-before {
  left: 12px;
}

.hero-comparison-label-after {
  right: 12px;
  color: #9de0d4;
}

.hero-claim-tag {
  position: absolute;
  right: 10px;
  bottom: 9px;
  z-index: 3;
  padding: 4px 7px;
  border-radius: 2px;
  background: rgba(11, 17, 16, 0.78);
  color: #ffffff;
  font-size: 10px;
  font-weight: 760;
  pointer-events: none;
}

.hero-comparison-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  z-index: 3;
  width: 2px;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(11, 17, 16, 0.24);
  pointer-events: none;
  transform: translateX(-1px);
}

.hero-comparison-divider::after {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(11, 17, 16, 0.82);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  content: "\2194";
  font-size: 18px;
  transform: translate(-50%, -50%);
}

.hero-comparison-range {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.section {
  width: min(1280px, calc(100% - 8vw));
  margin: 0 auto;
  padding: 86px 0;
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(320px, 1.25fr);
  gap: clamp(36px, 7vw, 100px);
  align-items: start;
  border-bottom: 1px solid var(--line);
}

.intro-band h2,
.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
}

.intro-band > p,
.section-heading > p {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.abstract-copy {
  color: var(--muted);
  font-size: 16px;
}

.abstract-copy p {
  margin: 0 0 15px;
}

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

.section-heading {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(32px, 7vw, 90px);
  align-items: end;
  margin-bottom: 34px;
}

.section-heading > p {
  margin: 0;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--coral);
  font-size: 16px;
  font-weight: 720;
}

.comparison-list {
  overflow-x: auto;
  padding-bottom: 10px;
}

.comparison-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.comparison-pagination button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
}

.comparison-pagination button:hover:not(:disabled),
.comparison-pagination button:focus-visible:not(:disabled) {
  border-color: var(--teal);
  background: var(--mint);
  color: var(--teal-dark);
}

.comparison-pagination button:disabled {
  cursor: default;
  opacity: 0.35;
}

.comparison-pagination span {
  min-width: 54px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-align: center;
}

.comparison-heading-side {
  display: grid;
  justify-items: start;
  gap: 14px;
}

.comparison-heading-side p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.comparison-heading-side button {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 720;
  cursor: pointer;
}

.comparison-heading-side button:hover {
  border-color: var(--teal);
  background: var(--mint);
  color: var(--teal-dark);
}

.comparison-matrix {
  min-width: 1120px;
  padding: 12px;
  background: #f4f8ef;
}

.comparison-matrix-header,
.comparison-matrix-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  column-gap: 8px;
}

.comparison-header-cell,
.comparison-video-cell {
  background: #f4f8ef;
}

.comparison-header-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  text-align: center;
}

.comparison-original-header {
  background: #eef4fb;
  color: var(--ink);
  font-weight: 820;
}

.comparison-video-cell {
  min-width: 0;
  padding: 0;
}

.comparison-video-cell video {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
  background: #e8ece8;
}

.comparison-original {
  background: #eef4fb;
}

.comparison-ours {
  background: #f4f8ef;
}

.comparison-ours-header {
  color: var(--teal-dark);
  background: #f4f8ef;
  font-weight: 840;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.result-panel,
.wild-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}

.wild-panel {
  margin-top: 18px;
}

.result-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
}

.result-summary p {
  margin: 0;
  padding-left: 14px;
  border-left: 3px solid var(--coral);
}

.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h3 {
  margin: 0;
  font-size: 18px;
}

.panel-heading span {
  color: var(--muted);
  font-size: 12px;
}

.metric-note {
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--mint);
  color: var(--teal-dark) !important;
  font-weight: 760;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf0ed;
  text-align: right;
  font-size: 12px;
}

th {
  color: var(--muted);
  background: #fafbf9;
  font-weight: 740;
}

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

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

tbody tr:hover td {
  background: #fbfcfa;
}

tr.ours td {
  color: var(--teal-dark);
  background: var(--mint);
  font-weight: 800;
}

.cases-section {
  width: 100%;
  padding-right: 4vw;
  padding-left: 4vw;
  color: #eff5f3;
  background: #101817;
}

.cases-section .section-heading {
  width: min(1280px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.cases-section .section-heading h2 {
  color: #ffffff;
}

.case-controls {
  display: flex;
  justify-content: flex-end;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px 22px;
  width: min(1280px, 100%);
  margin: 0 auto;
}

.dataset-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px 22px;
  width: min(1280px, 100%);
  margin: 0 auto;
}

.dataset-group,
.dataset-group .case-grid {
  display: contents;
}

.dataset-taxonomy-note {
  width: min(1280px, 100%);
  margin: -10px auto 34px;
  color: #a8b6b2;
  font-size: 13px;
}

.dataset-group-heading {
  display: none;
}

.case-item {
  position: relative;
  min-width: 0;
}

.case-item::after {
  content: none;
}

.case-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 35px;
  padding-bottom: 9px;
  border-bottom: 1px solid #33413e;
}

.case-title span {
  font-size: 14px;
  font-weight: 780;
}

.case-title small {
  color: #8fa09c;
  font-size: 11px;
}

.video-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding-top: 9px;
}

.video-triplet {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.video-pair figure {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #2d3936;
  border-radius: 4px;
  background: #050807;
}

.video-pair video {
  aspect-ratio: 20 / 11;
  object-fit: cover;
  background: #000000;
}

.video-pair figcaption {
  position: absolute;
  bottom: 6px;
  left: 6px;
  padding: 3px 6px;
  border-radius: 2px;
  background: rgba(5, 8, 7, 0.78);
  color: #eef5f2;
  font-size: 10px;
  font-weight: 700;
}

.visual-section + .visual-section {
  padding-top: 30px;
}

.figure-section + .figure-section {
  padding-top: 30px;
}

.paper-figure {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.paper-figure-image {
  height: auto;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

#data-pipeline .paper-figure-image {
  width: 100%;
  margin-inline: auto;
  background: var(--paper);
}

.paper-figure-landscape {
  height: min(64vw, 720px);
  min-height: 420px;
}

.paper-figure-portrait {
  width: min(760px, 100%);
  height: min(1180px, 142vw);
  min-height: 720px;
  margin: 0 auto;
}

.wide-figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.wide-figure img {
  height: auto;
}

.data-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.data-stats div {
  display: flex;
  flex-direction: column;
  min-height: 108px;
  justify-content: center;
  padding: 18px;
  background: var(--white);
}

.data-stats strong {
  color: var(--teal-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
}

.data-stats span {
  color: var(--muted);
  font-size: 12px;
}

.pipeline-figure {
  box-shadow: none;
}

.curriculum-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 0 4vw;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #eef1ed;
  font-size: 12px;
}

footer strong {
  color: var(--ink);
  font-size: 14px;
}

.citation-section {
  padding-top: 64px;
}

.citation-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.citation-heading h2 {
  margin: 0;
}

.citation-section pre {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #111a18;
  color: #e8efed;
  font: 13px/1.65 Consolas, "SFMono-Regular", Menlo, monospace;
  white-space: pre;
}

.copy-citation {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 92px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--ink);
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.copy-citation svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.copy-citation:hover,
.copy-citation:focus-visible {
  border-color: var(--coral);
  color: var(--coral);
  outline: none;
}

@media (max-width: 900px) {
  .site-header nav {
    gap: 14px;
  }

  .intro-band,
  .section-heading {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .results-grid,
  .case-grid,
  .dataset-groups,
  .result-summary {
    grid-template-columns: 1fr;
  }

  .section-heading > p {
    max-width: 700px;
  }

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

@media (max-width: 620px) {
  .site-header {
    padding: 0 18px;
  }

  .site-header nav a:nth-child(4),
  .site-header nav a:nth-child(5) {
    display: none;
  }

  .hero {
    padding: 52px 18px 20px;
  }

  .hero-carousel {
    padding: 12px;
  }

  .hero-carousel-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .hero-carousel-bar > div:first-child {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .hero-before-after {
    aspect-ratio: 16 / 9;
  }

  .hero-carousel-track {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .section {
    width: calc(100% - 36px);
    padding: 60px 0;
  }

  .cases-section {
    width: 100%;
    padding-right: 18px;
    padding-left: 18px;
  }

  .video-pair {
    grid-template-columns: 1fr;
  }

  .data-stats {
    grid-template-columns: 1fr;
  }

  .data-stats div {
    min-height: 82px;
  }

  footer {
    padding: 0 18px;
  }
}

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