body {
  font-family: 'Noto Sans', sans-serif;
}

/* Static, restrained page background. */
body {
  position: relative;
  background: transparent;
}

html {
  background:
    linear-gradient(180deg,
      #f5f7f9 0%,
      #f1f4f7 42%,
      #eef2f5 100%);
}

body::before,
body::after {
  content: none;
}

.hero {
  background: transparent !important;
}
.hero.is-light {
  background: rgba(255, 255, 255, 0.46) !important;
  border-top: 1px solid rgba(64, 76, 96, 0.08);
  border-bottom: 1px solid rgba(64, 76, 96, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}


.footer .icon-link {
    font-size: 25px;
    color: #000;
}

.link-block a,
.link-block button {
    margin-top: 5px;
    margin-bottom: 5px;
}

.banner {
  font-variant: small-caps;
}

/* Teaser caption below the video: larger, comfortable line-height.
 * Width follows the video container (no explicit max-width) so the
 * caption aligns with the video's left/right edges. */
.teaser-caption {
  font-size: clamp(1.05rem, 1.35vw, 1.45rem) !important;
  line-height: 1.55;
  color: #2c2c2c;
}
.teaser-caption .banner {
  font-weight: 700;
  font-size: 1.1em;
}

.teaser .hero-body {
  padding-top: 0;
  padding-bottom: 3rem;
}

.teaser {
  font-family: 'Google Sans', sans-serif;
}

/* ---- First fold: title-hero + teaser occupy exactly one viewport height ----
 * The combined white block is sized to 100vh so its bottom edge (the boundary
 * with the light-gray "Results" section) lands exactly on the bottom of the
 * screen at 100% zoom on any desktop browser. The teaser video shrinks to fit
 * the remaining vertical space (preserving its 16:9 aspect) so the block never
 * overflows past 100vh on shorter laptop screens. */
.first-fold {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: 100vh;
  box-sizing: border-box;
  overflow: hidden;
}
.first-fold .title-hero {
  flex: 0 0 auto;
  /* Push the title down from the very top edge for breathing room. */
  padding-top: clamp(1.25rem, 4vh, 3rem);
}
/* The teaser fills all remaining space and centers the video + caption. */
.first-fold .teaser {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.first-fold .teaser > .container {
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1 1 auto;
}
.first-fold .teaser .hero-body {
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1 1 auto;
  padding-top: clamp(0.5rem, 2vh, 1.5rem);
  padding-bottom: clamp(0.75rem, 2.5vh, 2rem);
}
/* The video wrapper takes all leftover vertical space; the video shrinks to
 * fit it (preserving 16:9 aspect) so the buttons above and caption below are
 * never overlapped or clipped, whatever the screen height. */
.first-fold .teaser-video-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.first-fold #teaser {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
/* Caption stays compact so it never forces the block past 100vh. */
.first-fold .teaser-caption {
  flex: 0 0 auto;
  margin-top: clamp(0.5rem, 1.5vh, 1.2rem) !important;
}


.publication-title {
}

.publication-banner {
  max-height: parent;

}

.publication-banner video {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  object-fit: fit;
}

.publication-header .hero-body {
}

.publication-title {
    font-family: 'Space Grotesk', 'Google Sans', sans-serif;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
    background: linear-gradient(120deg, #1a1a2e 0%, #2f3fb3 40%, #6a3dbf 70%, #b5178a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

/* Section headings (Results / Comparison / Methodology / BibTeX):
 * add a short gradient underline that matches the title's palette. */
.title.is-3 {
    font-family: 'Space Grotesk', 'Google Sans', sans-serif;
    font-weight: 700;
    letter-spacing: -0.015em;
    position: relative;
    display: inline-block;
    padding-bottom: 0.35em;
}
.title.is-3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 2.4em;
    height: 4px;
    border-radius: 3px;
    background: linear-gradient(90deg, #2f3fb3 0%, #6a3dbf 55%, #b5178a 100%);
    box-shadow: 0 2px 10px rgba(106, 61, 191, 0.25);
}

.publication-authors {
    font-family: 'Google Sans', sans-serif;
}

.publication-venue {
    color: #555;
    width: fit-content;
    font-weight: bold;
}

.publication-awards {
    color: #ff3860;
    width: fit-content;
    font-weight: bolder;
}

.publication-authors {
}

.publication-authors a {
   color: #5a34b8 !important;
   font-weight: 600;
   background-image: linear-gradient(90deg, #2f3fb3, #b5178a);
   background-size: 0% 2px;
   background-position: 0 100%;
   background-repeat: no-repeat;
   transition: background-size 0.25s ease, color 0.2s ease;
}

.publication-authors a:hover {
    color: #b5178a !important;
    background-size: 100% 2px;
    text-decoration: none;
}

.author-block {
  display: inline-block;
}

/* Tighten vertical spacing inside the title hero (title → authors → affil). */
.title-hero .publication-title {
  margin-bottom: 0.35rem !important;   /* was Bulma's 1.5rem */
}
.title-hero .publication-authors {
  margin-top: -0.1em;                  /* pull affil row up under names */
}

/* Force the author-names row to stay on a single centered line.
 * Uses clamp() so on narrow viewports the font shrinks smoothly
 * instead of wrapping onto two lines. `nowrap` on the container
 * plus per-block nowrap keeps each name intact.
 * `!important` overrides Bulma's `.is-size-5 { font-size: 1.25rem !important }`. */
.publication-authors.authors-line {
  white-space: nowrap;
  font-size: clamp(0.86rem, 1.7vw, 1.4rem) !important;
  font-weight: 600;
  letter-spacing: 0.005em;
  text-align: center;
}
.publication-authors.authors-line .author-block {
  white-space: nowrap;
}

/* Affiliation row: brand indigo, with the superscript index in the accent
 * magenta so it visually links to the author-name superscripts. */
.publication-authors.affiliation-line {
  color: #4a3a86;
  font-weight: 500;
}
.publication-authors.affiliation-line sup {
  color: #b5178a;
  font-weight: 600;
}

/* Equal-contribution note: keep it in-palette but a touch more prominent —
 * slightly larger and a deeper violet than a faint footnote. */
.publication-authors.equal-contrib-line {
  color: #6a5aa0;
  font-size: 1.15rem !important;
  font-weight: 500;
}
.publication-authors.equal-contrib-line sup {
  color: #b5178a;
}

.publication-banner img {
}

.publication-authors {
  /*color: #4286f4;*/
}

.publication-video {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;

    overflow: hidden;
    border-radius: 10px !important;
}

.publication-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.publication-body img {
}

.results-carousel {
  /* overflow: hidden; */
}

.results-carousel .item {
  margin: 5px;
  overflow: hidden;
  border: 1px solid #bbb;
  border-radius: 10px;
  padding: 0;
  height: 300px
}

.results-carousel video {
  margin: 0;
}


.interpolation-panel {
  background: #f5f5f5;
  border-radius: 10px;
}

.interpolation-panel .interpolation-image {
  width: 100%;
  border-radius: 5px;
}


#comparisonFootnote {
  font-size: 14px;
  background-color: #cacacab6;
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 3px 5px;
  z-index: 10;
  border-radius: 10px;
  opacity: 0%;
  transition: opacity 0.3s;
}


.tips-icon {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 10;
  border-radius: 10px;
  background-color: #cce9afc0;
  padding: 3px 6px;
  user-select: none;
}

.tips-text {
  position: absolute;
  right: 10px;
  top: 50px;
  background-color: #cce9afc0;
  border-radius: 10px;
  padding: 6px;
  font-size: 16px;
  text-align: left;
  /* display: none; */
  /* color: white; */
  max-width: 300px;
  z-index: 10;
  transition: all 0.3s;
  opacity: 0%;
  user-select: none;
}


.float-text-box {
  position: absolute;
  right: 50%;
  bottom: 10px;
  transform: translate(50%, 0);
  z-index: 10;
  border-radius: 10px;
  background: linear-gradient(120deg, #2f3fb3 0%, #6a3dbf 55%, #b5178a 100%);
  color: #ffffff;
  padding: 6px 12px;
  font-weight: 700;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(106, 61, 191, 0.45), 0 2px 6px rgba(181, 23, 138, 0.3);
}

.ruler-icon {
  width: 18px;
  height: 18px;
  color: #ffffff;
  flex-shrink: 0;
}


.tips-icon:hover + .tips-text { 
  display: block;
  opacity: 100%;
}

/* .model-container {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
} */


/* 
/* Wrapper for each model-viewer with label */
.model-wrapper {
  position: relative;
  width: 48%;
  aspect-ratio: 1;
  background-color: #f5f5f5;
  border-radius: 15px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
} */

/* Label box at the top-left of each model-viewer */
.model-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(38, 70, 126, 0.8);
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    z-index: 10;
    /* disable text selection */
    user-select: none;
}



model-viewer {
  background-color: #f2f3f5;
  border-radius: 15px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  user-select: none;
}

.dropdown-container {
  text-align: center;
  margin-bottom: 20px;
}

select {
  padding: 12px 20px;
  font-size: 18px;
  border-radius: 25px;
  border: 2px solid #577cae; 
  outline: none;
  background-color: #f1f3f5;
  color: #4a7aa5; 
  cursor: pointer;
  transition: all 0.3s ease;
}

select:hover {
  background-color: #4a7aa5;
  color: #ffffff;
}

select:focus {
  border-color: #3a5c8f;
  box-shadow: 0 0 10px rgba(90, 118, 194, 0.3);
}

.controls {
  text-align: center;
  margin-top: 30px;
}

.slider-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
}

 /* .slider-item {
  width: auto !important;
} */

.video-dynamic {
  max-height: 300px;
}

.slider-container label {
  font-size: 18px;
  font-weight: bold;
  margin-right: 15px;
  color: #4a7aa5;
}

.slider-container input[type="range"] {
  -webkit-appearance: none;
  width: 320px;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, #4a7aa5 0%, #3a5c8f 100%);
  outline: none;
  opacity: 0.9;
  transition: opacity .15s ease-in-out;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  background: #4a7aa5;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
  transition: background-color .15s ease-in-out;
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
  background-color: #3a5c8f;
}


.toggle-container {
  text-align: center;
  margin: 10px;
}

.toggle-button {
  margin: 0px;
  border: none;
  background-color: #959595;
  color: white;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s;
  user-select: none;
  height: 40px;
  width: 140px;
}

.toggle-button.toggle-left {
  border-radius: 20px 0 0 20px;
  margin-right: -2px;
}

.toggle-button.toggle-right {
  border-radius: 0 20px 20px 0;
  margin-left: -2px;
}

.toggle-button.active {
  background-color: #3a5c8f;
}

.toggle-button:not(.active):hover {
  background-color: #82c0d6;
  border-color: #82c0d6;
}

/* Carousel Container */
.custom-carousel-container {
  text-align: center;
  margin-bottom: 20px;
  margin-top: 20px;
}

.custom-carousel-btn {
  padding: 12px 30px;
  border-radius: 25px;
  border: 2px solid #599fb4;
  background-color: #599fb4;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s;
}

.custom-carousel-btn:hover {
  background-color: #82c0d6;
  border-color: #82c0d6;
}

.video-counter {
  font-size: 18px;
  font-weight: bold;
  color: #003d66;
  margin: 0 20px;
}

/* Comparison Container */
.comparison-container {
  max-width: 100%;
  margin: 0 auto;
  margin-top: 40px;
}

.comparison-labels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: bold;
  font-size: 16px;
}

.comparison-labels span {
  background-color: #f0f0f0;
  padding: 10px;
  border-radius: 5px;
}

#video-compare {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.custom-video-counter {
  font-size: 18px;
  font-weight: bold;
  color: #003d66;
  margin: 0 20px;
}

/* Additional Hover Effects for Buttons */
.custom-carousel-btn:active,
.toggle-btn:active {
  transform: scale(0.98);
  transition: transform 0.1s;
}

.interactive-mesh-section {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Distribute content evenly with space between them */
  align-items: center;
  box-sizing: border-box;
}


.interactive-mesh-container {
  padding: 20px;
  background-color: #bbd1e3; 
  border: 4px solid #f4fcfffc; 
  border-radius: 15px;
  margin-bottom: 10px;
}

.largeImageContainer {
  margin: 20px 0;
  text-align: center;
}

.largeImage {
  width: 500px;
  height: auto;
  border: 1px solid #ccc;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

#comparison_container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.model-wrapper {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(160deg, #ffffff 0%, #f2f0fb 55%, #f7eff8 100%);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(47, 63, 179, 0.16), 0 4px 14px rgba(106, 61, 191, 0.12);
  border: 1px solid rgba(106, 61, 191, 0.14);
  overflow: hidden;
}

.model-container {
  display: flex;
  justify-content: space-around;
  flex-direction: row;
  flex-wrap: nowrap;
  width: 100%;
}

.model-wrapper-comparison {
  position: relative;
  min-width: 48%;
  flex: 1;
  margin: 1%;
  aspect-ratio: 1;
  background: linear-gradient(160deg, #ffffff 0%, #f2f0fb 55%, #f7eff8 100%);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(47, 63, 179, 0.16), 0 4px 14px rgba(106, 61, 191, 0.12);
  border: 1px solid rgba(106, 61, 191, 0.14);
  overflow: hidden;
}

.model-label {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: rgba(38, 70, 126, 0.8);
  color: #ffffff;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: bold;
  z-index: 10;
  user-select: none;
}

model-viewer {
  width: 100%;
  height: 100%;
  background-color: #f2f3f5;
  border-radius: 15px;
  overflow: hidden;
  user-select: none;
}


@media (max-width: 768px) {
  .model-container {
    flex-direction: column;
    align-items: center;
  }
  
  .model-wrapper {
    width: 90%;
    margin-bottom: 20px;
  }

  .largeImage {
    max-height: calc(100vh - 150px);
  }
}



.img-button {
  background: linear-gradient(90deg, #4a7aa5, #577cae);
  border: none;
  border-radius: 25px;
  color: #ffffff;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 0px;
}

.img-button:hover {
  background: linear-gradient(90deg, #3a5c8f, #4a7aa5);
  transform: translateY(-2px);
}

.img-button:active {
  background: linear-gradient(90deg, #3a5c8f, #4a7aa5);
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.img-button:focus {
  outline: none;
  box-shadow: 0 0 8px rgba(74, 122, 165, 0.5);
}

.check-model-texture {
  position: absolute;
  right: 10px;
  bottom: 10px;
}

.carousel {
  overflow-x: hidden;
}

.carousel .item {
  margin: 0% 8% 8% 8%;
  /* min-width: 31.3%; */
}

.carousel .item video{
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  border-radius: 10px;
}

canvas.babylon-model-viewer {
  outline: none;
}

/* ===== Visualization mode toggle (Results section) ===== */
.mode-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  background: #eef2f7;
  border-radius: 999px;
  padding: 5px;
  margin: 18px auto 14px auto;
  gap: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  /* Center the inline-flex pill inside its block-level parent */
  display: flex;
  width: fit-content;
  max-width: 100%;
}

.mode-toggle-button {
  border: none;
  background: transparent;
  color: #4a5e7a;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
  user-select: none;
  white-space: nowrap;
  outline: none;
}

.mode-toggle-button:hover:not(.active) {
  background: #dde7f3;
  color: #2e4767;
}

.mode-toggle-button:active {
  transform: translateY(1px);
}

.mode-toggle-button.active {
  background: linear-gradient(135deg, #4a7aa5, #3a5c8f);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(58, 92, 143, 0.35);
}

.mode-toggle-button .icon {
  font-size: 14px;
  width: 1em;
  text-align: center;
}

@media (max-width: 640px) {
  .mode-toggle-button {
    padding: 8px 14px;
    font-size: 13px;
  }
  .mode-toggle-button .icon {
    display: none;
  }
}

/* ===== Depth map overlay (sits inside .model-wrapper) ===== */
.depth-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f5f5f5;
  border-radius: 15px;
  z-index: 6;
  user-select: none;
  pointer-events: none;
}

/* ===== "Coming soon" placeholder overlay ===== */
.mode-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 245, 245, 0.85);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: 15px;
  z-index: 20;
}

.mode-overlay[hidden] {
  display: none;
}

.mode-overlay-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 24px 36px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.12);
  text-align: center;
  max-width: 80%;
}

.mode-overlay-icon {
  font-size: 38px;
  margin-bottom: 6px;
}

.mode-overlay-title {
  font-size: 20px;
  font-weight: 700;
  color: #3a5c8f;
  margin-bottom: 4px;
}

.mode-overlay-text {
  font-size: 14px;
  color: #5a6b82;
}

/* ===== Comparison section (dual model-viewer, ported from MoGePage) ===== */

#comparison_container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.model-container {
  display: flex;
  justify-content: space-around;
  flex-direction: row;
  flex-wrap: nowrap;
  width: 100%;
}

.model-wrapper-comparison {
  position: relative;
  min-width: 48%;
  flex: 1;
  margin: 1%;
  aspect-ratio: 1;
  background-color: #f5f5f5;
  border-radius: 15px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.model-label {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: rgba(38, 70, 126, 0.8);
  color: #ffffff;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: bold;
  z-index: 10;
  user-select: none;
}

model-viewer {
  width: 100%;
  height: 100%;
  background-color: #f2f3f5;
  border-radius: 15px;
  overflow: hidden;
  user-select: none;
}

/* Tips popover (top-right of right viewer) */
.tips-icon {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 10;
  border-radius: 10px;
  background-color: #cce9afc0;
  padding: 3px 6px;
  user-select: none;
}

.tips-text {
  position: absolute;
  right: 10px;
  top: 50px;
  background-color: #cce9afc0;
  border-radius: 10px;
  padding: 6px;
  font-size: 16px;
  text-align: left;
  max-width: 300px;
  z-index: 10;
  transition: all 0.3s;
  opacity: 0%;
  user-select: none;
}

.tips-icon:hover + .tips-text {
  display: block;
  opacity: 100%;
}

#comparisonFootnote {
  font-size: 14px;
  background-color: #cacacab6;
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 3px 5px;
  z-index: 10;
  border-radius: 10px;
  opacity: 0%;
  transition: opacity 0.3s;
}

/* Geometry / Textured pill toggle */
.toggle-container {
  text-align: center;
  margin: 10px;
}

.toggle-button {
  margin: 0px;
  border: none;
  background-color: #959595;
  color: white;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s;
  user-select: none;
  height: 40px;
  width: 140px;
}

.toggle-button.toggle-left {
  border-radius: 20px 0 0 20px;
  margin-right: -2px;
}

.toggle-button.toggle-right {
  border-radius: 0 20px 20px 0;
  margin-left: -2px;
}

.toggle-button.active {
  background-color: #3a5c8f;
}

.toggle-button:not(.active):hover {
  background-color: #82c0d6;
  border-color: #82c0d6;
}

/* Baseline dropdown (sits on top-left of right viewer, replaces .model-label) */
select#comparisonBaselineSelection {
  padding: 5px 10px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 10px;
  border: none;
  outline: none;
  background-color: rgba(38, 70, 126, 0.8);
  color: #ffffff;
  cursor: pointer;
}

