:root {
  --pink: #e8529a;
  --pink-light: #f5a8d0;
  --pink-dark: #c03a7a;
  --bg: #ffffff;
  --surface: #fafafa;
  --border: #e8e8e8;
  --text: #1a1a1a;
  --text-secondary: #555;
  --max-width: 960px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ── TOP STRIPE ── */
.top-stripe {
  background: var(--pink);
  height: 4px;
}

/* ── HEADER ── */
header {
  background: var(--bg);
  padding: 48px 24px 32px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.logo {
  /* width: 72px; */
  height: 72px;
  flex-shrink: 0;
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
  max-width: 700px;
}

h1 .highlight { color: var(--pink); }
h1 .zero-o { font-family: "Share Tech Mono", monospace; display: inline-block; transform: scaleX(1.35); }

.venue-badge {
  display: inline-block;
  margin-top: 12px;
  background: var(--pink);
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 14px;
  border-radius: 999px;
}

/* ── AUTHORS ── */
.authors-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 24px 0;
  text-align: center;
}

.authors-block {
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.9;
}

.authors-block .costar {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.authors-block .author-name { white-space: nowrap; }
.authors-block sup { font-size: 0.65em; }
.authors-block .heart { color: var(--pink); }

.affiliations {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #888;
}

.contrib-note {
  margin-top: 6px;
  font-size: 0.78rem;
  color: #aaa;
  font-style: italic;
}

/* ── LINKS ── */
.links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 24px 24px 0;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  border: 1.5px solid transparent;
}
.link-btn:hover { opacity: 0.85; transform: translateY(-1px); }

.link-btn.primary   { background: var(--pink); color: white; }
.link-btn.secondary { background: var(--text); color: white; }
.link-btn.outline   { border-color: var(--border); color: var(--text); background: var(--bg); }

/* ── MAIN ── */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 80px;
}

section { margin-top: 60px; }

h2 {
  font-size: 1.45rem;
  font-weight: 800;
  border-left: 4px solid var(--pink);
  padding-left: 12px;
  margin-bottom: 20px;
}

h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 24px 0 10px;
  color: var(--pink-dark);
}

p { margin-bottom: 12px; color: var(--text-secondary); }
p strong { color: var(--text); }

/* ── ABSTRACT ── */
.abstract-box {
  background: #fff8fb;
  border: 1.5px solid var(--pink-light);
  border-radius: 12px;
  padding: 28px 32px;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text);
}
.abstract-box p { color: var(--text); margin: 0; }

/* ── FIGURES ── */
figure {
  margin: 0;
  text-align: center;
}

figure img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
}

figcaption {
  margin-top: 10px;
  font-size: 0.82rem;
  color: #888;
  line-height: 1.5;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
figcaption strong { color: var(--text); }

.fig-hero { margin-bottom: 8px; }

/* ── Interactive chart ── */
.chart-wrap {
  position: relative;
  max-width: min(640px, 100%);
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}
#droid-results-chart {
  display: block;
  width: 100%;
}
.chart-tooltip {
  position: absolute;
  background: rgba(26, 26, 26, 0.88);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  pointer-events: none;
  white-space: nowrap;
  display: none;
  z-index: 10;
}

/* ── ENV TABS ── */
.env-tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.env-tab-bar::-webkit-scrollbar { display: none; }
.env-tab {
  flex-shrink: 0;
  padding: 8px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.15s, border-color 0.15s;
  border-radius: 4px 4px 0 0;
}
.env-tab:hover { color: var(--text); }
.env-tab.active {
  color: var(--pink);
  border-bottom-color: var(--pink);
}
.env-tab-panel { display: none; }
.env-tab-panel.active { display: block; }

.video-letterbox {
  aspect-ratio: 16 / 9;
  display: flex;
  justify-content: center;
  align-items: center;
}
.video-letterbox video {
  height: 100%;
  width: auto;
}

/* ── ENV GRID ── */
.env-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.env-grid img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* ── TABLES ── */
.table-wrap {
  overflow-x: auto;
  margin-top: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}

thead tr {
  background: var(--pink);
  color: white;
}

thead th {
  padding: 10px 12px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}
thead th:first-child { text-align: left; }


tbody td {
  padding: 8px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
}
tbody td:first-child { text-align: left; color: var(--text); font-weight: 500; }

.separator-row td {
  padding: 0;
  height: 2px;
  background: var(--border);
}

tbody tr.ours { background: #fff0f7 !important; }
tbody tr.ours td { color: var(--text); }
tbody .best { font-weight: 800; color: var(--pink-dark); }

.table-caption {
  font-size: 0.82rem;
  color: #888;
  margin-top: 8px;
  line-height: 1.5;
}
.table-caption strong { color: var(--text); }

/* ── SUB-SECTION LABEL ── */
.section-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 6px;
}

/* ── STATS STRIP ── */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 12px;
  text-align: center;
}
.stat-card .num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--pink);
}
.stat-card .lbl {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}


/* ── DEMOS ── */
.demo-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.demo-card {
  text-align: center;
}

.demo-card video {
  width: 100%;
  max-width: 720px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
  margin: 0 auto;
}

.demo-caption {
  margin-top: 10px;
  font-size: 0.82rem;
  color: #888;
  line-height: 1.55;
  margin-bottom: 0;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* ── VIDEO CELLS ── */
td.vc {
  cursor: pointer;
  transition: background 0.12s;
}
td.vc:hover { background: #fce8f3; }
td.vc.selected { outline: 2px solid var(--pink); outline-offset: -2px; font-weight: 700; }

/* ── INLINE VIDEO VIEWER ── */
.vid-inline {
  margin-top: 20px;
  display: none;
}
.vid-inline.active { display: block; }

.vid-inline-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.vid-inline-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.vid-inline-prompt {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.vid-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.vid-item video {
  width: 100%;
  border-radius: 8px;
  display: block;
  border: 3px solid transparent;
}
.vid-item.vid-succ video { border-color: #22c55e; }
.vid-item.vid-fail  video { border-color: #ef4444; }

.vid-label {
  text-align: center;
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 600;
}
.vid-item.vid-succ .vid-label { color: #16a34a; }
.vid-item.vid-fail  .vid-label { color: #dc2626; }

.vid-hint {
  font-size: 0.75rem;
  color: #aaa;
  margin-top: 12px;
  text-align: center;
}

th[data-task-key] { cursor: default; }

/* ── CITATION ── */
.citation-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 24px;
}

.citation-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.bibtex {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 0.8rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  line-height: 1.6;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
  margin-bottom: 10px;
}

.copy-btn {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.copy-btn:hover { background: var(--pink); border-color: var(--pink); color: white; }

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 0.8rem;
  color: #bbb;
  border-top: 1px solid var(--border);
}
footer a { color: var(--pink); text-decoration: none; }

@media (max-width: 600px) {
  .env-grid { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 1.5rem; text-align: center; }
  .logo { width: 52px; height: 52px; }
}

.mobile-br { display: none; }
@media (max-width: 600px) {
  .mobile-br { display: block; }
  .desktop-br { display: none; }
}
