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

html {
  scroll-behavior: smooth;
}

/* ---- Fixed vertical section nav, sitting in the left margin ---- */
.side-nav {
  position: fixed;
  top: 42%;
  left: 1.75rem;
  transform: translateY(-50%);
  z-index: 25;
}
.side-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.side-nav li {
  margin: 0.15rem 0;
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-family: 'Google Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #969ca5;                 /* inactive: gray */
  padding: 0.34rem 0;
  transition: color 0.2s ease;
}
.side-nav a .tick {
  flex: none;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: width 0.2s ease, background 0.2s ease;
}
.side-nav a:hover {
  color: #6b727c;
}
.side-nav a.active {
  color: #474d56;                 /* active: darker gray + longer tick */
}
.side-nav a.active .tick {
  width: 32px;
  background: #474d56;
}
/* Not enough side margin to host the nav — hide it. */
@media screen and (max-width: 1150px) {
  .side-nav { display: none; }
}


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

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

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


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

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


.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: 'Google Sans', sans-serif;
}

.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: hsl(204, 86%, 53%) !important;
}

.publication-authors a:hover {
    text-decoration: underline;
}

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

.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;
  font-size: 0;
}

.results-carousel video {
  margin: 0;
}


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

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

.interpolation-video-column {
}

.interpolation-panel .slider {
  margin: 0 !important;
}

.interpolation-panel .slider {
  margin: 0 !important;
}

#interpolation-image-wrapper {
  width: 100%;
}
#interpolation-image-wrapper img {
  border-radius: 5px;
}

/* ============================================================
   Semantic Action RL — project page styles
   ============================================================ */

.publication-title {
  line-height: 1.15;
}

/* Hover tooltip ("coming soon") above the paper/arXiv/code buttons */
.has-tooltip {
  position: relative;
  display: inline-block;
}
.has-tooltip .tooltip-text {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 9px;
  background: #2a2a2a;
  color: #fff;
  font-size: 0.75rem;
  font-family: 'Google Sans', sans-serif;
  padding: 0.3em 0.7em;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 30;
}
.has-tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #2a2a2a;
}
.has-tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Monospace styling for language prompts / "semantic actions" */
.prompt {
  font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
  background: #eef3fb;
  color: #1f4e8c;
  border-radius: 4px;
  padding: 0.05em 0.35em;
  font-size: 0.85em;
  white-space: nowrap;
}
/* KaTeX-rendered math keeps the prompt pill's blue color/highlight */
.prompt .katex {
  font-size: 1.3em;
  color: inherit;
}

/* Teaser figure + TL;DR — no card; sits directly on the page. */
.teaser-unit {
  margin: 0 auto;
}
.teaser-img-wrap {
  position: relative;
  line-height: 0;
}
.teaser-unit .teaser-img {
  display: block;
  width: 100%;
  height: auto;
}
/* TL;DR text */
.tldr {
  padding: 1.3rem 0 0;
  margin: 0;
}
.tldr-label {
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  color: #2a2a2a;
  margin-right: 0.4em;       /* bold lead-in at the start of the paragraph */
}
.tldr p {
  font-size: 1.02rem;
  line-height: 1.6;
  color: #2a2a2a;
}