select#comparisonBaselineSelection option {
  background-color: #ffffff;
  color: #26467e;
}

@media (max-width: 768px) {
  .model-container {
    flex-direction: column;
    align-items: center;
  }
  .model-wrapper-comparison {
    width: 90%;
    min-width: unset;
    margin-bottom: 20px;
  }
}

/* ===== Unified button styling (v=6) ===== */

/* Section titles (Results / Methodology / Comparison...): clean modern
   display font (Space Grotesk) with a brand-gradient text fill. */
.title.is-3 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(120deg, #2f3fb3 0%, #6a3dbf 55%, #b5178a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Override the legacy gray rectangular toggle (Comparison: Geometry/Textured)
   to match the .mode-toggle pill style used in Results. */
#toggleTexturedComparison.toggle-container {
  display: inline-flex;
  background: #eef2f7;
  border-radius: 999px;
  padding: 5px;
  margin: 18px auto 14px auto;
  gap: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  width: fit-content;
}

#toggleTexturedComparison .toggle-button {
  border: none;
  background: transparent;
  color: #4a5e7a;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 22px;
  height: auto;
  width: auto;
  border-radius: 999px !important;
  margin: 0 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
  user-select: none;
  white-space: nowrap;
  outline: none;
}

#toggleTexturedComparison .toggle-button:hover:not(.active) {
  background: #dde7f3;
  color: #2e4767;
}

