:root {
  --text: #242424;
  --muted: #5f6368;
  --link: #3273dc;
  --button: #363636;
  --button-hover: #222222;
  --border: #e6e6e6;
  --code-bg: #f5f5f5;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #eef5f3;
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 31%, rgba(117, 166, 143, 0.16), transparent 25%),
    radial-gradient(circle at 92% 56%, rgba(113, 151, 183, 0.14), transparent 27%),
    radial-gradient(circle at 46% 96%, rgba(177, 157, 196, 0.12), transparent 32%),
    linear-gradient(180deg, #eef7f2 0%, #eef5f4 44%, #f2f5f3 100%);
  background-attachment: fixed;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  font-size: 15.6px;
  font-weight: 500;
  line-height: 1.62;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(238, 247, 242, 0.74), rgba(242, 245, 243, 0.82)),
    url("/Web/LEADer/Figures/HeroBackground.webp?v=20261006-full-page") center top / cover no-repeat;
  filter: contrast(1.08) saturate(1.08);
  opacity: 0.72;
  pointer-events: none;
}

main {
  width: 100%;
  margin: 0 auto;
  padding: 0 0 64px;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.hero-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-bottom: 0;
  padding: 48px 0 0;
  background: linear-gradient(180deg, #e7f0df 0%, #fff8e8 56%, #eef5f3 100%);
}

.hero-band::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  background: url("/Web/LEADer/Figures/HeroBackground.webp?v=20260709-gapfix") center top / cover no-repeat;
  filter: contrast(1.32) saturate(1.32);
  opacity: 1;
  transform: scale(1.01);
  pointer-events: none;
}

.hero-band::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  background:
    radial-gradient(ellipse at 50% 25%, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.12) 31%, rgba(255, 255, 255, 0.00) 64%),
    radial-gradient(ellipse at 8% 8%, rgba(18, 47, 8, 0.42) 0%, rgba(18, 47, 8, 0.00) 38%),
    radial-gradient(ellipse at 91% 10%, rgba(183, 135, 59, 0.31) 0%, rgba(183, 135, 59, 0.00) 40%),
    radial-gradient(ellipse at 74% 58%, rgba(84, 116, 133, 0.22) 0%, rgba(84, 116, 133, 0.00) 36%),
    linear-gradient(100deg, rgba(255, 255, 255, 0.12), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.14)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.00) 0%, rgba(255, 255, 255, 0.10) 58%, rgba(238, 245, 243, 0.94) 97%);
  pointer-events: none;
}

.publication-header {
  position: relative;
  z-index: 1;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.hero-card {
  position: relative;
  padding: 26px 0 18px;
}

.hero-card::after {
  content: none;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  font-size: 11.8px;
  font-weight: 600;
}

h1 {
  max-width: 1420px;
  margin: 0;
  font-size: 38.6px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0;
}

.title-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  max-width: 1500px;
  margin: 0 auto 18px;
}

.title-lockup::after {
  width: 124px;
  height: 1px;
  flex: 0 0 124px;
  content: "";
}

.project-logo {
  width: 124px;
  height: 124px;
  margin: 0;
  flex: 0 0 124px;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(18, 47, 8, 0.14));
}

.publication-title-line {
  display: block;
  text-align: center;
}

@media (min-width: 1240px) {
  .publication-title-line {
    white-space: nowrap;
  }
}

@media (min-width: 761px) and (max-width: 1299px) {
  h1 {
    font-size: 35.3px;
  }
}

@media (min-width: 1300px) and (max-width: 1399px) {
  h1 {
    font-size: 36.1px;
  }
}

@media (min-width: 761px) and (max-width: 1399px) {
  .title-lockup::after {
    width: 104px;
    flex-basis: 104px;
  }

  .project-logo {
    width: 104px;
    height: 104px;
    flex-basis: 104px;
  }
}

.hero-card h1 {
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.74),
    0 16px 34px rgba(18, 47, 8, 0.17);
}

.conference {
  margin: 0 0 18px;
  font-size: 26.9px;
  font-weight: 700;
  color: var(--text);
}

.conference-oral {
  display: inline-block;
  color: #2e5b3e;
  font-size: 1.1em;
  font-weight: 800;
  line-height: 1;
}

.hero-card .conference {
  text-shadow: 0 10px 24px rgba(18, 47, 8, 0.15);
}

.authors {
  max-width: 980px;
  margin: 0 auto 12px;
  font-size: 18.1px;
  line-height: 1.72;
}

.hero-card .authors a {
  color: #122F08;
}

.institutions,
.notes {
  margin: 6px auto;
  color: var(--muted);
  font-size: 15.1px;
}

