/* ─────────────────────────────── reset / base ─────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.65;
  color: #1a1a1a;
  letter-spacing: -0.005em;
  /* Sky-blue → sunset-orange diagonal gradient (with a soft warm mid-tone). */
  background:
    linear-gradient(135deg,
      #d8e8ff  0%,
      #b9d4ff 22%,
      #ffe0b9 62%,
      #ffc98a 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Particle canvas sits fixed behind all content but above the gradient. */
#bg-particles {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}
body > *:not(#bg-particles) { position: relative; z-index: 1; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: #0c4d92; text-decoration: none; transition: color .15s ease; }
a:hover { color: #1466b8; text-decoration: underline; }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 1.85rem; margin-bottom: 1.2rem; color: #111; }
h3 { font-size: 1.15rem; color: #222; }

p { margin-bottom: 1rem; }

em { color: #555; }

/* ─────────────────────────────── HERO (cream / paper) ─────────────────────────────── */
.hero {
  /* transparent — body gradient shows through */
  background: transparent;
  border-bottom: 1px solid rgba(30, 60, 120, 0.10);
  padding: 24px 0 60px;      /* tighter top so logos sit near the very top */
}

.hero .container { text-align: center; }

/* Brand mark: pixel-tool-picker icon (1241×916, ~1.35:1) sitting inline to
   the LEFT of the first title line ("VideoGen-Agent:"). Height tracks the
   title's font-size via em so it scales automatically across breakpoints. */
.brand-mark {
  display: inline-block;
  height: 1.8em;
  width: auto;
  vertical-align: -0.5em;       /* align to text baseline of the H1 */
  margin: 0 0.28em 0 0;
  filter: drop-shadow(0 2px 8px rgba(63, 168, 56, 0.30));
}

.title {
  font-size: 2.7rem;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
  color: #1a1a1a;                     /* fallback if per-word spans somehow miss */
}

/* Per-word colors match the paper's title 5-stop green→yellow gradient
   (TechReport.tex lines 282–286: titlegA..titlegE) */
.title .title-w1 { color: #3FA838; }   /* deep green   (VideoGen-Agent:) */
.title .title-w2 { color: #6FB833; }   /* yellow-green (Reinforcing) */
.title .title-w3 { color: #9FC72E; }   /* chartreuse   (Video) */
.title .title-w4 { color: #CFD629; }   /* lime-yellow  (Generation) */
.title .title-w5 { color: #F0CB1F; }   /* warm yellow  (Agents) */

/* Keep legacy .highlight rule harmless in case any other page still uses it */
.title .highlight { color: #3FA838; }

.authors {
  font-size: 1.08rem;
  color: #2a2a2a;
  margin: 0 auto 6px;
  line-height: 1.55;
  max-width: 860px;              /* narrower than title's ~1080px container */
}
.authors sup { font-size: 0.72em; color: #b15c2a; font-weight: 500; padding-left: 1px; }

.affiliations {
  font-size: 0.92rem;
  color: #5a5040;
  margin-bottom: 28px;
  line-height: 1.55;
}
.affiliations sup { color: #b15c2a; font-weight: 500; padding-right: 2px; }

.links {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  margin-bottom: 36px;
}

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px;
  border-radius: 999px;
  background: #1a1a1a;
  color: #fff;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background .15s ease, transform .15s ease;
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}
.btn:hover { background: #000; text-decoration: none; transform: translateY(-1px); }
.btn .icon { font-family: "JetBrains Mono", monospace; font-size: 0.9em; }
.btn.disabled {
  background: rgba(30, 60, 120, 0.18); color: #8a7c63; border-color: rgba(30, 60, 120, 0.22);
  cursor: not-allowed; pointer-events: none;
  box-shadow: none;
}

.tldr {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.02rem;
  color: #2a2a2a;
  background: rgba(245, 249, 253, 0.85);
  border: 1px solid rgba(30, 60, 120, 0.18);
  border-left: 4px solid #ff9d1c;
  padding: 18px 22px;
  text-align: left;
  border-radius: 8px;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 12px rgba(30, 60, 120, 0.08);
}
.tldr strong { color: #1a1a1a; }
.tldr em { color: #5a5040; }

/* ─────────────────────────────── BLOCKS ─────────────────────────────── */
.block {
  padding: 70px 0;
  border-bottom: 1px solid rgba(30, 60, 120, 0.10);
  background: rgba(247, 250, 255, 0.94);      /* nearly-solid cool white */
  backdrop-filter: blur(10px);
}
.block.alt { background: rgba(234, 242, 253, 0.94); }
.block:last-of-type { border-bottom: none; }

/* Content-block containers (Abstract → Robotics → Footer) match the teaser image width */
.block .container,
footer .container {
  max-width: 1000px;                /* aligns with .teaser-wrap .container above */
}

/* Justified body text (both sides aligned) inside content blocks + hero TL;DR */
.block p,
.block li,
.method-figure figcaption,
.case-figure figcaption,
.tldr {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}
/* Center-align stays for the hero header (title / authors / buttons / affil logos)
   — but TL;DR gets justified two-side alignment like the rest of the body prose. */
.hero .container,
.hero .container p { text-align: center; }
.hero .container p.tldr {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}
/* Table cells and gallery captions stay centered */
table.results td, table.results th,
.vid-cat, .vid-pair figcaption,
.cat-card p, .tg-card p { text-align: initial; }
.cat-card p, .tg-card p { text-align: left; }

/* ─────────────────────────────── AFFILIATION LOGOS (above title) ─────────────────────────────── */
.affil-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 42px;
  margin: 0 0 22px;
  padding: 0 12px;
}
/* Wide variant: sits outside .container so it can be broader than the title */
.affil-logos.affil-logos-wide {
  max-width: 1600px;             /* ~50% wider than .container (1080px) and wider than the abstract block */
  margin: 0 auto 30px;
  padding: 0 24px;               /* slim padding so the logos really breathe out */
  gap: 110px;                    /* much larger inter-logo spacing so the row spreads out */
  justify-content: space-around; /* distribute logos across the wide row instead of clumping */
}
/* Inline variant: sits between authors/affiliations and the buttons row */
.affil-logos.affil-logos-inline {
  gap: 60px;
  margin: 6px auto 22px;
}
.affil-logos.affil-logos-inline img {
  height: 54px;
  max-width: 220px;
}
.affil-logos img {
  height: 72px;
  width: auto;
  max-width: 340px;              /* raised for wide banner logos like CUHK (5.7:1 AR) */
  object-fit: contain;
  opacity: 0.92;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.affil-logos img:hover {
  opacity: 1;
  transform: translateY(-2px);
}
@media (max-width: 900px) {
  .affil-logos { gap: 28px; }
  .affil-logos.affil-logos-wide { gap: 48px; }
  .affil-logos img { height: 56px; max-width: 240px; }
}
@media (max-width: 700px) {
  .affil-logos { gap: 20px; }
  .affil-logos.affil-logos-wide { gap: 30px; }
  .affil-logos img { height: 44px; max-width: 180px; }
}

/* ─────────────────────────────── TEASER (transparent, floats on gradient) ─────────────────────────────── */
.teaser-wrap {
  padding: 20px 0 8px;
}
.teaser-wrap .container {
  max-width: 1000px;          /* slightly narrower than main container (1080px) to match Abstract text column */
  margin: 0 auto;
  padding: 0 24px;
}
.teaser-img {
  display: block;
  width: 100%;
  height: auto;
  background: transparent;    /* PNG is already alpha; leave the page gradient behind */
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* One tiny icon button that swaps between the dynamic and static teaser views. */
.teaser-wrap .container { position: relative; }
.teaser-switch {
  position: absolute;
  top: 4px;
  right: 24px;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4a5568;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(30, 60, 120, 0.22);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(20, 30, 55, 0.10);
  transition: color 120ms ease, background 120ms ease, transform 160ms ease;
  z-index: 3;
}
.teaser-switch:hover {
  color: #1e2836;
  background: #ffffff;
}
.teaser-switch:active { transform: rotate(180deg); }
.teaser-switch svg { display: block; }

/* Only one of the two views is rendered, controlled by data-mode. */
.teaser-media[data-mode="dynamic"] .teaser-static { display: none; }
.teaser-media[data-mode="static"]  .teaser-video  { display: none; }
.teaser-video {
  display: block;
  width: 100%;
  height: auto;
  background: transparent;   /* video is transparent-bg WebM VP9 alpha */
  border-radius: 0;
  box-shadow: none;
}

/* 3-column titles sitting above the teaser image, aligned to the raster columns.
   Column proportions (measured from demo.png at 2525×1207 after cropping the
   old raster titles): User Prompt ≈ 0..500 (19.8 %), Tool Use ≈ 500..1370
   (34.5 %), Generated Video ≈ 1370..2525 (45.7 %). */
.teaser-cols {
  display: grid;
  grid-template-columns: 19.8% 34.5% 45.7%;
  align-items: end;
  margin: 0 0 10px;
  padding: 0;
  color: #1e2836;
}
.teaser-col {
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.25;
  text-align: center;
  letter-spacing: -0.005em;
  padding: 0 4px;
}
.teaser-col .teaser-sub {
  font-weight: 400;
  font-size: 0.82rem;
  color: rgba(30, 40, 55, 0.65);
  margin-left: 4px;
  letter-spacing: 0;
}
@media (max-width: 720px) {
  .teaser-col { font-size: 0.85rem; }
  .teaser-col .teaser-sub { display: block; font-size: 0.72rem; margin-left: 0; }
}

/* ─────────────────────────────── METHOD: tool groups ─────────────────────────────── */
/* Same design language as the results table:
   ivory body, dark-slate outline + shadow, dark title bar, orange-amber accent */
.tool-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 24px 0 32px;
}

.tg-card {
  background: #f3f6fb;                    /* cool ivory (was HELM ivory) */
  border: 1px solid #2c3a4a;              /* dark slate outline */
  border-radius: 6px;
  padding: 0;                             /* padding pushed into inner elements */
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 4px 16px rgba(30, 40, 55, 0.14);
  overflow: hidden;
  position: relative;
}
.tg-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(30, 40, 55, 0.20); }
.tg-card h3 {
  background: #1e2836;                    /* dark slate header (matches thead) */
  color: #f5e9c4;                         /* warm cream text */
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0;
  padding: 11px 18px 10px;
  border-bottom: 3px solid #ff9d1c;       /* HF-orange accent stripe */
}
.tg-card p {
  font-size: 0.92rem;
  color: #333;
  margin: 0;
  padding: 16px 18px 18px;
  line-height: 1.55;
}

.method-figure {
  margin: 30px 0 18px;
  background: #f3f6fb;
  border: 1px solid #2c3a4a;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(30, 40, 55, 0.14);
}
.method-figure img { width: 100%; height: auto; display: block; background: #fff; }
.method-figure figcaption {
  font-size: 0.88rem;
  color: #333;
  padding: 12px 18px;
  background: #dfe6f0;                    /* matches group-head strip */
  border-top: 1px solid #d9c98a;
}

/* ─────────────────────────────── BENCHMARK: 6 cats grid ─────────────────────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.cat-card {
  background: #f3f6fb;
  border: 1px solid #2c3a4a;
  border-radius: 6px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(30, 40, 55, 0.10);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(30, 40, 55, 0.18); }
.cat-card h3 {
  background: #1e2836;
  color: #f5e9c4;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
  padding: 8px 14px 7px;
  border-bottom: 2px solid #ff9d1c;
}
.cat-card p {
  font-size: 0.88rem;
  color: #333;
  margin: 0;
  padding: 12px 14px 14px;
  line-height: 1.5;
}

/* ─────────────────────────────── RESULTS TABLE ─────────────────────────────── */
.table-wrap { overflow-x: auto; }

/* Results table — Terminal-Bench + HELM inspired:
   dark slate header (high contrast), ivory body (warm not white),
   monospace numbers, orange-amber "Ours" accent (HF-style). */
table.results {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.92rem;
  background: #f3f6fb;                  /* cool ivory */
  border: 1px solid #2c3a4a;            /* dark slate outline (matches header) */
  border-radius: 6px;
  overflow: hidden;
  margin-top: 14px;
  box-shadow: 0 4px 16px rgba(30, 40, 55, 0.14);
}
table.results thead {
  background: #1e2836;                  /* Terminal-Bench-style dark slate */
}
table.results thead th {
  color: #f5e9c4;                       /* warm cream text on dark header */
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.78rem;
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: none;
}
table.results th, table.results td {
  padding: 9px 14px;
  text-align: center;
  border-bottom: 1px solid rgba(44, 58, 74, 0.10);
}
table.results td:first-child, table.results th:first-child { text-align: left; }

/* Numbers monospace (JetBrains Mono already loaded on the site) — every td EXCEPT the first (model-name) column */
table.results tbody td:not(:first-child) {
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 0.90rem;
  color: #1b2432;
}

/* Very subtle alternating stripes so long tables stay readable */
table.results tbody tr:nth-child(odd) td { background: rgba(247, 250, 255, 0.95); }
table.results tbody tr:nth-child(even) td { background: rgba(234, 242, 253, 0.85); }

/* Hover: subtle dark tint */
table.results tbody tr:hover td { background: rgba(44, 58, 74, 0.06); }

/* Group-head — Stanford-HELM style small-caps burgundy label */
table.results tr.group-head td,
table.results tr.group-head:hover td {
  background: #dfe6f0;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #8b3a1f;                       /* burgundy label */
  text-align: left;
  font-weight: 700;
  padding: 6px 14px;
  border-bottom: 1px solid #d9c98a;
  border-top: 1px solid #d9c98a;
  font-family: inherit;
}
table.results tr.muted td { color: #7a7060; font-style: italic; }

/* ─────────────────── Toolset help badge (?) + hover panel ─────────────────── */

/* Cell that hosts both the label anchor and the top-right ? badge */
.toolset-cell {
  display: inline-block;
  position: relative;
  padding-right: 14px;                /* room so the badge doesn't overlap text */
}

/* Wrapper that anchors the badge and, on hover, reveals the panel */
.qhelp {
  position: absolute;
  top: -6px;
  right: -2px;
  line-height: 1;
}

/* The circled question-mark badge — top-right superscript */
.qhelp-badge,
.qhelp-badge-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid rgba(30, 60, 120, 0.55);
  background: rgba(247, 250, 255, 0.95);
  color: rgba(30, 60, 120, 0.85);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  user-select: none;
  transition: color .12s, border-color .12s, background .12s, transform .12s;
}
.qhelp-badge:hover,
.qhelp-badge:focus,
.qhelp:hover .qhelp-badge {
  color: #fff;
  border-color: #0c4d92;
  background: #0c4d92;
  outline: none;
  transform: scale(1.10);
}

/* Small in-text version (used in the note paragraph, no wrapper) */
.qhelp-badge-inline { vertical-align: 1px; margin: 0 1px; }

/* The hover panel — position:fixed so it escapes the table's overflow:hidden.
   JS in index.html positions it near the badge on hover. */
.qhelp-body {
  position: fixed;
  min-width: 300px;
  max-width: 380px;
  padding: 12px 14px;
  background: #1e2836;
  color: #f6faff;
  border-radius: 10px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.32);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.80rem;
  line-height: 1.55;
  text-align: left;
  font-weight: 400;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .12s ease, visibility .12s ease;
  z-index: 1000;
  /* JS sets left/top to badge coords on hover */
  left: 0; top: 0;
}
/* Only the JS-added .on class shows the panel — without it the pure CSS
   :hover rule would flash the panel at the viewport top-left corner
   (its default position:fixed origin) before the JS could reposition it. */
.qhelp-body.on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.qhelp-body::before {
  content: "";
  position: absolute;
  right: 14px;
  top: -6px;
  border: 6px solid transparent;
  border-bottom-color: #1e2836;
}

/* Title strip inside the panel */
.qhelp-title {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: #ffb454;
  margin-bottom: 8px;
}

.qhelp-body ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.qhelp-body li {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.qhelp-body li:last-child { border-bottom: none; }
.qhelp-body .qk {
  color: #9ac5ff;
  font-size: 0.72rem;
  font-weight: 500;
  align-self: center;
}
.qhelp-body a {
  color: #ffb454;
  text-decoration: none;
  border-bottom: 1px dotted rgba(255, 180, 84, 0.45);
}
.qhelp-body a:hover { color: #ffd08a; border-bottom-style: solid; }
.qhelp-body .qval-plain { color: rgba(246, 250, 255, 0.65); font-style: italic; }

/* "Ours" row — HF-orange / amber accent, bold contrast */
table.results tr.ours td,
table.results tr.ours:hover td {
  background: linear-gradient(180deg, #ffb454 0%, #ff9d1c 100%);   /* HF-orange amber */
  color: #2b1500;
  border-bottom-color: #d97706;
  font-weight: 600;
}
table.results tr.ours td strong { color: #1a0a00; }
table.results tr.ours td:first-child { color: #1a0a00; }

/* Search-target links inside gallery prompts (named entities the agent looks up) */
.vid-block .prompt a {
  color: #2563eb;                            /* clean modern blue on cream */
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 99, 235, 0.35);
  transition: color 0.15s ease, border-bottom-color 0.15s ease;
}
.vid-block .prompt a:hover {
  color: #1d4ed8;                            /* slightly darker on hover */
  border-bottom-color: #1d4ed8;
  text-decoration: none;
}

/* Model-name links inside results table: subtle underline-on-hover, inherit row color */
table.results td a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted rgba(30, 40, 55, 0.25);
  transition: border-bottom-color 0.15s ease, color 0.15s ease;
}
table.results td a:hover {
  color: #0c4d92;
  border-bottom-color: #0c4d92;
  text-decoration: none;
}
table.results tr.ours td a:hover {
  color: #1a0a00;
  border-bottom-color: #7a3a00;
}
/* Add a subtle left-edge marker on Ours row */
table.results tr.ours td:first-child {
  box-shadow: inset 4px 0 0 #b45309;
  padding-left: 18px;
}

p.note { font-size: 0.85rem; color: #777; margin-top: 10px; }

/* ─────────────────────────────── GALLERY ─────────────────────────────── */
/* GALLERY — no card panel; cat badge + prompt as plain text, then 2 videos side-by-side. */
.vid-stack {
  display: flex;
  flex-direction: column;
  gap: 48px;
  margin-top: 20px;
}

.vid-block { /* no bg, no border — just a stacking container */ }

.vid-cat {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b15c2a;
  background: rgba(177, 92, 42, 0.10);
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.vid-block .prompt {
  font-size: 0.96rem;
  color: #2a2a2a;
  font-style: italic;
  margin-bottom: 18px;
  padding-left: 14px;
  border-left: 3px solid rgba(30, 60, 120, 0.28);
  line-height: 1.55;
}

.vid-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

/* 3-column variant for GT / agentic / baseline triplets (robotics section). */
.vid-triple {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}
.vid-triple figure { margin: 0; }
.vid-triple video {
  width: 100%;
  display: block;
  border-radius: 10px;
  background: #000;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  box-shadow: 0 6px 22px rgba(40, 26, 8, 0.16);
}
.vid-triple figcaption {
  font-size: 0.82rem;
  color: #5a5040;
  text-align: center;
  margin-top: 8px;
  font-weight: 500;
}

/* Compact robotics table: prompt | I2V input | GT | agentic | I2V baseline. */
table.robot-grid {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  font-size: 0.88rem;
  table-layout: fixed;
}
.robot-grid th, .robot-grid td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(30, 60, 120, 0.18);
  vertical-align: middle;
}
.robot-grid thead th {
  text-align: center;
  font-weight: 600;
  color: #5a5040;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(233, 241, 251, 0.55);
  border-bottom: 1.5px solid rgba(30, 60, 120, 0.30);
}
.robot-grid th:first-child, .robot-grid td:first-child { text-align: left; }
.robot-grid td.prompt-cell {
  font-style: italic;
  font-size: 0.86rem;
  color: #2a2a2a;
  line-height: 1.4;
  padding-right: 10px;
}
.robot-grid td.prompt-cell .cat-tag {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-style: normal;
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #b15c2a;
  margin-bottom: 4px;
}
.robot-grid td.media-cell { text-align: center; }
.robot-grid video,
.robot-grid img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
  border-radius: 6px;
  display: block;
  box-shadow: 0 3px 10px rgba(40, 26, 8, 0.14);
}
@media (max-width: 700px) {
  .robot-grid, .robot-grid thead, .robot-grid tbody, .robot-grid th, .robot-grid td, .robot-grid tr {
    display: block;
  }
  .robot-grid thead { display: none; }
  .robot-grid tr {
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(30, 60, 120, 0.18);
    padding-bottom: 14px;
  }
  .robot-grid td { border: none; padding: 6px 0; }
  .robot-grid td.media-cell::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #5a5040;
    margin-bottom: 4px;
  }
}

/* 4-column variant: GT | agentic | I2V input image | I2V output video (robotics). */
.vid-quad {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 12px;
}
.vid-quad figure { margin: 0; }
.vid-quad video,
.vid-quad img {
  width: 100%;
  display: block;
  border-radius: 10px;
  background: #000;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  box-shadow: 0 6px 22px rgba(40, 26, 8, 0.16);
}
.vid-quad figcaption {
  font-size: 0.80rem;
  color: #5a5040;
  text-align: center;
  margin-top: 8px;
  font-weight: 500;
}

.vid-pair figure {
  margin: 0;
  /* The "white panel" is now the video itself — no surrounding card. */
}

.vid-pair video {
  width: 100%;
  display: block;
  border-radius: 10px;
  background: #000;
  aspect-ratio: 16 / 9;
  /* contain = no crop; native-ratio difference becomes black bars,
     but the visible video frame is identical 16:9 for every cell.    */
  object-fit: contain;
  box-shadow: 0 6px 22px rgba(40, 26, 8, 0.16);
}

.vid-pair figcaption {
  font-size: 0.84rem;
  color: #5a5040;
  text-align: center;
  margin-top: 8px;
  font-weight: 500;
}

/* ─────────────────────────────── TRAJECTORY ─────────────────────────────── */
.traj-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 20px;
}

.traj-card {
  background: #f6fafd;
  border: 1px solid rgba(30, 60, 120, 0.18);
  border-radius: 10px;
  padding: 18px 18px 16px;
}

.traj-cat {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #b15c2a;
  background: rgba(177, 92, 42, 0.10);
  padding: 3px 9px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.trajectory {
  background: #0e1620;
  color: #d4dae3;
  padding: 16px 18px;
  border-radius: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  line-height: 1.65;
  overflow-x: auto;
  white-space: pre;
  margin: 0;
}

/* ─────────────────────────────── BIBTEX ─────────────────────────────── */
.bibtex {
  background: #f3f5f8;
  border: 1px solid #e6e8eb;
  padding: 18px 22px;
  border-radius: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  line-height: 1.55;
  color: #1a1a1a;
  overflow-x: auto;
}

/* ─────────────────────────────── FOOTER ─────────────────────────────── */
footer {
  background: #0e1620;
  color: #9aa3ad;
  text-align: center;
  padding: 24px 0;
  font-size: 0.85rem;
}
footer a { color: #b9c6da; }

/* ─────────────────────────────── RESPONSIVE ─────────────────────────────── */
@media (max-width: 900px) {
  .title { font-size: 2.1rem; }
  h2 { font-size: 1.55rem; }
  .tool-groups, .cat-grid, .traj-grid { grid-template-columns: 1fr; }
  .vid-pair { grid-template-columns: 1fr; }
  .vid-triple { grid-template-columns: 1fr; }
  .vid-quad { grid-template-columns: 1fr 1fr; }
  .block { padding: 50px 0; }
  .hero { padding: 60px 0 40px; }
}
@media (max-width: 540px) {
  .title { font-size: 1.7rem; }
  .container { padding: 0 16px; }
  .btn { padding: 9px 14px; font-size: 0.88rem; }
}
