:root {
  color-scheme: light;
  --bg: #f7f8f5;
  --paper: #ffffff;
  --ink: #1a1d1b;
  --muted: #5e6760;
  --line: #dfe4dd;
  --green: #245b46;
  --green-2: #2f7d62;
  --red: #b54a3c;
  --blue: #2f5f8f;
  --shadow: 0 24px 80px rgba(31, 47, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 248, 245, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(1120px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-weight: 800;
  text-decoration: none;
  color: var(--green);
}

.nav-links {
  display: flex;
  gap: 18px;
  font-size: 14px;
  color: var(--muted);
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--green);
}

.hero {
  min-height: 86vh;
  display: grid;
  align-items: center;
  padding: 56px 0 32px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.35), rgba(247,248,245,1)),
    radial-gradient(circle at 20% 20%, rgba(47,125,98,0.16), transparent 34%),
    radial-gradient(circle at 78% 34%, rgba(181,74,60,0.14), transparent 32%);
}

.hero-inner {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  text-align: center;
}

.venue,
.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  max-width: 1100px;
  margin: 0 auto 24px;
  font-size: clamp(30px, 3.45vw, 48px);
  line-height: 1.13;
  letter-spacing: 0;
}

.gap-word {
  color: var(--ink);
  white-space: nowrap;
}

.gap-g {
  color: #2367a3;
}

.gap-a {
  color: #2f7d62;
}

.gap-p {
  color: #b54a3c;
}

.title-rest {
  color: #252a27;
}

.title-rest .gap-g,
.title-rest .gap-a,
.title-rest .gap-p {
  font-weight: 900;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.25;
}

.authors {
  max-width: 1040px;
  margin: 0 auto 12px;
  color: var(--green);
  font-size: clamp(18px, 1.75vw, 23px);
  font-weight: 700;
  line-height: 1.5;
}

.authors a {
  color: var(--green);
  text-decoration-color: rgba(36, 91, 70, 0.32);
  text-underline-offset: 4px;
}

.authors a:hover {
  text-decoration-color: var(--green);
}

.authors sup,
.affiliations sup,
.author-notes sup {
  margin-left: 1px;
  font-size: 0.62em;
  line-height: 0;
}

.affiliations {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  max-width: 980px;
  margin: 0 auto 10px;
  color: var(--muted);
  font-size: 15px;
}

.affiliations p,
.author-notes p {
  margin: 0;
}

.author-notes {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 13px;
}

.actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.link-block {
  display: inline-flex;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 17px;
  border: 1px solid #242927;
  border-radius: 999px;
  background: #242927;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(31, 47, 38, 0.14);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  background: var(--green);
  border-color: var(--green);
  transform: translateY(-1px);
}

.button .icon {
  width: 1.1em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button .icon i {
  font-size: 1.05em;
  line-height: 1;
}

.button.disabled {
  color: #8f978f;
  pointer-events: none;
}

.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.section-heading {
  max-width: 840px;
  margin-bottom: 28px;
}

.text-section {
  max-width: 920px;
}

.text-section p {
  color: var(--muted);
  font-size: 18px;
}

.text-section strong {
  color: var(--green);
  font-weight: 800;
}

.paper-figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.paper-figure img {
  width: 100%;
  display: block;
}

.paper-figure figcaption {
  padding: 12px 16px 16px;
  color: var(--muted);
  font-size: 14px;
}

.overview-figure {
  padding: clamp(10px, 1.5vw, 18px);
  border-color: rgba(36, 91, 70, 0.12);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 252, 249, 0.96));
  box-shadow: 0 18px 60px rgba(31, 47, 38, 0.1);
}

.overview-figure img {
  border-radius: 14px;
  background: #ffffff;
}

.method-sections {
  display: grid;
  gap: 22px;
}

.method-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid rgba(36, 91, 70, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 52px rgba(31, 47, 38, 0.08);
}

.method-copy {
  max-width: 980px;
}

.method-copy p,
.result-notes p,
.result-notes li,
.viewer-copy p,
.spec-list dd {
  color: var(--muted);
}

