:root {
  --text: #1f2328;
  --muted: #5b636e;
  --bg: #ffffff;
  --soft: #f5f6f8;
  --line: #e3e6ea;
  --accent: #2f6fdd;
  --hand: #e8a33d;   /* orange = hand policy */
  --robot: #6fb56f;  /* green  = robot policy */
  --max: 1040px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
header {
  text-align: center;
  padding: 56px 0 24px;
}

h1.title {
  font-size: 2.3rem;
  line-height: 1.25;
  margin: 0 0 20px;
  font-weight: 700;
}

h1.title .name { color: var(--accent); }

.authors { font-size: 1.1rem; margin-bottom: 4px; }
.authors span { margin: 0 8px; white-space: nowrap; }
.affiliations { color: var(--muted); margin-bottom: 6px; }
.venue { color: var(--muted); font-style: italic; margin-bottom: 20px; }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  background: #24292f;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
}
.btn:hover { background: #3a4048; text-decoration: none; }
.btn.disabled { background: #9aa1a9; pointer-events: none; }

/* ---------- Sections ---------- */
section { padding: 36px 0; }
section + section { border-top: 1px solid var(--line); }

h2 {
  font-size: 1.6rem;
  text-align: center;
  margin: 0 0 20px;
}

h3 { font-size: 1.2rem; margin: 28px 0 10px; }

p { margin: 0 0 14px; }

.tldr {
  background: var(--soft);
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  border-radius: 6px;
  margin: 20px 0 0;
}

figure { margin: 20px 0; }
figcaption {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 8px;
  text-align: center;
}

.hand { color: #c77d10; font-weight: 600; }
.robot { color: #3f8f3f; font-weight: 600; }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 24px 0 0;
}
.stat {
  background: var(--soft);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.stat b { display: block; font-size: 1.8rem; color: var(--accent); line-height: 1.2; }
.stat span { font-size: 0.9rem; color: var(--muted); }

/* ---------- Grids ---------- */
.grid-2, .grid-3 { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card h4 { margin: 10px 0 4px; font-size: 1.05rem; }
.card p { font-size: 0.93rem; color: var(--muted); margin: 0; }

.equation {
  text-align: center;
  font-family: "Times New Roman", serif;
  font-size: 1.25rem;
  margin: 16px 0;
}

/* ---------- Video placeholders ---------- */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #1c1f24;
}
.video.square { aspect-ratio: 1 / 1; }
.video video, .video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video.placeholder img { opacity: 0.35; }
.video.placeholder .label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  text-align: center;
  padding: 10px;
}
.video.placeholder .label small { font-weight: 400; opacity: 0.8; }
.play {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
  font-size: 1.2rem;
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
  margin: 10px 0;
}
th, td {
  padding: 6px 8px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
thead th { border-bottom: 2px solid var(--text); }
tbody tr:last-child td { border-bottom: 2px solid var(--text); }
td:first-child, th:first-child { text-align: left; }
tr.ours td { background: #eef4ff; font-weight: 600; }
.up { color: #2f6fdd; font-size: 0.8em; }
.down { color: #c0392b; font-size: 0.8em; }

/* ---------- BibTeX ---------- */
pre.bibtex {
  background: var(--soft);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 30px 0 40px;
}

@media (max-width: 720px) {
  h1.title { font-size: 1.7rem; }
  .grid-2, .grid-3, .stats { grid-template-columns: 1fr; }
}

.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-note { text-align: center; font-size: 0.9rem; color: var(--muted); margin: 8px 0 0; }