.summary {
  max-width: 720px;
  margin: 18px auto 0;
  color: #3d3d3d;
  font-size: 15.1px;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin-top: 24px;
}

.pill[type="button"] {
  appearance: none;
  font: inherit;
  cursor: pointer;
}

body.publication-poster-modal-open {
  overflow: hidden;
}

.poster-modal {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.poster-modal.is-open {
  visibility: visible;
  opacity: 1;
}

.poster-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 36, 39, 0.72);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.poster-modal__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(96vw, 1240px);
  height: min(94vh, 1200px);
  overflow: hidden;
  border: 1px solid rgba(125, 158, 165, 0.46);
  border-radius: 10px;
  background: #f8fcfb;
  box-shadow: 0 24px 80px rgba(13, 24, 28, 0.34);
  transform: translateY(12px) scale(0.985);
  transition: transform 0.2s ease;
}

.poster-modal.is-open .poster-modal__dialog {
  transform: translateY(0) scale(1);
}

.poster-modal__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 10px 14px 10px 20px;
  border-bottom: 1px solid rgba(72, 101, 108, 0.16);
  background: rgba(248, 252, 251, 0.94);
}

.poster-modal__title {
  margin: 0 !important;
  color: #252936;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.poster-modal__controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.poster-modal__control {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid rgba(111, 139, 145, 0.28);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.78);
  color: #34484d;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.poster-modal__control:hover,
.poster-modal__control:focus-visible {
  border-color: rgba(74, 120, 146, 0.48);
  background: #ffffff;
  outline: none;
}

.poster-modal__control--reset {
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.poster-modal__control--close {
  margin-left: 3px;
  border-color: rgba(180, 95, 121, 0.28);
  color: #a14c67;
  font-size: 23px;
}

.poster-modal__zoom-value {
  min-width: 47px;
  color: #52666d;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.poster-modal__viewport {
  flex: 1 1 auto;
  overflow: auto;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(218, 234, 232, 0.72), rgba(246, 249, 246, 0.9)),
    #edf4f3;
  text-align: center;
}

.poster-modal__image {
  display: block;
  width: 780px;
  max-width: none;
  height: auto;
  margin: 0 auto;
  box-shadow: 0 12px 28px rgba(42, 65, 70, 0.18);
  transition: width 0.18s ease;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 128px;
  min-height: 46px;
  padding: 11px 20px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 36px rgba(79, 70, 105, 0.12);
  color: #272636;
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  font-family: inherit;
  font-size: 13.4px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: 0;
  object-fit: contain;
  flex: 0 0 22px;
}

.pill-icon-arxiv {
  color: #b31b1b;
  font-size: 17.3px;
  line-height: 1;
}

.pill-icon-bibtex {
  color: #66509a;
  font-size: 16.4px;
  font-weight: 700;
  line-height: 1;
}

#bibtex {
  scroll-margin-top: 24px;
}

.pill:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 42px rgba(79, 70, 105, 0.18);
  color: #272636;
  text-decoration: none;
}

.pill:focus-visible {
  outline: 2px solid rgba(74, 120, 146, 0.52);
  outline-offset: 2px;
  background: rgba(255, 255, 255, 0.9);
}

.restoration-demo {
  position: relative;
  z-index: 1;
  width: min(1040px, calc(100% - 48px));
  margin: 8px auto 0;
  padding: 20px 0 10px;
}

.demo-heading {
  margin-bottom: 22px;
  text-align: center;
}

.demo-heading h2 {
  margin-bottom: 8px;
  text-align: center;
}

.demo-heading p {
  margin: 0;
  color: var(--muted);
}

.demo-flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  transition: opacity 0.16s ease, filter 0.16s ease;
}

.demo-stage {
  min-width: 0;
  text-align: center;
}

.demo-label {
  display: block;
  min-height: 34px;
  margin: 0 0 13px;
  font-family: "Comic Sans Pro", "Comic Sans MS", "Comic Sans", cursive;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.12;
  transition: color 0.16s ease, opacity 0.16s ease;
}

.demo-label-input {
  color: #68778d;
}

.demo-label-baseline {
  color: #303746;
}

.demo-label-ours {
  color: #122F08;
}

.demo-image {
  --frame-color: #78899d;
  --frame-shadow: rgba(54, 67, 84, 0.16);
  --frame-hover-shadow: rgba(54, 67, 84, 0.22);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 3px solid var(--frame-color);
  border-radius: 10px;
  background: var(--frame-color);
  box-shadow: 0 12px 28px var(--frame-shadow);
  line-height: 0;
  transition: box-shadow 0.22s ease, filter 0.22s ease;
}

.demo-image-input {
  --frame-color: #8091a5;
  --frame-shadow: rgba(72, 88, 108, 0.18);
  --frame-hover-shadow: rgba(72, 88, 108, 0.24);
}

