:root{
  --bg:#ffffff;
  --bg-alt:#f6f7fb;
  --fg:#1a1d23;
  --muted:#5b6271;
  --accent:#1f4ea8;
  --accent-soft:#e7efff;
  --border:#e3e6ee;
  --ours:#fff7e3;
  --ours-border:#f0c674;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:var(--sans);
  font-size:17px;
  line-height:1.65;
  color:var(--fg);
  background:var(--bg);
}
.container{max-width:1040px;margin:0 auto;padding:0 24px}

h1,h2,h3{font-weight:650;letter-spacing:-0.01em}
h1{font-size:2.2rem;margin:0 0 .25rem 0}
h2{font-size:1.55rem;margin:0 0 1rem 0}
h3{font-size:1.15rem;margin:2rem 0 .5rem 0}
p{margin:0 0 1rem 0}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}

.hero{
  padding:72px 0 48px;
  background:linear-gradient(180deg,var(--accent-soft) 0%, var(--bg) 100%);
  border-bottom:1px solid var(--border);
  text-align:center;
}
.hero .title{font-size:2.4rem;margin-bottom:.25rem}
.hero .subtitle{font-size:1.15rem;color:var(--muted);margin-bottom:1.5rem}
.authors{font-weight:600;margin:0}
.affil{color:var(--muted);margin:.15rem 0 .2rem}
.venue{color:var(--muted);font-style:italic;margin-bottom:1.5rem}