/* The single most important takeaway — RL over language */
.takeaway {
  background: linear-gradient(135deg, #1b3a2f 0%, #2c5d49 100%);
  color: #fff;
  border-radius: 12px;
  padding: 1.6rem 1.8rem;
  margin: 2rem auto;
  text-align: center;
  box-shadow: 0 6px 20px rgba(27, 58, 47, 0.25);
}
.takeaway .takeaway-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}
.takeaway .takeaway-main {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
}
.takeaway .takeaway-main .hl {
  color: #8ff0c0;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

/* Simplified algorithm box (Approach section) */
.algo-box {
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  margin: 1.75rem auto 0.5rem;
}
.algo-title {
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: #1a1a1a;
  background: #fafafa;
  border-bottom: 1px solid #e6e6e6;
  padding: 0.7rem 1.15rem;
}
.algo-box ol.algo-steps {
  margin: 0;
  padding: 1rem 1.3rem 1.1rem 2.5rem;
  list-style: decimal;
}
.algo-box ol.algo-substeps {
  margin: 0.45rem 0 0.25rem;
  padding-left: 1.5rem;
  list-style: lower-alpha;
}
.algo-box li {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #333;
  margin: 0.32rem 0;
}
.algo-box .algo-kw {
  font-weight: 700;
  color: #1a1a1a;
}

/* Big attention-grabbing question */
.big-question {
  font-family: 'Castoro', 'Google Sans', serif;
  font-style: italic;
  font-size: 1.9rem;
  line-height: 1.35;
  text-align: center;
  color: #2a2a2a;
  max-width: 820px;
  margin: 0.5rem auto 2rem auto;
}

/* Collapsible "Why it works" analysis blocks — neutral grayscale,
   collapsed by default via native <details>. */
.why-works {
  border: 1px solid #e4e4e4;
  border-radius: 10px;
  margin: 1.25rem 0;
  overflow: hidden;
  background: #fff;
}
.why-works > summary {
  list-style: none;            /* hide the default disclosure triangle */
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  padding: 1rem 1.25rem;
  background: #fafafa;
  transition: background 0.15s ease;
}
.why-works > summary::-webkit-details-marker { display: none; }
.why-works > summary::marker { content: ''; }
.why-works > summary:hover { background: #f2f2f2; }
.why-works[open] > summary { border-bottom: 1px solid #e4e4e4; }

.subsection-kicker {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  color: #1a1a1a;
  white-space: nowrap;
}
.subsection-title {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #6b6b6b;
  line-height: 1.3;
  margin: 0;
}
.why-works-chevron {
  margin-left: auto;
  align-self: center;
  color: #999;
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}
.why-works[open] > summary .why-works-chevron { transform: rotate(180deg); }
.why-works .fig {
  margin: 1.25rem;
}

/* Figure blocks */
.fig {
  margin: 1.5rem auto;
  text-align: center;
}
.fig img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.fig.bordered img {
  border: 1px solid #e2e2e2;
}
.fig .fig-caption {
  font-size: 0.92rem;
  color: #555;
  text-align: justify;
  margin-top: 0.75rem;
}
.fig .fig-caption .fig-num {
  font-weight: 700;
  color: #333;
}

/* "Why" cards: hard to prompt / VLMs not enough / need RL */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
/* long prompts must wrap inside the fixed-width cards, otherwise a
   nowrap prompt forces its grid track wider than the others */
.why-card .prompt {
  white-space: normal;
  word-break: break-word;
}
.why-grid > .why-card {
  /* equal-height cards regardless of text length */
  align-self: stretch;
}
.why-card {
  background: #fafafa;
  border: 1px solid #eaeaea;
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
}
/* push the concept video to the bottom so all three line up */
.why-card .why-video {
  margin-top: auto;
  padding-top: 0.9rem;
}
.why-card h4 {
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  color: #1f2d3d;
}
.why-card .why-tag {
  display: inline-block;
  align-self: flex-start; /* don't stretch across the flex column */
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.12em 0.55em;
  border-radius: 999px;
  margin-bottom: 0.55rem;
}
.why-card.bad .why-tag   { background: #fdecea; color: #c0392b; }
.why-card.partial .why-tag { background: #fef6e6; color: #b9770e; }
.why-card.good .why-tag  { background: #e9f7ef; color: #1e8449; }
.why-card p { font-size: 0.93rem; color: #444; }

@media screen and (max-width: 768px) {
  .why-grid { grid-template-columns: 1fr; }
  .big-question { font-size: 1.4rem; }
  .takeaway .takeaway-main { font-size: 1.2rem; }
}

/* ---- Video matrix (task x method) ---- */
.task-block {
  margin-bottom: 1.5rem;
  /* group each task's label + videos into a single subtle card */
  background: #fcfcfd;
  border: 1px solid #eef0f2;
  border-radius: 10px;
  padding: 1rem 1.1rem 1.1rem;
}
.task-block .task-label {
  font-family: 'Google Sans', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.9rem;
}
.video-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}
@media screen and (max-width: 900px) {
  .video-row { grid-template-columns: repeat(2, 1fr); }
}
.video-cell { text-align: center; }
.video-cell .method-label {
  font-family: 'Google Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #333;
}
.video-cell.ours .method-label { color: #1e8449; }
/* Placeholder shown until an mp4 is dropped in. Replace the inner
   .video-placeholder with: <video autoplay muted loop playsinline> ... </video> */
.video-placeholder {
  position: relative;
  width: 100%;
  padding-bottom: 100%;        /* square; matches WidowX camera crop */
  background: repeating-linear-gradient(45deg, #f0f0f0, #f0f0f0 10px, #e8e8e8 10px, #e8e8e8 20px);
  border: 1px dashed #c2c2c2;
  border-radius: 8px;
}
.video-cell.ours .video-placeholder { border-color: #1e8449; }
/* 16:9 variant, used for the concept videos in the Challenge cards */
.video-placeholder.wide { padding-bottom: 56.25%; }
.why-video video {
  width: 100%;
  border-radius: 8px;
  display: block;
}

/* Subtle hover affordance for all videos (controls appear on hover via JS).
   A transparent border by default avoids any layout shift on hover. */
video {
  border: 1px solid transparent;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
video:hover {
  border-color: #cfd6e0;
  box-shadow: 0 2px 10px rgba(31, 78, 140, 0.10);
}
.video-placeholder span {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: #999;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}
.video-cell video {
  width: 100%;
  border-radius: 8px;
  display: block;
}

/* ---- BibTeX copy button ---- */
.bibtex-block {
  position: relative;
}
.bibtex-block pre {
  margin: 0;
}
.bibtex-copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: 'Google Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: #8a8f96;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 0.3em 0.55em;
  cursor: pointer;
  opacity: 0.7;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.bibtex-copy:hover {
  color: #4a4f56;
  background: rgba(0, 0, 0, 0.05);
  opacity: 1;
}
.bibtex-copy.copied {
  color: #1e8449;
  background: transparent;
  opacity: 1;
}

/* ---- Training timelapses (YouTube) ---- */
.timelapse-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
@media screen and (max-width: 768px) {
  .timelapse-grid { grid-template-columns: 1fr; }
  .video-row { grid-template-columns: repeat(2, 1fr); }
}
.timelapse-cell {
  display: flex;
  flex-direction: column;
}
.timelapse-cell .timelapse-label {
  font-family: 'Google Sans', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  /* reserve two lines so single- and double-line labels align,
     and the videos below them always start at the same height */
  min-height: 2.8em;
  display: flex;
  align-items: flex-end;
  margin-bottom: 0.5rem;
}
/* failsafe: if a label ever wraps to 3+ lines on a narrow viewport,
   still pin the video to the bottom so the row stays aligned */
.timelapse-cell .youtube-embed {
  margin-top: auto;
}
/* 16:9 YouTube placeholder. Replace inner content with:
   <iframe src="https://www.youtube.com/embed/VIDEO_ID" ...></iframe> */
.youtube-embed {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
  border-radius: 10px;
  background: #1a1a1a;
}
.youtube-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}
.youtube-embed .yt-placeholder {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: #bbb;
  text-align: center;
  font-size: 0.9rem;
}
.youtube-embed .yt-placeholder .yt-icon {
  font-size: 2.5rem;
  color: #ff0000;
  opacity: 0.85;
  margin-bottom: 0.4rem;
}