.demo-image-baseline {
  --frame-color: #303642;
  --frame-shadow: rgba(36, 42, 52, 0.20);
  --frame-hover-shadow: rgba(36, 42, 52, 0.27);
}

.demo-image-leader {
  --frame-color: #122F08;
  --frame-shadow: rgba(18, 47, 8, 0.22);
  --frame-hover-shadow: rgba(18, 47, 8, 0.30);
}

.demo-stage:hover .demo-image {
  box-shadow: 0 14px 32px var(--frame-hover-shadow);
  filter: saturate(1.03);
}

.demo-image img {
  display: block;
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  object-fit: cover;
  backface-visibility: hidden;
}

.demo-transition img {
  position: absolute;
  inset: 0;
}

.demo-transition {
  --scan-line: rgba(150, 199, 229, 0.98);
  --scan-glow: rgba(111, 170, 207, 0.34);
}

.demo-transition-final {
  --scan-line: rgba(185, 226, 164, 0.98);
  --scan-glow: rgba(101, 162, 86, 0.36);
}

.demo-transition::after {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  left: 0;
  width: 200%;
  content: "";
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent calc(50% - 12px),
    var(--scan-glow) calc(50% - 9px),
    rgba(255, 255, 255, 0.98) calc(50% - 2px),
    var(--scan-line) 50%,
    rgba(255, 255, 255, 0.94) calc(50% + 2px),
    var(--scan-glow) calc(50% + 9px),
    transparent calc(50% + 12px),
    transparent 100%
  );
  filter: drop-shadow(0 0 6px var(--scan-glow));
  opacity: 0;
  transform: translate3d(-50%, 0, 0);
  pointer-events: none;
  animation: none;
  will-change: transform, opacity;
}

.demo-flow.is-cycle-running .demo-transition::after {
  animation: demo-scan-line 2.7s cubic-bezier(.45, 0, .2, 1) 1 both;
}

.demo-flow.is-cycle-reset .demo-transition::after {
  animation: none !important;
  opacity: 0;
}

.demo-reveal {
  z-index: 2;
  clip-path: inset(0 0 0 0);
  animation: none;
  will-change: clip-path;
}

.demo-flow.is-cycle-running .demo-transition-middle .demo-reveal {
  animation: reveal-middle 2.7s cubic-bezier(.45, 0, .2, 1) 1 both;
}

.demo-flow.is-cycle-running .demo-transition-final .demo-reveal {
  animation: reveal-final 2.7s cubic-bezier(.45, 0, .2, 1) 1 both;
}

.demo-flow.is-cycle-reset .demo-reveal {
  clip-path: inset(0 100% 0 0);
  animation: none !important;
}