#toggleTexturedComparison .toggle-button:active {
  transform: translateY(1px);
}

#toggleTexturedComparison .toggle-button.active {
  background: linear-gradient(135deg, #4a7aa5, #3a5c8f);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(58, 92, 143, 0.35);
}

#toggleTexturedComparison .toggle-button .icon {
  font-size: 14px;
  width: 1em;
  text-align: center;
  margin-right: 0;
}

/* Publication links (Paper / arXiv / Code / Demo) — restyle to match pill family */
.publication-links .button.is-dark {
  background: linear-gradient(135deg, #4a7aa5, #3a5c8f) !important;
  border: none !important;
  color: #ffffff !important;
  border-radius: 999px !important;
  font-weight: 600;
  padding: 0 22px;
  box-shadow: 0 3px 10px rgba(58, 92, 143, 0.25);
  transition: transform 0.1s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.publication-links .button.is-dark:hover {
  filter: brightness(1.08);
  box-shadow: 0 5px 14px rgba(58, 92, 143, 0.4);
}

.publication-links .button.is-dark:active {
  transform: translateY(1px);
}

/* ===== Unify Tips popovers with measure box (v=10) ===== */
.tips-icon {
  background-color: rgba(38, 70, 126, 0.88);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.tips-text {
  background-color: rgba(38, 70, 126, 0.95);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.tips-text b {
  color: #ffffff;
}

/* ===== BibTeX block (v=11) ===== */
#BibTeX .bibtex-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0.6em;
}

.bibtex-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: linear-gradient(135deg, #4a7aa5, #3a5c8f);
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(58, 92, 143, 0.25);
  transition: filter 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
  user-select: none;
}

.bibtex-copy-btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 5px 14px rgba(58, 92, 143, 0.4);
}

.bibtex-copy-btn:active {
  transform: translateY(1px);
}

.bibtex-copy-btn.copied {
  background: linear-gradient(135deg, #3aa56f, #287a52);
  box-shadow: 0 3px 10px rgba(40, 122, 82, 0.35);
}

#BibTeX pre.bibtex-block {
  background: #ececec;
  color: #1f2937;
  padding: 1.2em 1.4em;
  border-radius: 14px;
  border: 1px solid #d8d8d8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: 13.5px;
  line-height: 1.55;
}

#BibTeX pre.bibtex-block code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  white-space: pre;
}

/* ============================================================================
 * Unified brand button + control theme.
 * Everything interactive shares the title's blue → violet → magenta gradient
 * for a cohesive, on-brand look. Placed last so it overrides earlier rules
 * (including duplicate blocks and Bulma's `is-dark`).
 * ==========================================================================*/

/* ---- Header links: Paper / arXiv / Code / Demo ---- */
.publication-links .external-link.button {
  background-image: linear-gradient(120deg, #2f3fb3 0%, #6a3dbf 55%, #b5178a 100%) !important;
  background-color: transparent !important;
  border: none !important;
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 3px 12px rgba(106, 61, 191, 0.32) !important;
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.publication-links .external-link.button:hover {
  color: #ffffff !important;
  filter: brightness(1.07);
  box-shadow: 0 6px 18px rgba(181, 23, 138, 0.4) !important;
  transform: translateY(-1px);
}
.publication-links .external-link.button:active {
  transform: translateY(0);
}
.publication-links .external-link.button .icon,
.publication-links .external-link.button .icon * {
  color: #ffffff !important;
}

/* ---- "💡Tips" pill (top-right of every viewer) ---- */
.tips-icon {
  background: linear-gradient(120deg, #2f3fb3 0%, #6a3dbf 55%, #b5178a 100%) !important;
  color: #ffffff;
  font-weight: 700;
  padding: 4px 9px !important;
  box-shadow: 0 3px 10px rgba(106, 61, 191, 0.35);
  cursor: help;
}
/* Tooltip body: light glass tinted with brand color, with a brand left accent. */
.tips-text {
  background: rgba(255, 255, 255, 0.96) !important;
  color: #34324a;
  border: 1px solid rgba(106, 61, 191, 0.18);
  border-left: 3px solid #6a3dbf;
  border-radius: 12px !important;
  padding: 10px 14px !important;
  box-shadow: 0 10px 26px rgba(47, 63, 179, 0.16);
  line-height: 1.15;
}
.tips-text p {
  position: relative;
  margin: 0;
  padding: 3px 0 3px 15px;
}
/* Small, tasteful brand-colored bullet (replaces the oversized black ●). */
.tips-text p::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6a3dbf, #b5178a);
}
.tips-text b { color: #6a3dbf; font-weight: 700; }

/* ---- Comparison Geometry / Textured segmented toggle ---- */
/* Nested-pill segmented control: one BIG outer pill (light gray track) that
   wraps small individual pills — each button is its own rounded capsule with a
   little breathing room around it. The active small pill is filled with the
   brand gradient. The Results tabs below use the exact same look. */
.toggle-container {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: 18px auto 14px auto;
  padding: 5px !important;
  gap: 5px;
  border-radius: 999px;
  background: #eef2f7;
  box-shadow: inset 0 1px 3px rgba(47, 63, 179, 0.08);
}
.toggle-button {
  background: #ffffff !important;
  color: #4a4a63 !important;
  border: none !important;
  border-radius: 999px !important;
  box-shadow: 0 1px 2px rgba(47, 63, 179, 0.08) !important;
  margin: 0 !important;
  transition: background 0.2s ease, color 0.2s ease;
}
.toggle-button.toggle-left,
.toggle-button.toggle-right {
  border-radius: 999px !important;
  margin: 0 !important;
}
.toggle-button:not(.active):hover {
  background: rgba(240, 236, 251, 0.95) !important;
  color: #2f3fb3 !important;
}
.toggle-button.active {
  background: linear-gradient(120deg, #2f3fb3 0%, #6a3dbf 55%, #b5178a 100%) !important;
  color: #ffffff !important;
}

/* ---- Results visualization tabs ---- */
/* Same nested-pill look as the Comparison control: one big outer pill wrapping
   small individual pills — just three segments instead of two. */
.mode-toggle {
  display: flex !important;
  width: fit-content;
  max-width: 100%;
  flex-wrap: nowrap;
  gap: 5px !important;
  margin: 18px auto 14px auto !important;
  padding: 5px !important;
  border: none !important;
  border-radius: 999px !important;
  background: #eef2f7 !important;
  box-shadow: inset 0 1px 3px rgba(47, 63, 179, 0.08) !important;
}
.mode-toggle-button {
  background: #ffffff !important;
  color: #4a4a63 !important;
  border: none !important;
  border-radius: 999px !important;
  box-shadow: 0 1px 2px rgba(47, 63, 179, 0.08) !important;
}
.mode-toggle-button.active {
  background: linear-gradient(120deg, #2f3fb3 0%, #6a3dbf 55%, #b5178a 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
.mode-toggle-button:hover:not(.active) {
  background: rgba(240, 236, 251, 0.95) !important;
  color: #2f3fb3 !important;
}

/* ---- BibTeX copy button ---- */
.bibtex-copy-btn {
  background: linear-gradient(120deg, #2f3fb3 0%, #6a3dbf 55%, #b5178a 100%) !important;
  box-shadow: 0 3px 12px rgba(106, 61, 191, 0.32) !important;
}
.bibtex-copy-btn:hover {
  box-shadow: 0 6px 18px rgba(181, 23, 138, 0.4) !important;
}
/* Keep the "Copied!" success state visually distinct (green). */
.bibtex-copy-btn.copied {
  background: linear-gradient(135deg, #3aa56f, #287a52) !important;
  box-shadow: 0 3px 10px rgba(40, 122, 82, 0.35) !important;
}

/* ============================================================================
 * Scroll performance: skip layout + paint for these heavy sections while they
 * are off-screen. `content-visibility: auto` lets the browser bypass rendering
 * work for the subtree until it scrolls near the viewport; `contain-intrinsic-
 * size` reserves an approximate height so the scrollbar doesn't jump. Applied
 * only to sections WITHOUT a WebGL canvas (Methodology, BibTeX) so the 3D
 * viewers' sizing/animation is never affected.
 * ==========================================================================*/
#BibTeX {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

/* ---- Comparison baseline dropdown: match the brand button family ---- */
select#comparisonBaselineSelection {
  background: linear-gradient(120deg, #2f3fb3 0%, #6a3dbf 55%, #b5178a 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 5px 14px !important;
  box-shadow: 0 3px 10px rgba(106, 61, 191, 0.35) !important;
  transition: filter 0.2s ease, box-shadow 0.2s ease;
}
select#comparisonBaselineSelection:hover {
  filter: brightness(1.07);
  box-shadow: 0 5px 14px rgba(181, 23, 138, 0.4) !important;
}
select#comparisonBaselineSelection option {
  background-color: #ffffff !important;
  color: #2f3fb3 !important;
  font-weight: 600;
}

/* ---- "MoGe-3 (Ours)" label: match the baseline dropdown / brand family ---- */
.model-label {
  background: linear-gradient(120deg, #2f3fb3 0%, #6a3dbf 55%, #b5178a 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 5px 14px !important;
  font-weight: 700 !important;
  box-shadow: 0 3px 10px rgba(106, 61, 191, 0.35) !important;
}

/* ---- Scroll-reveal: sections float in on scroll-down, collapse on scroll-away ---- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(42px);
    transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: opacity, transform;
  }

  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Drag hint: hand + click-ripple wiggling to show the point cloud is draggable ---- */
.drag-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  pointer-events: none;
  z-index: 6;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s ease;
  /* horizontal offset is driven by JS (var --swipe) so it stays perfectly in
     sync with the programmatic camera rotation of the point cloud */
  transform: translateX(var(--swipe, 0px));
}

/* soft brand-tinted disc, centred on the fingertip so the white pulse stays
   readable over any (incl. light) point cloud background */
.drag-hint::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  margin: -40px 0 0 -21px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 63, 179, 0.42) 0%, rgba(106, 61, 191, 0.32) 55%, rgba(106, 61, 191, 0) 100%);
  box-shadow: 0 4px 12px rgba(47, 63, 179, 0.3);
}

.drag-hint.is-active {
  opacity: 1;
  visibility: visible;
}

.drag-hint-hand,
.drag-hint-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
}

.drag-hint-hand {
  width: 42px;
  height: 42px;
  margin: -19px 0 0 -13px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

.drag-hint-ripple {
  width: 22px;
  height: 22px;
  /* centred on the fingertip of the pointing hand (top area of the svg) */
  margin: -23px 0 0 -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.35) 55%, rgba(255, 255, 255, 0) 72%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
  animation: dragHintPulse 2.2s ease-in-out infinite;
}

/* ripple pulses at the swipe turning points to suggest a click/press */
@keyframes dragHintPulse {
  0%, 100% { transform: scale(1);   opacity: 0.9; }
  25%      { transform: scale(0.55); opacity: 0.45; }
  50%      { transform: scale(1);   opacity: 0.9; }
  75%      { transform: scale(0.55); opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  .drag-hint { display: none; }
}


/* ===================================================================
   Right-side section shortcut nav
   =================================================================== */
.right-rail {
  position: fixed;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.section-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 28px rgba(47, 63, 179, 0.14);
  border: 1px solid rgba(106, 61, 191, 0.14);
}
.section-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  text-decoration: none;
  color: #5a4a92;
  font-family: 'Space Grotesk', 'Google Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, color 0.2s ease;
  justify-content: flex-end;
}
.section-nav-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: rgba(106, 61, 191, 0.32);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.section-nav-label {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.28s ease, opacity 0.22s ease;
}
.section-nav:hover .section-nav-label,
.section-nav-link:focus-visible .section-nav-label {
  max-width: 120px;
  opacity: 1;
}
.section-nav-link:hover {
  background: rgba(106, 61, 191, 0.1);
  color: #b5178a;
}
.section-nav-link:hover .section-nav-dot {
  background: #6a3dbf;
}
.section-nav-link.is-active {
  color: #b5178a;
}
.section-nav-link.is-active .section-nav-dot {
  background: linear-gradient(120deg, #2f3fb3, #b5178a);
  transform: scale(1.35);
  box-shadow: 0 0 0 4px rgba(181, 23, 138, 0.14);
}

/* Hide the shortcut navigation on small screens. */
@media (max-width: 900px) {
  .right-rail { display: none; }
}

/* ===================================================================
   Methodology overview and progressive refinement
   =================================================================== */
.method-overview-figure {
  position: relative;
  z-index: 4;
  width: 100%;
  margin: 0.45rem 0 1.35rem;
  overflow: visible;
}
.method-overview-figure:has(.method-unet-trigger:hover),
.method-overview-figure:has(.method-unet-trigger:focus),
.method-overview-figure:has(.method-unet-trigger:focus-visible),
.method-overview-figure.is-unet-open {
  z-index: 40;
}
.method-overview-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.method-unet-trigger {
  position: absolute;
  z-index: 8;
  left: 65.2%;
  top: 30%;
  width: 10.25%;
  height: 43%;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: help;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.method-unet-trigger-icon {
  position: absolute;
  top: -12px;
  right: -12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #5b3fc4 0%, #7a4fe0 62%, #a345c7 100%);
  box-shadow: 0 5px 14px rgba(86, 54, 168, 0.38);
  font-size: 0.72rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.method-unet-trigger:hover,
.method-unet-trigger:focus,
.method-unet-trigger:focus-visible,
.method-overview-figure.is-unet-open .method-unet-trigger {
  outline: none;
  border-color: rgba(122, 79, 224, 0.78);
  background: rgba(122, 79, 224, 0.08);
  box-shadow: 0 0 0 4px rgba(122, 79, 224, 0.13);
}
.method-unet-trigger:hover .method-unet-trigger-icon,
.method-unet-trigger:focus-visible .method-unet-trigger-icon,
.method-overview-figure.is-unet-open .method-unet-trigger-icon {
  transform: translateY(-1px) scale(1.06);
  box-shadow: 0 7px 18px rgba(86, 54, 168, 0.48);
}
.method-unet-popover {
  position: absolute;
  z-index: 30;
  left: 0;
  top: calc(100% + 8px);
  width: 100%;
  margin: 0;
  padding: 3px;
  border: 2px solid rgba(122, 79, 224, 0.76);
  border-radius: 10px;
  background: rgba(245, 242, 255, 0.96);
  box-shadow: 0 16px 40px rgba(86, 54, 168, 0.24), 0 0 0 4px rgba(122, 79, 224, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px) scale(0.985);
  transform-origin: 70% 0;
  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
}
.method-unet-popover > img {
  border-radius: 7px;
}
.method-unet-trigger:hover + .method-unet-popover,
.method-unet-trigger:focus + .method-unet-popover,
.method-unet-trigger:focus-visible + .method-unet-popover,
.method-overview-figure.is-unet-open .method-unet-popover,
.method-unet-popover:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.method-diagram {
  --connector: #8ba0aa;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 16px;
  align-items: stretch;
  margin: 0.4rem 0 1.25rem;
  overflow: visible;
}
.method-diagram-scroll { overflow: visible; }
.method-module {
  position: relative;
  min-width: 0;
  min-height: 300px;
  padding: 58px 18px 44px;
  border: 1px solid rgba(72, 83, 176, 0.22);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(47, 63, 179, 0.16), 0 4px 12px rgba(106, 61, 191, 0.09);
  overflow: visible;
}
.method-module-base {
  background: linear-gradient(145deg, #dcecff 0%, #e8edfb 56%, #eee5fb 100%);
}
.method-module-ssr {
  background: linear-gradient(145deg, #ffe5dc 0%, #f4e7f4 48%, #dff0f1 100%);
  border-color: rgba(181, 23, 138, 0.2);
}
.method-module-label {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 3;
  margin: 0;
  padding: 7px 12px;
  border-radius: 999px;
  color: #292a3f;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 4px 12px rgba(47, 63, 179, 0.15);
  font-family: 'Space Grotesk', 'Google Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.method-module-label span { color: #2f3fb3; }
.method-module-label i { color: #6a3dbf; }
.base-pipeline,
.ssr-pipeline {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}
.method-image-node {
  flex: 0 0 62px;
  margin: 0;
  text-align: center;
}
.method-image-node img {
  display: block;
  width: 62px;
  height: 62px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 7px;
  box-shadow: 0 4px 12px rgba(36, 42, 80, 0.18);
}
.method-image-node figcaption,
.structure-node b,
.final-output,
.method-output-copy {
  margin-top: 7px;
  color: #303142;
  font-family: 'Space Grotesk', 'Google Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}
.method-process {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 70px;
  min-height: 70px;
  padding: 8px 7px;
  border: 1px solid rgba(47, 63, 179, 0.18);
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(145deg, #537fa0, #4f6fa0 58%, #68558f);
  box-shadow: 0 6px 16px rgba(47, 63, 179, 0.2);
  font-family: 'Space Grotesk', 'Google Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}
.method-process-secondary {
  min-height: 53px;
  background: linear-gradient(145deg, #4e8ca0, #5d719f);
}
.method-branch,
.method-outputs {
  display: flex;
  flex: 0 0 76px;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
}
.method-outputs {
  flex-basis: 72px;
  align-items: center;
}
.method-output-copy { margin: 0; text-align: center; }
.method-pointmap-node { flex-basis: 70px; }
.method-pointmap-node img { width: 70px; height: 70px; }
.method-arrow {
  position: relative;
  flex: 1 1 18px;
  min-width: 13px;
  max-width: 28px;
  height: 2px;
  margin: 0 4px;
  background: var(--connector);
}
.method-arrow::after,
.module-bridge::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -1px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--connector);
  border-right: 2px solid var(--connector);
  transform: translateY(-50%) rotate(45deg);
}
.feature-origin,
.feature-target {
  position: absolute;
  bottom: 13px;
  display: grid;
  grid-template-columns: repeat(3, 10px);
  gap: 3px;
  color: #4b526a;
  font: 700 0.66rem/1 'Space Grotesk', 'Google Sans', sans-serif;
  text-align: center;
}
.feature-origin { left: 45%; }
.feature-target { left: 45%; }
.feature-origin span,
.feature-target span {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #62a6b7;
}
.feature-origin span:nth-child(2n),
.feature-target span:nth-child(2n) { background: #7d8fc5; }
.feature-origin b,
.feature-target b { grid-column: 1 / -1; white-space: nowrap; }
.module-bridge {
  position: absolute;
  z-index: 5;
  top: 51%;
  left: calc(44% - 7px);
  width: 30px;
  height: 3px;
  background: var(--connector);
  transform: translateY(-50%);
}
.feature-bridge {
  position: absolute;
  z-index: 4;
  left: 21%;
  bottom: 28px;
  width: 42%;
  height: 18px;
  border-bottom: 2px solid var(--connector);
  border-right: 2px solid var(--connector);
  color: #66717a;
  pointer-events: none;
}
.feature-bridge::after {
  content: "";
  position: absolute;
  right: -5px;
  top: -1px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--connector);
  border-right: 2px solid var(--connector);
  transform: rotate(-45deg);
}
.feature-bridge b {
  position: absolute;
  right: 12px;
  bottom: 4px;
  padding: 0 5px;
  background: #e4ebf2;
  font: 600 0.6rem/1 'Space Grotesk', 'Google Sans', sans-serif;
}
.method-voxelize {
  flex-basis: 38px;
  min-height: 78px;
  padding: 5px;
  color: #34354a;
  background: #dce5c9;
  writing-mode: vertical-rl;
}
.structure-node {
  flex: 0 0 70px;
  text-align: center;
}
.structure-cubes {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  margin: 0 auto;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(145deg, #6bb4c3, #5b91ae);
  box-shadow: 0 6px 15px rgba(62, 124, 149, 0.23);
  font-size: 2rem;
}
.method-unet {
  position: relative;
  flex-basis: 78px;
  min-height: 92px;
  border-radius: 20px 7px 20px 7px;
  cursor: pointer;
}
.unet-detail-icon {
  position: absolute;
  top: -11px;
  right: -11px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #2f3fb3, #6a3dbf 58%, #b5178a);
  box-shadow: 0 4px 12px rgba(72, 63, 179, 0.35);
  font-size: 0.7rem;
}
.unet-hotspot:hover,
.unet-hotspot:focus,
.unet-hotspot:focus-visible {
  outline: none;
  border-color: #b5178a;
  box-shadow: 0 0 0 4px rgba(181, 23, 138, 0.13), 0 8px 20px rgba(47, 63, 179, 0.24);
}
.final-output {
  flex: 0 0 48px;
  margin: 0;
  text-align: center;
}
.iteration-rail {
  position: absolute;
  top: 37px;
  right: 15%;
  width: 66%;
  height: 20px;
  border-top: 2px solid rgba(106, 61, 191, 0.42);
  border-left: 2px solid rgba(106, 61, 191, 0.42);
  border-radius: 8px 0 0;
}
.iteration-rail::before {
  content: "";
  position: absolute;
  left: -5px;
  bottom: -1px;
  width: 8px;
  height: 8px;
  border-left: 2px solid #6a3dbf;
  border-bottom: 2px solid #6a3dbf;
  transform: rotate(-45deg);
}
.iteration-rail span {
  position: absolute;
  top: -14px;
  right: 0;
  padding: 4px 8px;
  border-radius: 999px;
  color: #5a5271;
  background: #dddaf0;
  font: 700 0.65rem/1 'Space Grotesk', 'Google Sans', sans-serif;
}

/* Fixed-coordinate stage: every node and connector shares one 1000x320 plane. */
.method-diagram {
  display: block;
  width: 100%;
  aspect-ratio: 1000 / 320;
  min-height: 0;
}
.method-module {
  position: absolute;
  top: 0;
  height: 100%;
  min-height: 0;
  padding: 0;
}
.method-module-base {
  left: 0;
  width: 43%;
}
.method-module-ssr {
  left: 45%;
  width: 55%;
}
.method-module .method-image-node,
.method-module .method-process,
.method-module .method-output-copy,
.method-module .structure-node,
.method-module .final-output,
.method-module .feature-grid {
  position: absolute;
  z-index: 4;
  margin: 0;
}
.method-module .method-process { width: 70px; }
.method-module .method-output-copy { width: 70px; }
.method-module .structure-node { width: 70px; }
.method-module .final-output { width: 48px; }
.method-module .method-voxelize { width: 38px; }
.method-module .method-unet { width: 78px; }
.node-input { left: 4.4%; top: 38%; }
.node-vit { left: 26%; top: 39%; }
.node-other { left: 53.2%; top: 20%; }
.node-point { left: 53.2%; top: 52%; }
.node-aux { left: 79.5%; top: 24%; }
.node-initial { left: 78.4%; top: 52%; }
.feature-origin { left: 47%; bottom: 7%; }
.node-voxelize { left: 5.8%; top: 50%; }
.node-structure { left: 19%; top: 53%; }
.node-unet { left: 38.2%; top: 47.5%; }
.node-refined { left: 59.5%; top: 52%; }
.node-final { left: 80%; top: 56%; }
.feature-target { left: 43%; bottom: 7%; }
.method-connectors {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.method-connectors path {
  fill: none;
  stroke: #879da7;
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
  marker-end: url(#methodArrow);
}
.method-connectors .connector-feature path {
  stroke: #728da2;
}
.method-connectors .connector-iteration path {
  stroke: #8a5fe0;
  marker-end: url(#methodArrowPurple);
}
.method-connectors marker path {
  stroke: none;
  marker-end: none;
  fill: #879da7;
}
.method-connectors #methodArrowPurple path { fill: #8a5fe0; }
.feature-path-label {
  fill: #627684;
  font-family: 'Space Grotesk', 'Google Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-anchor: middle;
}
.iteration-rail {
  z-index: 5;
  top: 10%;
  right: 7%;
  width: auto;
  height: auto;
  border: 0;
}
.iteration-rail::before { display: none; }
.iteration-rail span {
  position: static;
  display: block;
}
.method-summary {
  position: relative;
  z-index: 1;
  max-width: 1050px;
  margin: 0 auto;
}
.method-summary p {
  color: #34344b;
  line-height: 1.65;
}

.unet-popover {
  position: absolute;
  z-index: 20;
  left: -64%;
  top: 76%;
  width: 158%;
  padding: 10px;
  border: 1px solid rgba(72, 83, 176, 0.26);
  border-radius: 8px;
  background: linear-gradient(145deg, #edf8f8 0%, #edf2ff 50%, #f7edfb 100%);
  box-shadow: 0 22px 55px rgba(34, 39, 96, 0.28), 0 7px 18px rgba(106, 61, 191, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(0.98);
  transform-origin: 70% 0;
  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
}
.unet-popover::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 67%;
  width: 16px;
  height: 16px;
  border-left: 1px solid rgba(72, 83, 176, 0.26);
  border-top: 1px solid rgba(72, 83, 176, 0.26);
  background: #eef2ff;
  transform: rotate(45deg);
}
.unet-popover img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  border-radius: 5px;
  filter: saturate(1.22) contrast(1.08);
}
.method-card-ssr:has(.unet-hotspot:hover) .unet-popover,
.method-card-ssr:has(.unet-hotspot:focus) .unet-popover,
.method-card-ssr:has(.unet-hotspot:focus-visible) .unet-popover,
.method-card-ssr.is-unet-open .unet-popover,
.unet-popover:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.method-refinement {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.4fr) minmax(0, 0.6fr);
  gap: 24px;
  align-items: start;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(106, 61, 191, 0.18);
}
.method-refinement::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 130px;
  height: 3px;
  background: linear-gradient(90deg, #2f3fb3, #6a3dbf, #b5178a);
}
.method-subheading {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: 4px;
  text-align: left;
}
.method-kicker {
  display: inline-block;
  margin-bottom: 0.7rem;
  color: #6a3dbf;
  font-family: 'Space Grotesk', 'Google Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.method-subheading h3 {
  margin: 0 0 0.45rem;
  color: #24224a;
  font-family: 'Space Grotesk', 'Google Sans', sans-serif;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  font-weight: 700;
}
.method-subheading p {
  margin: 0;
  color: #4a4a61;
  line-height: 1.6;
}
.method-refinement-plot {
  width: 100%;
  aspect-ratio: 1;
  margin: 0.7rem 0 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(47, 63, 179, 0.16), 0 4px 12px rgba(106, 61, 191, 0.12);
  border: 1px solid rgba(106, 61, 191, 0.16);
  background: rgba(255, 255, 255, 0.72);
}
.method-refinement-plot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}
.method-refinement-range {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 0.75rem;
  color: #6a5aa0;
  font-family: 'Space Grotesk', 'Google Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
}
.method-refinement-range i {
  position: relative;
  flex: 1 1 auto;
  max-width: 86px;
  height: 2px;
  background: linear-gradient(90deg, #2f3fb3, #6a3dbf, #b5178a);
}
.method-refinement-range i::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -1px;
  width: 6px;
  height: 6px;
  border-top: 2px solid #b5178a;
  border-right: 2px solid #b5178a;
  transform: translateY(-50%) rotate(45deg);
}
.method-refinement-stage {
  min-width: 0;
}
.method-refinement-stage .mode-toggle {
  margin: 0 auto 9px !important;
  padding: 4px;
}
.method-refinement-stage .mode-toggle-button {
  padding: 7px 14px;
  font-size: 0.8rem;
  gap: 6px;
}
.method-refinement-stage .method-refine-viewer {
  height: 399px;
  aspect-ratio: auto !important;
  border-radius: 12px;
}
.method-refinement-stage .refine-step-badge {
  top: 12px;
  left: 12px;
  padding: 7px 14px;
  font-size: 1.05rem;
  box-shadow: 0 4px 14px rgba(106, 61, 191, 0.34);
}
.method-refine-viewer {
  box-shadow: 0 14px 38px rgba(47, 63, 179, 0.17), 0 4px 14px rgba(106, 61, 191, 0.11);
}

.refine-intro {
  max-width: 1000px;
  margin: 0.2em auto 1.1em;
}
.refine-intro p { color: #3a3a52; }

/* Original input image shown as a thumbnail below the viewer; hover enlarges. */
.refine-input-preview {
  margin: 18px auto 0;
  text-align: center;
}
.refine-input-preview img {
  max-width: 150px;
  width: 24%;
  min-width: 110px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(40, 30, 80, 0.2);
  border: 3px solid rgba(255, 255, 255, 0.85);
  cursor: zoom-in;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.refine-input-preview img:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 26px rgba(40, 30, 80, 0.3);
}
.refine-input-preview figcaption {
  margin-top: 7px;
  font-family: 'Space Grotesk', 'Google Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #6a3dbf;
}

/* Step badge overlaid on the viewer top-left. */
.refine-step-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 5;
  padding: 10px 22px;
  border-radius: 999px;
  font-family: 'Space Grotesk', 'Google Sans', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(120deg, #2f3fb3 0%, #6a3dbf 55%, #b5178a 100%);
  box-shadow: 0 6px 20px rgba(106, 61, 191, 0.38);
  pointer-events: none;
  white-space: nowrap;
}

/* Loading spinner overlay. */
.refine-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.refine-loading[hidden] { display: none; }
.refine-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(106, 61, 191, 0.25);
  border-top-color: #6a3dbf;
  animation: refineSpin 0.8s linear infinite;
}
@keyframes refineSpin { to { transform: rotate(360deg); } }

/* ---- Slider row ---- */
.refine-slider-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 760px;
  margin: 1.1em auto 1.4em;
  padding: 0 6px;
}
.method-refinement-stage .refine-slider-wrap {
  max-width: none;
  margin: 0.85rem auto 0;
}
.refine-slider-end {
  flex: 0 0 auto;
  font-family: 'Space Grotesk', 'Google Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #6a5aa0;
  white-space: nowrap;
}
.refine-slider-core {
  position: relative;
  flex: 1 1 auto;
}

/* The range input itself, cross-browser styled. */
.refine-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, #2f3fb3 0%, #6a3dbf 55%, #b5178a 100%) 0 / var(--fill, 0%) 100% no-repeat,
    rgba(106, 61, 191, 0.16);
  outline: none;
  cursor: pointer;
  transition: background-size 0.12s ease;
}
.refine-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #6a3dbf;
  box-shadow: 0 3px 10px rgba(106, 61, 191, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.refine-slider::-webkit-slider-thumb:hover { transform: scale(1.12); }
.refine-slider:active::-webkit-slider-thumb {
  transform: scale(1.18);
  box-shadow: 0 0 0 6px rgba(106, 61, 191, 0.16), 0 3px 10px rgba(106, 61, 191, 0.4);
}
.refine-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #6a3dbf;
  box-shadow: 0 3px 10px rgba(106, 61, 191, 0.4);
}
.refine-slider::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f3fb3, #6a3dbf, #b5178a);
}
.refine-slider::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(106, 61, 191, 0.16);
}
.refine-slider:focus-visible {
  box-shadow: 0 0 0 4px rgba(181, 23, 138, 0.16);
}

/* Numeric tick labels aligned under each stop. */
.refine-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 1px;
}
.refine-ticks span {
  font-family: 'Space Grotesk', 'Google Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #8579b3;
  cursor: pointer;
  width: 1.4em;
  text-align: center;
  transition: color 0.15s ease, transform 0.15s ease;
}
.refine-ticks span:hover { color: #b5178a; transform: translateY(-1px); }

/* ==================== Quantitative comparison ==================== */
.quantitative-comparison {
  width: 100%;
  margin: 2.1rem 0 1.4rem;
  padding-top: 1.7rem;
  border-top: 1px solid rgba(64, 76, 96, 0.12);
}
.quantitative-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 0.8rem;
}
.quantitative-heading h3 {
  margin: 0;
  color: #242b3d;
  font-family: 'Space Grotesk', 'Google Sans', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  white-space: nowrap;
}
.quantitative-heading p {
  margin: 0;
  color: #5d6675;
  font-size: 0.84rem;
  line-height: 1.4;
  text-align: right;
}
.quantitative-fidelity-summary {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  margin: 0 0 0.8rem;
  padding: 10px 13px;
  border-left: 3px solid #6a3dbf;
  border-radius: 0 8px 8px 0;
  background: rgba(239, 236, 248, 0.78);
}
.quantitative-summary-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, #2f3fb3, #6a3dbf 62%, #b5178a);
  box-shadow: 0 4px 12px rgba(106, 61, 191, 0.24);
  font-size: 0.82rem;
}
.quantitative-fidelity-summary p {
  margin: 0;
  color: #4a5262;
  font-size: 0.8rem;
  line-height: 1.48;
}
.quantitative-fidelity-summary b { color: #34304f; }
.quantitative-table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(66, 78, 99, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 28px rgba(45, 57, 83, 0.09);
  scrollbar-color: rgba(106, 61, 191, 0.35) rgba(70, 80, 100, 0.08);
  scrollbar-width: thin;
}
.quantitative-table-scroll:focus-visible {
  outline: 3px solid rgba(106, 61, 191, 0.2);
  outline-offset: 3px;
}
.quantitative-table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
  color: #303747;
  font-family: 'Space Grotesk', 'Google Sans', sans-serif;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}
.quantitative-table th,
.quantitative-table td {
  padding: 6px 7px;
  border-right: 1px solid rgba(66, 78, 99, 0.1);
  border-bottom: 1px solid rgba(66, 78, 99, 0.09);
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
.quantitative-table tr > :last-child { border-right: 0; }
.quantitative-table tbody tr:last-child > * { border-bottom: 0; }
.quantitative-table thead th {
  color: #31394b;
  background: #edf1f6;
  font-weight: 700;
  line-height: 1.12;
}
.quantitative-table thead tr:first-child th {
  padding-top: 8px;
  padding-bottom: 8px;
  color: #39445b;
  background: #e4e9f1;
  font-size: 0.76rem;
}
.quantitative-table thead tr:nth-child(2) th { background: #edf0f5; }
.quantitative-table thead tr:nth-child(3) th {
  color: #586175;
  background: #f5f6f8;
  font-size: 0.68rem;
}
.quantitative-table sup,
.quantitative-table sub { font-size: 0.72em; }
.quantitative-table tbody th {
  min-width: 148px;
  padding-left: 12px;
  color: #333a4a;
  background: #ffffff;
  font-weight: 600;
  text-align: left;
}
.quantitative-table thead th:first-child,
.quantitative-table tbody th {
  position: sticky;
  left: 0;
  z-index: 2;
  box-shadow: 1px 0 rgba(66, 78, 99, 0.14);
}
.quantitative-table thead th:first-child { z-index: 3; }
.quantitative-table tbody tr:hover th,
.quantitative-table tbody tr:hover td {
  filter: brightness(0.98);
}
.quantitative-table td.best { background: #dcefe2; }
.quantitative-table td.good { background: #edf4df; }
.quantitative-table td.mid { background: #fbf3d9; }
.quantitative-table td.bad { background: #f9e5dc; }
.quantitative-table td.worst { background: #f3d5d5; }
.quantitative-table td.na {
  color: #89919d;
  background: #e7e9ed;
}
.quantitative-table tr.ours > * {
  font-weight: 700;
  border-top: 1px solid rgba(106, 61, 191, 0.28);
}
.quantitative-table tr.ours th {
  color: #55359d;
  background: #f2effb;
}
.quantitative-table tr.scaled th { color: #2f3fb3; }

@media (max-width: 760px) {
  .method-unet-popover {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    width: 100%;
    transform: translateY(12px) scale(0.985);
    transform-origin: 70% 0;
  }
  .method-unet-trigger:hover + .method-unet-popover,
  .method-unet-trigger:focus + .method-unet-popover,
  .method-unet-trigger:focus-visible + .method-unet-popover,
  .method-overview-figure.is-unet-open .method-unet-popover,
  .method-unet-popover:hover {
    transform: translateY(0) scale(1);
  }
  .method-diagram-scroll {
    width: calc(100% + 1.5rem);
    margin-right: -1.5rem;
    padding: 0 1.5rem 10px 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-color: rgba(106, 61, 191, 0.42) rgba(106, 61, 191, 0.1);
    scrollbar-width: thin;
  }
  .method-diagram {
    width: 960px;
    max-width: none;
  }
  .method-card-ssr:has(.unet-hotspot:hover) .unet-popover,
  .method-card-ssr:has(.unet-hotspot:focus) .unet-popover,
  .method-card-ssr:has(.unet-hotspot:focus-visible) .unet-popover,
  .method-card-ssr.is-unet-open .unet-popover,
  .unet-popover:hover {
    transform: translateY(-50%) scale(1);
  }
  .unet-popover {
    position: fixed;
    left: 4vw;
    top: 50%;
    width: 92vw;
    transform: translateY(-46%) scale(0.98);
    transform-origin: center;
  }
  .unet-popover::before { display: none; }
  .method-refinement {
    display: block;
    margin-top: 1.5rem;
    padding-top: 1.6rem;
  }
  .method-subheading {
    max-width: 100%;
    margin: 0 auto 1.1rem;
    padding-left: 0;
    text-align: center;
  }
  .method-refinement-range {
    justify-content: center;
    max-width: 220px;
    margin: 0.9rem auto 0;
  }
  .method-refinement-plot {
    width: min(240px, 76vw);
    margin: 1rem auto 0;
  }
  .method-refinement-stage .method-refine-viewer {
    height: auto;
    aspect-ratio: 1.4 / 1 !important;
  }
  .refine-step-badge {
    top: 10px;
    left: 10px;
    padding: 7px 12px;
    font-size: 1rem;
  }
  .refine-slider-wrap { gap: 8px; }
  .refine-slider-end { font-size: 0.72rem; }
  .quantitative-comparison {
    margin-top: 1.5rem;
    padding-top: 1.3rem;
  }
  .quantitative-heading {
    display: block;
  }
  .quantitative-heading h3 {
    font-size: 1.15rem;
    white-space: normal;
  }
  .quantitative-heading p {
    margin-top: 0.35rem;
    text-align: left;
  }
  .quantitative-fidelity-summary {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 9px;
    padding: 9px 10px;
  }
  .quantitative-summary-icon {
    width: 30px;
    height: 30px;
  }
}

/* ==================== Takeaways ==================== */
.takeaway-intro,
.takeaway-outro {
  max-width: 880px;
  margin: 0.2em auto 1.2em;
}
.takeaway-intro p { color: #3a3a52; font-size: 1.05rem; }
.takeaway-outro {
  margin-top: 1.4em;
}
.takeaway-outro p {
  color: #2f3fb3;
  font-size: 1.08rem;
}

.takeaway-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 auto;
  max-width: 940px;
}
.takeaway-card {
  position: relative;
  padding: 22px 24px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(120, 90, 200, 0.16);
  box-shadow: 0 8px 24px rgba(60, 45, 120, 0.1);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.takeaway-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(60, 45, 120, 0.16);
}
.takeaway-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
  background: linear-gradient(120deg, #2f3fb3 0%, #6a3dbf 55%, #b5178a 100%);
  box-shadow: 0 6px 16px rgba(106, 61, 191, 0.32);
  margin-bottom: 14px;
}
.takeaway-card h3 {
  font-family: 'Space Grotesk', 'Google Sans', sans-serif;
  font-size: 1.18rem;
  font-weight: 700;
  color: #24224a;
  margin: 0 0 8px;
}
.takeaway-card p {
  font-size: 0.96rem;
  line-height: 1.55;
  color: #444;
  margin: 0;
}
@media (max-width: 768px) {
  .takeaway-grid { grid-template-columns: 1fr; }
}