.hero-links{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin-top:1rem}
.btn{
  display:inline-block;
  padding:9px 16px;
  border:1px solid var(--border);
  border-radius:999px;
  background:#fff;
  color:var(--fg);
  font-weight:600;
  font-size:.95rem;
}
.btn:hover{border-color:var(--accent);color:var(--accent);text-decoration:none}
.btn.disabled{color:#9aa1b1;background:#f0f2f7;cursor:not-allowed}
.btn.disabled:hover{border-color:var(--border);color:#9aa1b1}

.section{padding:56px 0}
.section.alt{background:var(--bg-alt);border-top:1px solid var(--border);border-bottom:1px solid var(--border)}

.teaser{margin:0;text-align:center}
.teaser img{max-width:100%;height:auto;border-radius:10px;border:1px solid var(--border);background:#fff}
.teaser figcaption{color:var(--muted);margin-top:.75rem;font-size:.98rem;max-width:820px;margin-left:auto;margin-right:auto}

.grid-2{
  display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:1rem 0;
}
@media (max-width:760px){.grid-2{grid-template-columns:1fr}}
.grid-2 figure{margin:0;background:#fff;border:1px solid var(--border);border-radius:10px;padding:12px}
.grid-2 img{max-width:100%;height:auto;border-radius:6px;display:block;margin:0 auto}
.grid-2 figcaption{color:var(--muted);font-size:.92rem;margin-top:.4rem}
.paper-fig-grid figure{padding:14px}
.paper-fig-grid img{
  width:100%;
  height:420px;
  object-fit:contain;
  border:1px solid var(--border);
  border-radius:8px;
  background:#fff;
}

.video-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  margin:0.75rem 0 1.5rem;
}
@media (max-width:760px){.video-grid{grid-template-columns:1fr}}
.video-grid figure{
  margin:0;
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  padding:10px;
  position:relative;
}
.video-grid video{
  width:100%;
  height:auto;
  border-radius:6px;
  display:block;
  background:#000;
}
.video-grid figcaption{
  color:var(--muted);
  font-size:.92rem;
  margin-top:.45rem;
}
.status-badge{
  position:absolute;
  top:10px;
  right:10px;
  z-index:2;
  border-radius:999px;
  padding:3px 10px;
  font-size:.78rem;
  font-weight:700;
  line-height:1.2;
  border:1px solid transparent;
}
.status-badge.speedup{
  background:#e8f1ff;
  color:#174ea6;
  border-color:#bfd3ff;
}

.latency-demo{
  margin:1.1rem 0 2rem;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  padding:14px;
}
.latency-head h4{margin:0 0 .3rem}
.latency-meta{
  margin:0 0 .7rem;
  color:var(--muted);
  font-size:.93rem;
}
.latency-controls{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin:0 0 .8rem;
}
.sync-demo{
  margin:.8rem 0 1.8rem;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  padding:12px;
}

.table-wrap{overflow-x:auto;margin:1rem 0 1.5rem}
table.results{
  width:100%;
  border-collapse:collapse;
  font-size:.94rem;
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  overflow:hidden;
}
table.results caption{
  caption-side:top;
  padding:0 0 .55rem;
  color:var(--muted);
  font-size:.92rem;
  line-height:1.45;
  text-align:left;
}
table.results th, table.results td{
  padding:9px 12px;
  border-bottom:1px solid var(--border);
  text-align:center;
}
table.results th{background:var(--bg-alt);font-weight:650}
table.results td:first-child, table.results td:nth-child(2){text-align:left}
table.results tr.ours{background:var(--ours);}
table.results tr.ours td{border-color:var(--ours-border)}
table.results u{text-decoration-thickness:2px;text-underline-offset:3px}

table.hardware-results td{text-align:center}
table.hardware-results td:first-child{text-align:left}
/* Override global .results rule that left-aligns column 2 */
table.hardware-results td:nth-child(2){text-align:center}
table.hardware-results{
  font-size:.88rem;
}
table.hardware-results th, table.hardware-results td{
  padding:8px 10px;
}
.hardware-snap-grid img{
  width:100%;
  height:auto;
  border-radius:6px;
  display:block;
  border:1px solid var(--border);
  background:#f6f7fb;
  min-height:160px;
  object-fit:contain;
}

.hardware-setup-figure{
  margin:0.75rem 0 1.25rem;
  text-align:center;
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  padding:12px;
}
.hardware-setup-figure img{
  max-width:100%;
  width:min(820px, 100%);
  height:auto;
  border-radius:8px;
  display:block;
  margin:0 auto;
  border:1px solid var(--border);
  background:#f6f7fb;
  min-height:140px;
  object-fit:contain;
}
.hardware-setup-figure figcaption{
  color:var(--muted);
  font-size:.92rem;
  margin-top:.5rem;
}
.hardware-sequence-figure{
  margin:0.85rem 0 1.35rem;
  text-align:center;
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  padding:12px;
}
.hardware-sequence-figure img{
  width:100%;
  max-width:980px;
  height:auto;
  border-radius:8px;
  display:block;
  margin:0 auto;
  border:1px solid var(--border);
  background:#f6f7fb;
}
.hardware-sequence-figure figcaption{
  color:var(--muted);
  font-size:.92rem;
  margin-top:.5rem;
}
.hardware-compare-grid img{
  width:100%;
  height:320px;
  object-fit:contain;
  border-radius:8px;
  display:block;
  margin:0 auto;
  border:1px solid var(--border);
  background:#fff;
}

.ghost-grid{display:flex;flex-direction:column;gap:10px;margin:1rem 0}
.ghost-row{
  display:grid;
  grid-template-columns:140px repeat(5, 1fr);
  gap:6px;
  align-items:center;
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  padding:8px;
}
.ghost-row .ghost-label{font-size:.95rem;color:var(--muted);text-align:right;padding-right:8px}
.ghost-row img{width:100%;height:auto;border-radius:4px;display:block}
@media (max-width:760px){
  .ghost-row{grid-template-columns:90px repeat(5, 1fr)}
  .ghost-row .ghost-label{font-size:.8rem}
}

pre{background:#0f172a;color:#e5e7eb;padding:16px;border-radius:10px;overflow:auto}
code{font-family:var(--mono);font-size:.92rem}
pre code{color:inherit}

.math{font-family:"Latin Modern Math", Cambria, Georgia, serif;font-style:italic}
mjx-container{display:inline-block;margin:0 .05em;vertical-align:-0.15em}
table.results mjx-container{vertical-align:middle}

.note{color:var(--muted);font-size:.97rem}

.impl-details{
  margin:.9rem 0 1.4rem;
  padding:.75rem .9rem;
  border-left:3px solid var(--accent);
  background:#f8faff;
  color:#2f3543;
  font-size:.94rem;
}
.protocol-list{
  margin:.35rem 0 1rem 1.2rem;
  padding:0;
}
.protocol-list li{
  margin:0 0 .45rem;
  color:#2f3543;
}

.placeholder-box{
  width:100%;
  height:220px;
  border-radius:8px;
  border:1px dashed #3d4354;
  background:#11161f;
  color:#cad0dd;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-size:.95rem;
  padding:16px;
}
.placeholder-box.tall{height:280px}

.footer{padding:32px 0 56px;color:var(--muted);font-size:.92rem;text-align:center;border-top:1px solid var(--border);background:var(--bg-alt)}
