:root {
  --ink: #1d232b;
  --muted: #5b6573;
  --line: #e3e7ec;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --accent: #b5522b;      /* tactile / ours */
  --accent-2: #2f5d8a;    /* vision */
  --radius: 10px;
  --max: 1000px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); }
img, video { display: block; max-width: 100%; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  padding: 10px 16px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav .mark { font-weight: 800; letter-spacing: .02em; color: var(--ink); text-decoration: none; }
.nav .mark span { color: var(--accent); }
.nav .links { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; }
.nav .links a { color: var(--muted); text-decoration: none; font-size: 14px; white-space: nowrap; }
.nav .links a:hover { color: var(--ink); }

/* layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
section { padding: 56px 0; }
section.soft { background: var(--bg-soft); }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; }
h2 { font-size: 28px; margin: 0 0 12px; }
h2::before {
  content: ""; display: block; width: 36px; height: 3px;
  background: var(--accent); margin-bottom: 14px; border-radius: 2px;
}
h3 { font-size: 18px; margin: 28px 0 10px; }
.muted { color: var(--muted); }
.lead { font-size: 17px; color: var(--muted); max-width: 780px; }

/* hero */
.hero { text-align: center; padding: 64px 0 32px; }
.hero h1 { font-size: clamp(28px, 4.4vw, 44px); margin: 0 auto 16px; max-width: 900px; }
.hero h1 .acts { color: var(--accent); }
.hero .authors { font-size: 17px; margin: 0; }
.hero .venue { color: var(--muted); margin: 4px 0 22px; }
.buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 999px;
  background: var(--ink); color: #fff; text-decoration: none; font-size: 15px;
}
.btn.disabled { background: #c9ced6; color: #fff; cursor: default; }

/* figures */
.fig { margin: 24px 0 0; }
.fig img { width: 100%; border-radius: var(--radius); background: #fff; }
.fig figcaption, .clip figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.fig.narrow img { max-width: 620px; margin: 0 auto; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }

/* speed */
.speed { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.speed button {
  border: 0; background: #fff; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer; color: var(--muted);
}
.speed button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* player: object buttons, clip buttons, one stage */
.player-bar {
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between;
  margin: 20px 0 10px;
}
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  padding: 6px 16px; border-radius: 999px; font: inherit; font-size: 14px; cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.tabs.clips { margin: 0 0 12px; gap: 4px; }
.tabs.clips .tab { padding: 3px 12px; font-size: 13px; min-width: 34px; }
.tabs.clips .tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); }

/* input / prediction timeline under each clip */
.tl { margin-top: 8px; }
.timeline {
  position: relative; display: flex; gap: 2px; height: 10px; cursor: pointer;
}
.tl-seg { border-radius: 3px; transition: opacity .15s; opacity: .45; }
.tl-seg.active { opacity: 1; }
.tl-input { background: #8a93a0; }
.tl-pred { background: var(--accent); }
.tl-pred.blocks {
  background-image: linear-gradient(90deg, transparent calc(100% - 2px), #fff calc(100% - 2px));
  background-size: calc(100% / var(--blocks)) 100%;
}
.tl-head {
  position: absolute; top: -3px; bottom: -3px; left: 0; width: 2px;
  background: var(--ink); border-radius: 1px; pointer-events: none;
}
.tl-legend { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.tl-key::before {
  content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px;
  margin-right: 6px; vertical-align: -1px;
}
.tl-key-input::before { background: #8a93a0; }
.tl-key-pred::before { background: var(--accent); }
.tl-key.active { color: var(--ink); font-weight: 600; }

/* clips */
.clip { margin: 0; }
.clip video {
  width: 100%; aspect-ratio: 1280 / 576; border-radius: var(--radius); background: #000;
}
.clip.narrow { max-width: 640px; margin: 0 auto; }
.compare { margin-bottom: 16px; }
.failure-mode { color: var(--ink); }
.compare .plot { margin-top: 14px; }
.force-chart { display: block; width: 100%; height: auto; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); }
.fc-history { fill: #eef0f3; }
.fc-grid { stroke: var(--line); }
.fc-thresh { stroke: #9aa3ae; stroke-dasharray: 4 4; }
.fc-tick { font-size: 12px; fill: var(--muted); }
.fc-note { font-size: 11px; fill: #9aa3ae; text-anchor: middle; }
.fc-left, .fc-right { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
.fc-left { stroke: var(--accent-2); }
.fc-right { stroke: var(--accent); }
.fc-head { stroke: var(--ink); stroke-width: 1.5; }
.key { display: inline-block; width: 14px; height: 3px; margin-right: 6px; vertical-align: middle; }
.fc-left-key { background: var(--accent-2); }
.fc-right-key { background: var(--accent); }
.fc-thresh-key { background: repeating-linear-gradient(90deg, #9aa3ae 0 4px, transparent 4px 8px); }


footer { padding: 32px 0 48px; color: var(--muted); font-size: 13px; text-align: center; border-top: 1px solid var(--line); }

@media (max-width: 720px) {
  section { padding: 40px 0; }
  .two-col { grid-template-columns: 1fr; }
  .nav { gap: 14px; }
}
