:root {
  --text: #1f2328;
  --muted: #59636e;
  --line: #e4e7eb;
  --soft: #f6f8fa;
  --accent: #1f5fbf;
  --ours: #eef3fa;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Noto Sans', system-ui, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.65;
}

a {
  color: var(--accent);
}

a:hover {
  text-decoration: underline;
}

/* ---------- Header ---------- */
.hero-body {
  padding: 4.5rem 1.5rem 2rem;
}

.publication-title {
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 0.4rem !important;
}

.publication-subtitle {
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 1.6rem;
}

.publication-authors {
  font-size: 1.1rem;
}

.author-block {
  display: inline-block;
  margin: 0 0.35rem;
}

.publication-authors a {
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.publication-authors a:hover {
  text-decoration: none;
  border-bottom-color: var(--text);
}

.affiliation {
  color: var(--muted);
  font-size: 1rem;
  margin-top: 0.35rem;
}

.emails {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.affiliation-logo {
  display: block;
  height: 50px;
  max-width: 100%;
  width: auto;
  margin: 0.9rem auto 0;
}

.publication-links {
  margin-top: 1.5rem;
}

.publication-links .button {
  margin: 0.25rem;
  border-radius: 999px;
  font-weight: 500;
  padding-left: 1.2em;
  padding-right: 1.3em;
}

.svg-icon {
  width: 1em;
  height: 1em;
}

.publication-links .button[disabled] {
  background: var(--soft);
  border-color: var(--line);
  color: var(--muted);
  opacity: 1;
}

/* ---------- Sections ---------- */
.section {
  padding: 2.5rem 1.5rem;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.subsection-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin: 2rem 0 0.6rem;
}

.content p,
.prose p {
  margin-bottom: 1rem;
}

.prose {
  font-size: 1.04rem;
}

/* ---------- Figures ---------- */
figure.paper-figure {
  margin: 1.5rem 0 0.5rem;
}

figure.paper-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

figure.paper-figure.narrow img {
  max-width: 640px;
  margin: 0 auto;
}

figure.paper-figure.small img {
  max-width: 440px;
  margin: 0 auto;
}

figure.paper-figure.narrow figcaption,
figure.paper-figure.small figcaption {
  text-align: center;
}

figure.paper-figure figcaption {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-top: 0.7rem;
}

/* ---------- Key numbers ---------- */
.key-numbers {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.4rem 0 0.4rem;
  flex-wrap: wrap;
}

.key-number {
  flex: 1 1 180px;
  max-width: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  text-align: center;
}

.key-number .value {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.key-number .label {
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- Results table ---------- */
.table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
}

table.results {
  width: 100%;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

table.results th,
table.results td,
table.results thead th {
  text-align: center !important;
  vertical-align: middle;
  border-color: var(--line);
  padding: 0.45em 0.6em;
}

table.results thead tr:first-child th:first-child,
table.results td:first-child {
  text-align: left !important;
}

table.results thead th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
}

table.results thead tr:first-child th {
  color: var(--text);
  font-size: 0.95rem;
}

table.results tr.ours td {
  background: var(--ours);
  font-weight: 600;
}

.table-note {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.5rem;
}

/* ---------- Rollout videos ---------- */
.rollout-block {
  margin-top: 1.4rem;
}

.rollout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.rollout-task {
  font-weight: 600;
}

.rollout-header .buttons {
  margin-bottom: 0;
}

.rollout-header .buttons .button {
  margin-bottom: 0;
  border-color: var(--line);
  color: var(--muted);
}

.rollout-header .buttons .button.is-selected {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

video.rollout {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: var(--soft);
}

.video-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.video-label.ours {
  color: var(--text);
  font-weight: 600;
}

.tag-fail,
.tag-success {
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 4px;
  padding: 0.05rem 0.4rem;
  margin-left: 0.25rem;
}

.tag-fail {
  background: #fbeaea;
  color: #b42318;
}

.tag-success {
  background: #e7f5ec;
  color: #1a7f37;
}

.robotwin-grid .column {
  flex: 0 0 20%;
  max-width: 20%;
}

@media screen and (max-width: 768px) {
  .robotwin-grid .column {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

.real-row .rollout-block {
  margin-top: 0.6rem;
}

.robocasa-grid {
  display: grid;
  grid-template-columns: 130px repeat(3, minmax(0, 1fr));
  gap: 0.5rem 0.6rem;
  align-items: center;
  max-width: 820px;
  margin: 0 auto;
}

.robocasa-grid .video-label {
  margin-bottom: 0;
}

.grid-task {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

@media screen and (max-width: 768px) {
  .robocasa-grid {
    grid-template-columns: 70px repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .grid-task,
  .robocasa-grid .video-label {
    font-size: 0.75rem;
  }
}

/* ---------- BibTeX ---------- */
.bibtex {
  position: relative;
}

.bibtex pre {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1.55;
  padding: 1rem 1.2rem;
  white-space: pre;
  overflow-x: auto;
}

.copy-button {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
}

/* ---------- Footer ---------- */
.footer {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 2rem 1.5rem 3rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.88rem;
}

@media screen and (max-width: 768px) {
  .hero-body {
    padding-top: 3rem;
  }

  .publication-title {
    font-size: 1.9rem;
  }

  .publication-subtitle {
    font-size: 1.1rem;
  }

  .publication-subtitle br {
    display: none;
  }

  .publication-links .button {
    font-size: 0.9rem;
  }

  .section {
    padding: 2rem 1rem;
  }
}
