:root {

  --c-source: #4a8254;
  --c-ours:   #3c679c;
  --c-gmr:    #ad4f4a;
  --c-omni:   #d6b43c;
  --c-phc:    #6d4d32;
}

body {
  font-family: "Noto Sans", sans-serif;
  color: #2b2b2b;
}

/* Hero */
.hero-body { padding: 3.5rem 1.5rem 1.5rem; }
.publication-title {
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem !important;
}
.publication-subtitle {

  margin-top: 0 !important;
  font-weight: 400;

  text-wrap: balance;
  color: #444;
  margin-bottom: 1.6rem !important;
}
.publication-authors {
  margin-bottom: 0.3rem;

  text-wrap: balance;
}
.publication-authors a { color: #3c679c; }
.affiliations { color: #555; font-size: 1.05rem !important; }
.equal-contribution { color: #555; font-size: 0.95rem; margin-top: 0.2rem; }
.author-block { display: inline-block; margin: 0 0.15rem; }
.publication-links { margin-top: 1.4rem; }
.publication-links .button { margin: 0.25rem 0.2rem; }

/* Sections */
.section { padding: 2.5rem 1.5rem; }
.section .title.is-4 { margin-top: 0.5rem; }
.results-heading { margin-top: 3rem !important; }

video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: #e2e3e5;
}

.video-frame {
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}
.video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

.video-section { padding-top: 0.5rem; }
.teaser .column { padding: 0.4rem; }
.stage-label {
  text-align: center;
  font-size: 0.92rem;
  font-weight: 600;
  color: #444;
  margin-top: 0.45rem;
}
.teaser-caption {
  max-width: 820px;
  margin: 1.2rem auto 0;
  font-size: 1.05rem;
}
.method-name { font-weight: 700; }

.method-problem { margin-bottom: 0.4rem !important; }
.math-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  column-gap: 2.5em;
  row-gap: 0.4rem;
  margin: 1.1rem 0 0.6rem;
  font-size: 1.1rem;
}
.math-row .math { white-space: nowrap; }

.algorithm-video { margin-bottom: 1.6rem; }
.algorithm-video video { background: #fff; border-radius: 0; }

/* Demos */
.method-lead { margin-bottom: 1.6rem !important; }
.demo-pair {
  display: grid;
  grid-template-columns: 1.43fr 1.83fr;
  grid-template-areas:
    "video-a video-b"
    "cap-a   cap-b";
  column-gap: 1.5rem;
  margin-bottom: 1rem;
}
.demo-video.demo-a { grid-area: video-a; }
.demo-video.demo-b { grid-area: video-b; }
.demo-cap.demo-a   { grid-area: cap-a; }
.demo-cap.demo-b   { grid-area: cap-b; }
.demo-video { align-self: end; }
.demo-cap {
  margin-top: 0.7rem;
  font-size: 0.93rem;
  line-height: 1.5;
}

.demo-cap .prioritized { color: #2a8a3a; }

.demo-cap .red-line { color: #d62728; }

.demo-cap .ours { color: var(--c-ours); }
.demo-cap .gmr  { color: var(--c-gmr); }

/* Deployment */
.deploy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.deploy-grid video { background: #000; }

/* Method legend */
.method-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.3rem;
  margin: 0.4rem 0 1rem;
  font-size: 0.92rem;
}
.method-legend span { display: inline-flex; align-items: center; }
.dot {
  display: inline-block;
  width: 0.8rem; height: 0.8rem;
  border-radius: 50%;
  margin-right: 0.4rem;
}
.dot.source { background: var(--c-source); }
.dot.ours   { background: var(--c-ours); }
.dot.gmr    { background: var(--c-gmr); }
.dot.omni   { background: var(--c-omni); }
.dot.phc    { background: var(--c-phc); }

/* Tabs */
.tab-group { margin-bottom: 1rem; }
.tab-pane { display: none; }
.tab-pane.is-active { display: block; }
.tabs.is-toggle li.is-active a {
  background-color: #363636;
  border-color: #363636;
}

/* BibTeX */
.bibtex-box { position: relative; }
.bibtex-box pre {
  background: #f5f5f5;
  border-radius: 6px;
  padding: 1.1rem 1.25rem;
  font-size: 0.85rem;
  white-space: pre-wrap;
}
.copy-bibtex {
  position: absolute;
  top: 0.5rem; right: 0.5rem;
}

.footer { padding: 2rem 1.5rem 3rem; background: #fafafa; }

@media screen and (max-width: 768px) {
  .hero-body { padding-top: 2.2rem; }
  .publication-title { font-size: 2.4rem !important; }
  .publication-subtitle { font-size: 1.3rem !important; }

  .demo-pair {
    grid-template-columns: 1fr;
    grid-template-areas: "video-a" "cap-a" "video-b" "cap-b";
  }
  .demo-video.demo-b { margin-top: 1.2rem; }
  .deploy-grid { grid-template-columns: 1fr; }
  .math-row { font-size: 0.95rem; }

  .has-text-justified { text-align: left !important; }
}