.flow-arrow {
  display: inline-block;
  margin-top: 26px;
  background: linear-gradient(90deg, #9b91b3 0%, #6f8992 52%, #122F08 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 5px rgba(77, 104, 105, 0.22));
  font-size: 34.1px;
  font-weight: 700;
  line-height: 1;
}

.demo-caption {
  max-width: 760px;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 11.8px;
  line-height: 1.5;
  text-align: center;
}

@keyframes reveal-middle {
  0% { clip-path: inset(0 100% 0 0); }
  80%, 100% { clip-path: inset(0 0 0 0); }
}

@keyframes reveal-final {
  0% { clip-path: inset(0 100% 0 0); }
  80%, 100% { clip-path: inset(0 0 0 0); }
}

@keyframes demo-scan-line {
  0% { opacity: 0; transform: translate3d(-50%, 0, 0); }
  5% { opacity: 1; }
  78% { opacity: 1; }
  80% { opacity: 0.95; transform: translate3d(0, 0, 0); }
  84%, 100% { opacity: 0; transform: translate3d(0, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .demo-flow,
  .demo-label {
    transition: none;
  }

  .demo-transition .demo-reveal {
    animation: none !important;
    clip-path: inset(0 0 0 0) !important;
  }

  .demo-transition::after {
    display: none;
    animation: none !important;
  }
}

.section {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px;
}

.text-section {
  max-width: 880px;
}

.abstract-band {
  margin: 0 0 28px;
  background: transparent;
}

.abstract-content {
  padding-top: 30px;
  padding-bottom: 30px;
}

h2 {
  max-width: 820px;
  margin: 0 auto 18px;
  font-size: 25.2px;
  font-weight: 500;
  line-height: 1.25;
  text-align: left;
  letter-spacing: 0;
}

.publication-header + .section h2 {
  text-align: center;
}

p {
  margin: 0 0 16px;
}

.section p {
  max-width: 820px;
  margin-right: auto;
  margin-left: auto;
}

.text-section p + ul,
.text-section ul + p {
  margin-top: 18px;
}

.section-copy {
  max-width: 820px;
  margin: 0 auto 18px;
}

ul {
  max-width: 820px;
  margin: 0 auto;
  padding-left: 28px;
}

li + li {
  margin-top: 14px;
}

figure {
  margin: 18px auto 34px;
  text-align: center;
}

img {
  display: block;
  width: min(100%, 760px);
  height: auto;
  margin: 0 auto;
}

.main-figure {
  width: min(960px, calc(100vw - 48px));
  margin-left: 50%;
  transform: translateX(-50%);
}

.main-figure img {
  width: 100%;
  max-width: 960px;
}

.figure4-wide {
  width: min(1080px, calc(100vw - 48px));
  margin-left: 50%;
  transform: translateX(-50%);
}

.figure4-wide img {
  width: 100%;
  max-width: 1080px;
}

.small-figure img {
  max-width: 430px;
}

.table-figure {
  width: min(700px, 100%);
  margin-top: 28px;
}

.table-figure img {
  width: 100%;
  max-width: none;
}

.trajectory-figure {
  width: min(1160px, calc(100vw - 48px));
  margin-left: 50%;
  transform: translateX(-50%);
}

.trajectory-figure img {
  width: 100%;
  max-width: 1160px;
}

.trajectory-figure figcaption {
  max-width: 100%;
}

.table-wide {
  width: min(1080px, calc(100vw - 48px));
  margin-left: 50%;
  transform: translateX(-50%);
}

.table-wide img {
  width: 100%;
  max-width: 1080px;
}

.paired-figure {
  width: min(980px, calc(100vw - 48px));
  margin-left: 50%;
  transform: translateX(-50%);
}

.paired-media {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.paired-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.paired-panel img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: contain;
}

.table4-large {
  width: min(680px, calc(100vw - 48px));
  margin: 18px auto 34px;
  text-align: center;
}

.table4-large img {
  width: 100%;
  max-width: none;
  margin: 0 auto;
}

.table4-large figcaption {
  max-width: 100%;
  margin: 12px auto 0;
  text-align: left;
}

figcaption {
  width: fit-content;
  max-width: 100%;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 14.3px;
  line-height: 1.5;
  text-align: left;
  overflow-wrap: anywhere;
}

.bibtex-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.bibtex-heading h2 {
  margin: 0;
}

.bibtex-copy {
  min-width: 82px;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid #cfd9d2;
  border-radius: 6px;
  background: #ffffff;
  color: #2e5b3e;
  font: 700 13.4px/1 "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  letter-spacing: 0;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.bibtex-copy:hover {
  border-color: #8eaa97;
  background: #f6faf7;
  box-shadow: 0 6px 16px rgba(46, 91, 62, 0.11);
  transform: translateY(-1px);
}

.bibtex-copy:focus-visible {
  outline: 2px solid rgba(46, 91, 62, 0.34);
  outline-offset: 3px;
}

.bibtex-copy.is-copied {
  border-color: #7fa18a;
  background: #edf6f0;
  color: #234b32;
}

pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #ffffff;
  color: #222222;
  font-size: 13.4px;
  line-height: 1.55;
  text-align: left;
}

code {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
}

@media (max-width: 760px) {
  .restoration-demo {
    width: 100%;
    margin: 8px auto 0;
    padding: 20px 0 8px;
  }

  .demo-label {
    min-height: 30px;
    margin-bottom: 10px;
    font-size: 24px;
  }

  .demo-flow {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .flow-arrow {
    margin: 0;
    transform: rotate(90deg);
  }

  main {
    padding: 0 0 54px;
  }

  .hero-band {
    padding: 34px 18px 0;
  }

  .publication-header {
    padding: 0;
  }

  .hero-card {
    padding: 20px 0 14px;
  }

  .title-lockup {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
  }

  .title-lockup::after {
    display: none;
  }

  .project-logo {
    width: 96px;
    height: 96px;
    flex-basis: 96px;
  }

  h1 {
    font-size: 30.7px;
  }

  .conference {
    font-size: 22.7px;
  }

  body {
    font-size: 14.4px;
  }

  .authors {
    font-size: 16.4px;
  }

  .institutions,
  .notes {
    font-size: 13.4px;
  }

  h2 {
    font-size: 23.5px;
  }

  figcaption {
    font-size: 13.4px;
  }

  .paired-media {
    grid-template-columns: 1fr;
  }

  .paired-panel img {
    height: auto;
  }

  .table4-large {
    width: min(100%, calc(100vw - 48px));
  }

  pre {
    font-size: 12.6px;
  }

  .pill {
    width: 100%;
  }
}
