/* DexRemo — site styles. No build step; edit and reload.
   Type scale: exactly three sizes. --t1 page title, --t2 section heading, --t3 everything else.
   Hierarchy below --t2 comes from weight and colour, never from another size. */
:root {
  --t1: clamp(2.3rem, 5vw, 3.3rem);
  --t2: clamp(1.5rem, 3vw, 2rem);
  --t3: 1rem;

  --paper: #f5f3ee;
  --panel: #ffffff;
  --ink: #15171a;
  --ink-2: #4c5157;
  --ink-3: #6f747b;
  --line: #dcd8cf;
  --accent: #d9480f;        /* the orange of the hand's servo cables */
  --accent-ink: #ffffff;
  --frame-s: #2f6fb3;       /* sensor (local) frame */
  --mute-bar: #b9b4a9;
  --dark: #121416;
  --radius: 10px;
  --sans: "Inter", "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --wrap: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121416;
    --panel: #1b1e21;
    --ink: #ece9e2;
    --ink-2: #b4b1aa;
    --ink-3: #8f9296;
    --line: #2e3236;
    --accent: #ff7a3d;
    --accent-ink: #15171a;
    --frame-s: #6aa9ea;
    --mute-bar: #4a4f55;
    --dark: #0b0c0d;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: var(--t3)/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
/* one size for all running text, labels, tables, buttons and captions */
small, button, input, output, table, th, td, pre, code, figcaption, dt, dd, li, label { font-size: var(--t3); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font-size: var(--t1); font-weight: 800; line-height: 1.08; letter-spacing: -0.035em; }
h2 { font-size: var(--t2); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: var(--t3); font-weight: 700; line-height: 1.35; }
p { margin: 0 0 1em; max-width: 72ch; }
figure { margin: 0; }
.muted, .lead, .note { color: var(--ink-2); }
.lead { margin-top: 10px; }
.note { max-width: 84ch; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
section { padding: 56px 0; }
section + section, .page-head + section { border-top: 1px solid var(--line); }
.head { margin-bottom: 28px; }

/* ---------- header ---------- */
#site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.brand { font-weight: 800; letter-spacing: -0.02em; text-decoration: none; }
.brand span { color: var(--accent); }
#nav { display: flex; gap: 2px; align-items: center; }
#nav a { text-decoration: none; padding: 7px 13px; border-radius: 7px; color: var(--ink-2); }
#nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
#nav a[aria-current] { color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
#nav .gh { border: 1px solid var(--line); margin-left: 10px; }
.menu { display: none; font-family: inherit; background: none; color: inherit;
  border: 1px solid var(--line); border-radius: 7px; padding: 6px 12px; }
@media (max-width: 700px) {
  .menu { display: block; }
  #nav { display: none; position: absolute; left: 0; right: 0; top: 58px; flex-direction: column;
    align-items: stretch; padding: 10px 20px 16px; background: var(--paper); border-bottom: 1px solid var(--line); }
  #site-header.open #nav { display: flex; }
  #nav .gh { margin: 6px 0 0; }
}

/* ---------- "on this page" row ---------- */
.toc { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 22px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); }
.toc span { color: var(--ink-3); }
.toc a { font-weight: 600; text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ---------- buttons + "soon" ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-weight: 600; padding: 9px 17px; border-radius: 8px;
  border: 1px solid var(--ink); color: var(--ink); background: transparent;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:hover { color: var(--accent); border-color: var(--accent); }
.btn.primary:hover { color: var(--accent-ink); filter: brightness(1.08); }
.soon { cursor: default; }
a.soon:hover { color: inherit; }
.btn.soon, .dl a.soon { border-style: dashed; border-color: var(--ink-3); background: transparent; color: var(--ink-3); }
.btn.soon:hover { color: var(--ink-3); border-color: var(--ink-3); filter: none; }
.tag { font-weight: 400; font-style: italic; margin-left: 6px; }
.tag::before { content: "· "; font-style: normal; }

/* ---------- hero ---------- */
.hero { padding-top: 48px; padding-bottom: 48px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 44px; align-items: center; }
.hero h1 span { color: var(--accent); }
.hero .title { font-size: var(--t2); font-weight: 600; line-height: 1.32; letter-spacing: -0.015em; margin: 18px 0 0; max-width: 34ch; }
#authors { margin: 28px 0 6px; }
#affiliations { color: var(--ink-2); margin-bottom: 0; }
.accepted { margin: 16px 0 0; font-weight: 700; }
.accepted::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-right: 9px; }
.hero-media img, .hero-media video { width: 100%; max-height: 560px; object-fit: contain; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 28px; } .hero-media img { max-height: 440px; } }