.method-copy h3 {
  color: var(--ink);
  font-size: clamp(22px, 2.1vw, 28px);
}

.method-figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: clamp(8px, 1.2vw, 14px);
}

.method-figure img {
  width: 100%;
  display: block;
  border-radius: 8px;
}

.step {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--red);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-card {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.metric-strip strong {
  display: block;
  color: var(--green);
  font-size: 32px;
  line-height: 1;
}

.metric-strip span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.metric-table-thumb {
  width: 100%;
  height: 58px;
  margin-top: 12px;
  padding: 4px;
  overflow: hidden;
  border: 1px solid rgba(36, 91, 70, 0.12);
  border-radius: 8px;
  background: #fbfcfb;
  cursor: zoom-in;
}

.metric-table-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.metric-table-thumb:hover {
  border-color: rgba(36, 91, 70, 0.36);
}

.table-preview-layer {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 80;
  max-width: min(760px, calc(100vw - 40px));
  max-height: min(62vh, 560px);
  padding: 12px;
  border: 1px solid rgba(36, 91, 70, 0.14);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(18, 28, 23, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -48%) scale(0.96);
  transition: opacity 140ms ease, transform 160ms ease;
}

.table-preview-layer.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.table-preview-layer.wide-preview {
  max-width: min(980px, calc(100vw - 40px));
  max-height: min(68vh, 620px);
}

.table-preview-layer.wide-preview img {
  max-height: calc(68vh - 24px);
}

.table-preview-layer img {
  max-width: 100%;
  max-height: calc(62vh - 24px);
  display: block;
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 20px;
  align-items: start;
}

.result-notes,
.viewer-copy {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.metric-reconstruction {
  margin-top: 64px;
}

.metric-reconstruction,
.metric-reconstruction + .figure10-toolbar,
.metric-reconstruction + .figure10-toolbar + .figure10-grid {
  width: min(1480px, calc(100vw - 32px));
  margin-left: 50%;
  transform: translateX(-50%);
}

.metric-reconstruction .compact-heading {
  max-width: none;
}

.metric-reconstruction .compact-heading h2 {
  white-space: nowrap;
}

.result-subsection {
  margin-top: 72px;
}

.compact-heading {
  margin-bottom: 18px;
}

.compact-heading h2 {
  font-size: clamp(24px, 3vw, 36px);
}

.result-placeholder {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed rgba(36, 91, 70, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-weight: 700;
}

.grounding-legend {
  display: flex;
  justify-content: flex-end;
  margin: 10px 0 0;
}

.grounding-legend img {
  max-width: min(42%, 360px);
  height: auto;
  display: block;
}

.image-carousel {
  position: relative;
  overflow: visible;
  border: 1px solid rgba(36, 91, 70, 0.12);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 16px 52px rgba(31, 47, 38, 0.08);
}

.carousel-viewport {
  overflow: hidden;
  padding: clamp(12px, 1.5vw, 18px);
  border-radius: 0;
}

.carousel-stage {
  position: relative;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  border-radius: 0;
  background: #ffffff;
  box-sizing: border-box;
  opacity: 0;
  transform: translateX(18px);
  transition: opacity 320ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.carousel-slide.active {
  position: relative;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.carousel-slide img {
  width: 100%;
  margin: 0;
  display: block;
  border-radius: 0;
}

.detection-carousel .carousel-stage {
  min-height: clamp(360px, 42vw, 620px);
  display: grid;
  align-items: center;
}

.detection-carousel .carousel-slide {
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.detection-carousel .carousel-slide.active {
  display: flex;
}

.detection-carousel .carousel-slide img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: clamp(360px, 42vw, 620px);
  margin: 0 auto;
  object-fit: contain;
}

.carousel-button {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(36, 91, 70, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--green);
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: 0 10px 30px rgba(31, 47, 38, 0.12);
}

.carousel-button:hover {
  background: var(--green);
  color: #ffffff;
}

.carousel-button.prev {
  left: 18px;
}

.carousel-button.next {
  right: 18px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 0 14px;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: #cfd8d1;
  cursor: pointer;
}

.carousel-dot.active {
  width: 24px;
  background: var(--green);
}

.figure10-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.scene-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  margin-bottom: 2px;
}

.figure10-toolbar button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.figure10-toolbar button:hover {
  border-color: var(--green);
  color: var(--green);
}

.figure10-toolbar .scene-tab.active {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

.figure10-toolbar .reset-view-button {
  margin-left: auto;
  background: rgba(181, 74, 60, 0.1);
  border-color: rgba(181, 74, 60, 0.36);
  color: var(--red);
}

.figure10-toolbar .reset-view-button:hover {
  background: var(--red);
  border-color: var(--red);
  color: #ffffff;
}

.figure10-grid {
  display: grid;
  grid-template-columns: minmax(130px, 0.56fr) repeat(4, minmax(230px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.figure10-cell {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 14px 42px rgba(31, 47, 38, 0.08);
}

.figure10-cell h3 {
  height: 52px;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--green);
  font-size: 16px;
}

.method-preview {
  height: clamp(190px, 14vw, 250px);
  margin: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  padding: 6px;
}

.method-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #ffffff;
}

.input-preview {
  height: calc(clamp(190px, 14vw, 250px) + 300px);
  margin: 0;
  overflow: hidden;
  background: #ffffff;
}

.input-view-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 2px;
  height: 100%;
  padding: 2px;
  overflow: hidden;
}

.input-view-grid img {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  border-radius: 5px;
  object-fit: contain;
  background: #f6f8f6;
}

.mini-viewer,
.viewer-placeholder {
  position: relative;
  height: 300px;
  background: #ffffff;
}

.mini-viewer canvas {
  display: block;
}

.drag-hint {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(36, 91, 70, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(31, 47, 38, 0.12);
  transform: translateX(-50%);
  animation: hint-sway 1.45s ease-in-out infinite;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.mini-viewer.user-touched .drag-hint {
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
}

.hand-icon {
  width: 18px;
  height: 18px;
  display: block;
}

@keyframes hint-sway {
  0%,
  100% {
    transform: translateX(-50%) rotate(-5deg);
  }
  50% {
    transform: translateX(-50%) rotate(5deg);
  }
}

.viewer-placeholder {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  color: var(--green);
}

.viewer-placeholder span {
  color: var(--muted);
  font-size: 14px;
}

.wide-copy {
  margin-top: 14px;
}

.viewer-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101614;
  box-shadow: var(--shadow);
}

.viewer {
  width: 100%;
  height: min(68vh, 620px);
  min-height: 420px;
}

.viewer canvas {
  display: block;
}

.viewer-toolbar {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.12);
  background: #151d1a;
}

.viewer-toolbar button {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.viewer-toolbar button:hover {
  background: rgba(255,255,255,0.16);
}

code {
  font-family: Consolas, Monaco, monospace;
}

.spec-list {
  margin: 22px 0 0;
}

.spec-list div {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.spec-list dt {
  color: var(--green);
  font-weight: 800;
}

.spec-list dd {
  margin: 4px 0 14px;
}

pre {
  overflow-x: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
  box-shadow: 0 12px 36px rgba(31, 47, 38, 0.08);
}

.footer {
  padding: 32px 16px 48px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 860px) {
  .nav {
    height: auto;
    padding: 14px 0;
    align-items: flex-start;
  }

  .nav-links {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px 14px;
  }

  .hero {
    min-height: 78vh;
  }

  .method-panel,
  .metric-strip,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .figure10-grid {
    grid-template-columns: minmax(150px, 0.58fr) repeat(4, minmax(230px, 1fr));
  }

  .viewer {
    height: 440px;
    min-height: 360px;
  }
}

@media (max-width: 540px) {
  .nav {
    width: min(100% - 24px, 1120px);
    display: block;
  }

  .nav-links {
    margin-top: 8px;
    justify-content: flex-start;
  }

  .section {
    width: min(100% - 24px, 1120px);
    padding: 52px 0;
  }

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

  .button {
    width: 100%;
  }
}
