
  :root {
    --ink:#1e293b; --ink2:#334155; --muted:#64748b; --faint:#94a3b8; --line:#e2e8f0; --soft:#f8fafc;
    --accent:#2563eb; --accent-soft:#eff6ff; --radius:14px;
  }
  * { box-sizing:border-box; }
  html { scroll-behavior:smooth; }
  body { margin:0; font-family:Inter,-apple-system,system-ui,sans-serif; color:var(--ink); background:#fff; line-height:1.6;
         -webkit-font-smoothing:antialiased; }
  .container { max-width:1000px; margin:0 auto; padding:0 24px; }
  .wide { max-width:1240px; }
  section { padding:64px 0; }
  section.alt { background:var(--soft); }
  h2 { font-size:28px; font-weight:700; margin:0 0 18px; letter-spacing:-0.01em; text-align:center; }
  p { margin:0 0 14px; }

  /* hero */
  #hero { padding:72px 0 40px; text-align:center;
          background:radial-gradient(1200px 400px at 50% -80px, #dbeafe 0%, rgba(219,234,254,0) 70%); }
  #hero h1 { font-size:56px; font-weight:800; margin:0; letter-spacing:-0.03em;
             background:linear-gradient(90deg,#1d4ed8,#2563eb 40%,#0ea5e9); -webkit-background-clip:text; background-clip:text; color:transparent; }
  #hero .subtitle { font-size:26px; font-weight:600; margin:10px auto 22px; max-width:820px; line-height:1.35; }
  #hero .authors { color:var(--ink2); font-size:16px; }
  #hero .affil { color:var(--muted); font-size:14px; margin-top:4px; }
  .buttons { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; margin-top:26px; }
  .btn { display:inline-flex; align-items:center; gap:8px; padding:10px 20px; border-radius:50px; border:1px solid var(--line);
         background:#fff; color:var(--ink); font-weight:600; font-size:14px; text-decoration:none; transition:all .15s;
         box-shadow:0 1px 2px rgba(15,23,42,.05); }
  .btn:hover { border-color:var(--accent); color:var(--accent); transform:translateY(-1px); }
  .btn svg { width:16px; height:16px; }

  /* demo */
  .lead { color:var(--ink2); text-align:center; max-width:820px; margin:0 auto 26px; }
  .legend { display:flex; gap:18px; justify-content:center; flex-wrap:wrap; font-size:13px; color:var(--muted); margin:-8px 0 24px; }
  .legend span { display:inline-flex; align-items:center; gap:6px; }
  .legend i { display:inline-block; width:14px; height:10px; border:2px solid; border-radius:2px; }
  /* scene switching: arrows on both sides of the card + dots below */
  .stage { position:relative; }
  .nav { position:absolute; top:50%; transform:translateY(-50%); z-index:3; width:44px; height:44px; border-radius:50%;
         border:1px solid var(--line); background:#fff; color:var(--ink2); cursor:pointer; display:grid; place-items:center;
         box-shadow:0 4px 14px rgba(15,23,42,.12); transition:all .15s; }
  .nav:hover { color:var(--accent); border-color:var(--accent); }
  .nav svg { width:20px; height:20px; }
  .nav.prev { left:-22px; } .nav.next { right:-22px; }
  .dots { display:flex; gap:8px; justify-content:center; align-items:center; margin-top:14px; }
  .dots button { width:9px; height:9px; border-radius:50%; border:none; padding:0; background:#cbd5e1; cursor:pointer; transition:all .15s; }
  .dots button.on { background:var(--accent); width:22px; border-radius:5px; }
  #demo .container.wide, #camctrl .container.wide { max-width:1340px; }
  .card { background:#fff; border:1px solid var(--line); border-radius:20px; padding:22px 22px 16px;
          box-shadow:0 10px 30px rgba(15,23,42,.06); }
  /* square cell size --c is limited by the card width AND the window height (so all four rows fit on screen).
     Row labels sit 10px from the first column; the image columns are --g apart (16-64px, aiming at a 3D view of
     2.6 cells) and the 3D view takes all the remaining width. Gaps are built into the tracks (column-gap 0). */
  .grid { --c: max(min(calc((100% - 40px - 48px) / 5.6), calc((100vh - 250px) / 4)), 110px);
          --g: clamp(16px, calc((100% - 40px - var(--c) * 5.6) / 3), 64px);
          display:grid; row-gap:10px; column-gap:0; align-items:stretch;
          grid-template-columns:30px 10px var(--c) var(--g) var(--c) var(--g) var(--c) var(--g) minmax(0, 1fr); }
  .grid > .rowhead { grid-column:1; }
  .grid > .colhead:nth-child(2), .grid > [data-t=rgb] { grid-column:3; }
  .grid > .colhead:nth-child(3), .grid > [data-t=depth] { grid-column:5; }
  .grid > .colhead:nth-child(4), .grid > [data-t=pcv] { grid-column:7; }
  .grid > .colhead:nth-child(5), .grid > [data-t=ov] { grid-column:9; }
  .grid .cell.ov { aspect-ratio:auto; }
  .grid .colhead { font-size:14px; font-weight:600; color:var(--ink2); text-align:center; padding-bottom:2px; }
  .grid .rowhead { writing-mode:vertical-rl; transform:rotate(180deg); text-align:center; font-weight:600; font-size:15px;
                   color:var(--ink); align-self:center; white-space:nowrap; }
  .grid .rowhead.ours { color:var(--accent); }
  .grid .gap { grid-column:1 / -1; height:4px; border-bottom:1px dashed var(--line); margin-bottom:6px; }
  .cell { position:relative; border-radius:10px; overflow:hidden; background-color:#fff; border:1px solid var(--line);
          background-repeat:no-repeat; background-size:800% 100%; aspect-ratio:1/1; }
  .cell.ov { aspect-ratio:16/9; background-size:cover; }
  .cell canvas { position:absolute; inset:0; width:100%; height:100%; opacity:0; transition:opacity .25s; }
  .cell.ready { background-image:none !important; }
  .cell.ready canvas { opacity:1; }
  .cell.click { cursor:zoom-in; }
  .cell.click::after { content:"Explore in 3D"; position:absolute; right:8px; bottom:8px; font-size:12px; font-weight:600;
                       color:#fff; background:rgba(15,23,42,.72); padding:4px 9px; border-radius:20px; opacity:0; transition:opacity .15s; }
  .cell.click:hover::after { opacity:1; }
  .cell.click:hover { border-color:var(--accent); }
  .row-gt .cell { border-color:#cbd5e1; }
  .controls { display:flex; align-items:center; gap:14px; margin-top:16px; padding:0 0 0 40px; }
  .controls button.play { width:38px; height:38px; border-radius:50%; border:none; background:var(--accent); color:#fff; cursor:pointer;
                          display:grid; place-items:center; flex:0 0 auto; }
  .controls button.play svg { width:16px; height:16px; }
  .timeline { flex:1; position:relative; height:38px; }
  .timeline input { width:100%; margin:0; position:absolute; top:6px; accent-color:var(--accent); }
  .ticks { position:absolute; left:0; right:0; top:24px; display:flex; justify-content:space-between; font-size:11px; color:var(--faint);
           padding:0 2px; pointer-events:none; }
  .ticks b { color:var(--ink); }
  .meta { font-size:12.5px; color:var(--muted); white-space:nowrap; }
  .hint { text-align:center; color:var(--muted); font-size:13px; margin-top:14px; }

  pre.bib { background:#0f172a; color:#e2e8f0; padding:18px 20px; border-radius:12px; font:13px/1.6 "JetBrains Mono",monospace; overflow:auto; }
  footer { padding:28px 0 40px; text-align:center; color:var(--faint); font-size:13px; }

  /* viewer modal */
  #viewer { position:fixed; inset:0; z-index:50; background:rgba(15,23,42,.55); backdrop-filter:blur(3px); display:none;
            align-items:center; justify-content:center; padding:24px; }
  #viewer.open { display:flex; }
  .vpanel { background:#fff; border-radius:18px; width:min(1280px,100%); height:min(860px,100%); display:flex; flex-direction:column;
            overflow:hidden; box-shadow:0 30px 80px rgba(15,23,42,.35); }
  .vbar { display:flex; align-items:center; gap:8px; padding:10px 14px; border-bottom:1px solid var(--line); flex-wrap:wrap; }
  .vbar .title { font-weight:700; margin-right:8px; }
  .tabs { display:flex; gap:4px; background:var(--soft); padding:4px; border-radius:12px; border:1px solid var(--line); }
  .tabs button { border:none; background:transparent; padding:6px 10px; border-radius:9px; font:600 13px Inter,sans-serif; color:var(--ink2); cursor:pointer; }
  .tabs button.on { background:#fff; color:var(--accent); box-shadow:0 1px 3px rgba(15,23,42,.12); }
  .vbar .sp { flex:1; }
  .vbar label { font-size:13px; color:var(--muted); display:flex; align-items:center; gap:6px; }
  .vbar .ghost { border:1px solid var(--line); background:#fff; border-radius:9px; padding:6px 12px; font:600 13px Inter,sans-serif;
                 color:var(--ink2); cursor:pointer; }
  .vbar .ghost:hover { border-color:var(--accent); color:var(--accent); }
  .vbar .close { border:none; background:none; font-size:24px; line-height:1; color:var(--muted); cursor:pointer; padding:0 4px; }
  .vstage { position:relative; flex:1; min-height:0; background:#fff; }
  .vstage canvas { display:block; width:100%; height:100%; outline:none; }
  .vlabel { position:absolute; font-weight:600; font-size:14px; padding:4px 10px; border-radius:20px; background:rgba(255,255,255,.86);
            border:1px solid var(--line); pointer-events:none; }
  .vlabel.ours { color:var(--accent); }
  .vdiv { position:absolute; background:var(--line); pointer-events:none; }
  .vfoot { padding:8px 16px; border-top:1px solid var(--line); font-size:12.5px; color:var(--muted); display:flex; gap:18px; flex-wrap:wrap; }
  .vloading { position:absolute; inset:0; display:grid; place-items:center; color:var(--muted); font-size:14px; pointer-events:none; }

  /* camera control */
  .ccgrid { --c: max(min(calc((100% - 30px - 60px) / 6), calc((100vh - 170px) / 3)), 90px);
            display:grid; grid-template-columns:30px repeat(6, var(--c)); justify-content:space-between; gap:10px; align-items:center; }
  .ccgrid .colhead { font-size:14px; font-weight:600; color:var(--ink2); text-align:center; }
  .ccgrid .colhead.ours { color:var(--accent); }
  .ccgrid .rowhead { writing-mode:vertical-rl; transform:rotate(180deg); text-align:center; font-weight:600; font-size:15px;
                     color:var(--ink); justify-self:center; white-space:nowrap; }
  .ccgrid .sep { grid-column:2 / -1; border-top:1px dashed var(--line); margin:2px 0; }
  .cccell { position:relative; aspect-ratio:1/1; border-radius:8px; overflow:hidden; border:1px solid var(--line);
            background-repeat:no-repeat; background-size:800% 100%; }
  .cccell svg { position:absolute; inset:0; width:100%; height:100%; overflow:visible; }
  .cclegend svg { width:26px; height:16px; vertical-align:middle; }
  @media (max-width: 760px) { .ccgrid { grid-template-columns:22px repeat(6, minmax(0,1fr)); gap:4px; } }
  @media (max-width: 760px) {
    #hero h1 { font-size:42px; } #hero .subtitle { font-size:20px; }
    .grid { grid-template-columns:22px 4px minmax(0,1fr) 4px minmax(0,1fr) 4px minmax(0,1fr) 0 0; } .grid .ovcol { display:none; }
    .nav.prev { left:-14px; } .nav.next { right:-14px; } .nav { width:34px; height:34px; }
  }

/* Paper content and responsive presentation */
[hidden] { display:none !important; }
section { scroll-margin-top:24px; }
a { color:var(--accent); text-underline-offset:3px; }
button, input { font:inherit; }
button, a, input, summary, [tabindex] { -webkit-tap-highlight-color:transparent; }
:focus-visible { outline:3px solid #60a5fa; outline-offset:4px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.skip-link { position:fixed; left:16px; top:12px; transform:translateY(-160%); z-index:100; background:#fff; padding:10px 16px; border:1px solid var(--accent); border-radius:8px; }
.skip-link:focus { transform:none; }
#hero { padding:68px 0 0; }
#hero h1 { font-size:76px; line-height:1.12; }
#hero .subtitle { font-size:30px; letter-spacing:-.025em; margin:14px auto 26px; }
.authors sup { font-size:10px; color:var(--muted); margin-left:3px; }
.authors a { text-decoration:none; }
.authors a:hover { text-decoration:underline; }
.author-gap { display:inline-block; width:24px; }
#hero .affil { display:flex; flex-wrap:wrap; justify-content:center; gap:6px 20px; margin-top:10px; }
.equal { color:var(--muted); font-size:12px; margin-top:10px; }
.btn.primary { background:var(--accent); border-color:var(--accent); color:#fff; }
.btn.primary:hover { background:#1d4ed8; }
.section-nav { display:flex; flex-wrap:wrap; justify-content:center; gap:8px 26px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); padding:18px 0; margin-top:32px; }
.section-nav a { font-size:13px; font-weight:500; color:var(--muted); text-decoration:none; }
.section-nav a:hover { color:var(--accent); }
#generation { padding-top:50px; }
#generation .container.wide { max-width:none; padding:0 24px; }
h2 { line-height:1.3; font-size:30px; letter-spacing:-.025em; }
h3 { font-size:17px; line-height:1.45; margin:0 0 10px; letter-spacing:-.015em; }
.lead { font-size:15px; color:var(--muted); }
.reading { max-width:840px; }
.reading > p:last-child { font-size:16px; line-height:1.9; color:var(--ink2); margin:0; }
.video-grid { display:flex; gap:28px; overflow-x:auto; overscroll-behavior-x:contain; }
.video-grid.auto-carousel { scrollbar-width:none; }
.video-grid.auto-carousel::-webkit-scrollbar { display:none; }
.video-card { flex:0 0 34%; min-width:0; margin:0; background:#fff; border:1px solid var(--line); border-radius:16px; overflow:hidden; }
.video-carousel-controls { display:flex; justify-content:center; margin:18px auto 0; }
.video-carousel-controls button { border:1px solid var(--line); background:#fff; border-radius:20px; color:var(--muted); font-size:12px; padding:6px 16px; cursor:pointer; }
.video-carousel-controls button:hover { color:var(--ink); border-color:var(--muted); }
.video-card figcaption { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; padding:18px 18px 14px; }
.video-card h3 { font-size:18px; margin:0 0 4px; }

.tag { flex-shrink:0; font-size:10px; font-weight:600; color:var(--accent); border:1px solid #dbeafe; background:var(--accent-soft); padding:4px 8px; border-radius:20px; }
.video-card video { display:block; width:100%; aspect-ratio:1; object-fit:contain; background:#0f172a; }

.video-card > .status { padding:0 16px 12px; }
.paper-figure { margin:28px 0; }
.paper-figure img { display:block; width:100%; height:auto; }
.paper-figure a { display:block; }
.paper-figure figcaption { max-width:820px; margin:14px auto 0; color:var(--muted); font-size:12px; text-align:center; line-height:1.7; }



summary { cursor:pointer; font-size:14px; font-weight:600; color:var(--ink2); padding:16px 0; }
details { border-top:1px solid var(--line); }
.table-scroll { width:100%; overflow-x:auto; overscroll-behavior-x:contain; border:1px solid var(--line); border-radius:12px; background:white; }
.results-table { border-collapse:collapse; width:100%; min-width:800px; font-size:12px; font-variant-numeric:tabular-nums; }
.results-table caption { text-align:left; color:var(--muted); padding:15px 18px; font-size:12px; border-bottom:1px solid var(--line); }
.results-table th, .results-table td { text-align:center; padding:11px 12px; border-bottom:1px solid var(--line); white-space:nowrap; }
.results-table th:first-child { text-align:left; }
.results-table tbody th { font-weight:500; }
.results-table thead { background:var(--soft); color:var(--ink2); font-size:11px; }
.results-table thead th { font-weight:600; }
.results-table tbody tr:last-child > * { border-bottom:0; }
.results-table tr.ours { background:var(--accent-soft); }
.results-table tr.ours th { color:#1d4ed8; font-weight:700; }
.results-table .reported { color:var(--muted); }
.table-note { color:var(--muted); font-size:12px; line-height:1.8; margin:14px 0 20px; }
.full-results { margin-top:18px; }
.flow { display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:center; font-size:12px; margin:26px 0 30px; color:var(--muted); }
.flow span:nth-child(odd) { padding:8px 12px; border:1px solid var(--line); border-radius:8px; color:var(--ink2); background:var(--soft); }
.status { color:var(--muted); font-size:12px; text-align:center; min-height:1.6em; margin:0 0 16px; }
.status:empty { display:none; }
.nav:disabled { color:var(--faint); border-color:var(--line); opacity:.45; cursor:default; }
.protocol { margin:24px auto 0; max-width:820px; }
.protocol p { color:var(--muted); font-size:12px; line-height:1.8; }
.camera-results { margin:48px auto 0; max-width:1100px; }
.camera-results h3 { font-size:21px; text-align:center; }
.comparison-scroll { width:100%; overflow-x:auto; overscroll-behavior-x:contain; }
.citation-block { position:relative; margin:16px 0; padding:16px 20px 20px; border-radius:12px; background:#0f172a; }
.citation-toolbar { position:absolute; top:16px; right:20px; display:flex; }
.citation-toolbar button { padding:2px 8px; font-size:11px; line-height:14px; background:#1e293b; color:#e2e8f0; border-color:#334155; box-shadow:none; cursor:pointer; }
.citation-toolbar button:hover { color:#fff; border-color:#94a3b8; }
.citation-block .bib { margin:0; padding:0; background:transparent; border-radius:0; }
@media (max-width:760px) {
  .citation-block { padding-left:14px; padding-right:14px; }
  .citation-toolbar { right:14px; }
  .citation-block .bib { font-size:12px; line-height:1.75; }
}
.footer-brand { font-size:24px; font-weight:800; text-decoration:none; }
footer p { font-size:12px; margin:8px 0 0; }
footer a { color:var(--muted); }
.dots button { position:relative; }
.dots button::before { content:""; position:absolute; inset:-10px -3px; }
.cell.click:focus-visible::after { opacity:1; }
.vpanel { position:relative; }
.vbar .close { position:absolute; right:12px; top:10px; width:32px; height:32px; }
.vbar { padding-right:52px; }
.vloading { text-align:center; padding:24px; z-index:2; }
.vfoot { font-size:11px; }
@media (min-width:761px) and (max-width:1000px) {
  .grid { --c:clamp(85px,12vw,120px); --g:12px; }
}
@media (max-width:1000px) {
  .video-card { flex-basis:70%; }
}
@media (max-width:760px) {
  #generation .container.wide { padding:0 16px; }
  .container { padding:0 20px; }
  section { padding:44px 0; }
  #hero { padding-top:46px; }
  #hero h1 { font-size:60px; }
  #hero .subtitle { font-size:25px; }
  .desktop-break { display:none; }
  .author-gap { width:14px; }
  #hero .authors { font-size:14px; }
  #hero .affil { font-size:12px; gap:4px 12px; }
  .buttons { gap:8px; }
  .btn { padding:10px 14px; font-size:12px; }
  .code-link { overflow-wrap:anywhere; }
  .section-nav { gap:12px 20px; margin-top:24px; }
  h2 { font-size:25px; }
  .lead { font-size:14px; }
  .video-grid { gap:22px; }
  .video-card { flex-basis:100%; }
  .video-card figcaption { padding:16px; }

  .reading > p:last-child { font-size:14px; line-height:1.85; }



  .card { padding:16px 12px; border-radius:14px; }
  .grid .colhead { font-size:10px; }
  .grid .rowhead { font-size:11px; }
  .controls { padding-left:0; gap:8px; flex-wrap:wrap; }
  .timeline { min-width:160px; }
  .controls .meta { width:100%; text-align:center; }
  .cell { border-radius:5px; }
  .cell.click::after { display:none; }
  .ccgrid { min-width:720px; grid-template-columns:24px repeat(6,minmax(0,1fr)); gap:8px; }
  .ccgrid .colhead { font-size:12px; }
  .ccgrid .rowhead { font-size:12px; }
  #viewer { padding:10px; }
  .vpanel { height:95dvh; }
  .vbar { gap:6px; padding:10px 48px 10px 10px; }
  .vbar .sp { display:none; }
  .tabs { flex-wrap:wrap; }
  .tabs button { font-size:11px; padding:6px; }
  .vbar .title { width:100%; font-size:13px; }
  .vbar label { font-size:11px; }
  .vbar .ghost { padding:6px 8px; font-size:11px; }
  .vfoot { gap:4px 12px; }
  .flow { gap:8px; font-size:11px; }
  .flow span:nth-child(odd) { padding:6px 8px; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *, *::before, *::after { transition:none !important; animation:none !important; }
}