/* ---------- institution logos: always on white, since the marks are dark-on-light ---------- */
.logos { list-style: none; margin: 36px 0 0; padding: 18px 28px; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-around; gap: 22px 40px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.logos a { display: block; }
.logos img { height: var(--h, 48px); width: auto; }
@media (max-width: 620px) { .logos { padding: 18px; gap: 18px 28px; } .logos img { height: calc(var(--h, 48px) * 0.74); } }

/* ---------- author email icons ---------- */
.author { white-space: nowrap; }
.mail { display: inline-block; vertical-align: -3px; margin-left: 5px; padding: 2px; color: var(--ink-3); border-radius: 4px; }
.mail:hover { color: var(--accent); }
.mail svg { display: block; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }

/* ---------- black banner: the hand ---------- */
.band { background: #000; color: #ece9e2; border: 0 !important; padding: 0; }
.band + section { border-top: 0; }
.band-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: center; }
.band-grid img { max-height: 540px; width: auto; margin: 0 auto; }
.band-grid > div { padding: 48px 0; }
.band .lead { color: #b4b1aa; }
.facts { margin: 22px 0 0; }
.facts div { display: grid; grid-template-columns: 13em 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid #2c3034; align-items: baseline; }
.facts dt { font-size: var(--t2); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; color: #ff7a3d; white-space: nowrap; }
.facts dd { margin: 0; color: #b4b1aa; }
.band .btn { color: #ece9e2; border-color: #6a6e73; }
.band .btn.primary { background: #ff7a3d; border-color: #ff7a3d; color: #15171a; }
@media (max-width: 860px) { .band-grid { grid-template-columns: 1fr; gap: 0; } .band-grid img { max-height: 380px; padding-top: 24px; }
  .band-grid > div { padding: 28px 0 40px; } }
@media (max-width: 520px) { .facts div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- force demo ---------- */
.demo { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.demo svg { width: 100%; height: auto; }
.fd-body { fill: var(--ink); }
.fd-link { stroke: var(--ink); stroke-width: 16; stroke-linecap: round; }
.fd-joint { fill: var(--panel); stroke: var(--ink); stroke-width: 3; }
.fd-tip { fill: var(--ink); stroke: var(--panel); stroke-width: 2; }
.fd-axis { stroke-width: 2.5; }
.fd-axis.w { stroke: var(--accent); }
.fd-axis.s { stroke: var(--frame-s); }
.fd-force { stroke: var(--ink-3); stroke-width: 4; }
.fd-label { font: 600 13px var(--mono); fill: var(--ink-2); }
.fd-body + .fd-label { fill: var(--paper); }
.fd-label.w { fill: var(--accent); } .fd-label.s { fill: var(--frame-s); } .fd-label.f { fill: var(--ink-3); }
.fd-ah-w { fill: var(--accent); } .fd-ah-s { fill: var(--frame-s); } .fd-ah-f { fill: var(--ink-3); }
.readouts { display: flex; flex-direction: column; gap: 22px; justify-content: center; }
.frame h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.frame h3::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.frame.s { --c: var(--frame-s); } .frame.w { --c: var(--accent); }
.frame > p { color: var(--ink-2); margin: 0 0 10px; }
.meter { display: grid; grid-template-columns: 22px 1fr 84px; gap: 10px; align-items: center; font-family: var(--mono); margin: 6px 0; }
.meter span { position: relative; height: 14px; background: color-mix(in srgb, var(--ink) 8%, transparent); border-radius: 4px; }
.meter span::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--ink-3); }
.meter i { position: absolute; top: 0; bottom: 0; background: var(--c); border-radius: 4px; }
.meter b { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.controls { display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.controls label { display: grid; grid-template-columns: 150px 1fr 48px; gap: 10px; align-items: center; }
.controls output { font-family: var(--mono); text-align: right; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.controls button { justify-self: start; font-family: var(--sans); font-weight: 600; color: var(--ink); background: none;
  border: 1px solid var(--ink); border-radius: 7px; padding: 8px 14px; cursor: pointer; }
.controls button:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 820px) { .demo { grid-template-columns: 1fr; padding: 16px; }
  .controls label { grid-template-columns: 1fr 48px; } .controls label input { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- bar charts (single series, direct labels) ---------- */
.chart { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.chart h3 { margin-bottom: 4px; }
.chart > p { color: var(--ink-2); margin-bottom: 18px; }
.chart > p.key { margin: 14px 0 0; }
.vbars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px 10px; align-items: end; height: 230px;
  border-bottom: 1px solid var(--ink-3); padding-top: 30px; }
.vbars div { position: relative; height: calc(var(--v) * 1%); background: var(--mute-bar); border-radius: 4px 4px 0 0; min-width: 0; }
.vbars div.hi { background: var(--accent); }
.vbars div b { position: absolute; left: -6px; right: -6px; top: -28px; text-align: center; font-weight: 600; color: var(--ink); }
.vlabels { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 8px; text-align: center; font-weight: 700; }
.hbars { display: grid; gap: 10px; }
.hbars div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; }
.hbars span { color: var(--ink-2); line-height: 1.25; }
.hbars i { display: block; position: relative; height: 16px; width: calc(var(--v) / 62.5 * (100% - 62px)); background: var(--mute-bar); border-radius: 0 4px 4px 0; }
.hbars i::after { content: attr(data-v); position: absolute; left: calc(100% + 8px); top: -5px; font-style: normal; font-weight: 600; color: var(--ink); white-space: nowrap; }
.hbars .hi i { background: var(--accent); } .hbars .hi span { color: var(--ink); font-weight: 700; }
@media (max-width: 560px) { .hbars div { grid-template-columns: 112px 1fr; } }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }

/* ---------- tasks ---------- */
.tasks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.task { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.task-media { aspect-ratio: 4 / 3; background: #000; }
.task-media img, .task-media iframe { display: block; width: 100%; height: 100%; object-fit: cover; border: 0; }
.clips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.clips button { font-family: inherit; font-weight: 600; color: var(--ink); background: none; border: 1px solid var(--ink);
  border-radius: 7px; padding: 5px 12px; cursor: pointer; }
.clips button::before { content: "▶"; font-size: 0.7em; margin-right: 7px; vertical-align: 1px; }
.clips button:hover { color: var(--accent); border-color: var(--accent); }
.task-body { padding: 12px 16px 16px; }
.task h3 span { color: var(--accent); margin-right: 6px; }
.task p { color: var(--ink-2); margin: 4px 0 0; }
@media (max-width: 860px) { .tasks { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .tasks { grid-template-columns: 1fr; } }

/* ---------- video ---------- */
.poster, .player { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden;
  border: 0; padding: 0; background: var(--dark); cursor: pointer; }
.poster img { width: 100%; height: 100%; object-fit: cover; opacity: 0.72; }
.poster span { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; color: #fff; font-family: var(--sans); font-weight: 700; }
.poster span::before { content: ""; width: 74px; height: 74px; border-radius: 50%; box-shadow: 0 6px 30px rgba(0,0,0,0.4);
  background: #d9480f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 6.5v11l9-5.5z'/%3E%3C/svg%3E") center / 44px no-repeat; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- roadmap ---------- */
.roadmap { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.rel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.rel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.rel-id { font-weight: 800; color: var(--ink-3); }
.status { color: var(--ink-3); }
.rel.next { border-color: var(--accent); }
.rel.next .rel-id, .rel.next .status { color: var(--accent); }
.rel.released .rel-id, .rel.released .status { color: var(--ink); }
.rel.released .status { font-weight: 700; }
.rel p { color: var(--ink-2); margin: 6px 0 0; }
.rel ul { margin: 10px 0 2px; padding-left: 18px; color: var(--ink-2); }
.rel li + li { margin-top: 3px; }
.roadmap.full { grid-template-columns: 1fr 1fr; gap: 16px; }
.roadmap.full .rel { padding: 18px; }
@media (max-width: 980px) { .roadmap { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .roadmap, .roadmap.full { grid-template-columns: 1fr; } }

/* ---------- tables, downloads, prose pages ---------- */
.page-head { padding-top: 48px; padding-bottom: 40px; }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td, tr:last-child th { border-bottom: 0; }
thead tr:last-child th { border-bottom: 1px solid var(--line); }
th { font-weight: 700; color: var(--ink-2); }
td.id { font-weight: 700; color: var(--accent); white-space: nowrap; }
td.n { font-variant-numeric: tabular-nums; }
.dl { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.dl li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 16px; }
.dl li + li { border-top: 1px solid var(--line); }
.dl strong { display: block; } .dl small { color: var(--ink-2); }
.dl a { flex: none; font-weight: 600; text-decoration: none; border: 1px solid var(--ink); border-radius: 7px; padding: 6px 12px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.steps li { counter-increment: s; padding: 14px 0 14px 34px; position: relative; border-top: 1px solid var(--line); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 14px; font-weight: 700; color: var(--accent); }
.steps strong { display: block; }
.steps span { color: var(--ink-2); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.callout { border-left: 3px solid var(--accent); background: var(--panel); padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; }
.callout p:last-child { margin: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.split img { border-radius: var(--radius); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---------- citation + footer ---------- */
.cite { position: relative; }
.cite pre { margin: 0; padding: 20px; overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--mono); line-height: 1.55; }
.cite button { position: absolute; right: 12px; top: 12px; font-family: var(--sans); font-weight: 600; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; cursor: pointer; }
#site-footer { border-top: 1px solid var(--line); padding: 32px 0 44px; }
.foot p { margin: 0 0 6px; max-width: none; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* grid children must be allowed to shrink so wide tables scroll inside their box */
.split > *, .two > *, .demo > *, .hero-grid > *, .band-grid > * { min-width: 0; }

/* ---------- 3D model viewers ---------- */
.model figcaption { margin-top: 10px; font-weight: 700; }
.model-stage { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; padding: 0; background: #e9e7e2; font-family: inherit; }
button.model-stage { cursor: pointer; }
.model-stage img { width: 100%; height: 100%; object-fit: cover; }
.model-stage span { position: absolute; left: 50%; bottom: 16px; translate: -50% 0; white-space: nowrap;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; padding: 8px 16px; border-radius: 8px; }
.model-stage.off img { object-fit: cover; }
.model-stage.off span { background: rgba(0,0,0,0.62); color: #fff; font-weight: 400; }
model-viewer.model-stage { height: auto; --poster-color: transparent; }
.model-wide .model-stage { aspect-ratio: 16 / 9; }
@media (max-width: 620px) { .model-wide .model-stage { aspect-ratio: 4 / 3; } }
.legend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; flex: none; border: 1px solid rgba(0,0,0,0.15); }

/* ---------- paper figures: always on white, since they are drawn for a white page ---------- */
.fig { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.fig img { width: 100%; }
.two > .fig { display: flex; flex-direction: column; justify-content: space-between; }
.two > .fig img { max-height: 340px; object-fit: contain; }
.fig figcaption { margin-top: 10px; color: #4c5157; text-align: center; }
.points { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 28px; }
.points p { color: var(--ink-2); margin: 4px 0 0; }
@media (max-width: 760px) { .points { grid-template-columns: 1fr; gap: 16px; } .fig { padding: 10px; } }

/* ---------- success vs failure viewer ---------- */
dialog.compare { width: min(1280px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); overflow: auto;
  padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); }
dialog.compare::backdrop { background: rgba(0, 0, 0, 0.72); }
.cmp-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.cmp-close { flex: none; font-family: inherit; font-weight: 600; color: var(--ink); background: none; border: 1px solid var(--ink);
  border-radius: 7px; padding: 5px 12px; cursor: pointer; }
.cmp-close:hover { color: var(--accent); border-color: var(--accent); }
.cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cmp-player { aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.cmp-player iframe { display: block; width: 100%; height: 100%; border: 0; }
.cmp-grid figcaption { margin-top: 8px; font-weight: 700; }
.cmp-grid figcaption::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; background: var(--ink-3); }
.cmp-grid figcaption.ok::before { background: #2f9e44; }
.cmp-grid figcaption.fail::before { background: #e03131; }
.cmp-note { color: var(--ink-2); margin: 14px 0 0; max-width: none; }
@media (max-width: 760px) { .cmp-grid { grid-template-columns: 1fr; } dialog.compare { padding: 14px; } }
