/* ConeGaussian project page */
:root {
  --bg: #f7f8f6;
  --bg-2: #eef1ee;
  --ink: #1c2229;
  --muted: #5b6670;
  --hair: #d9dfe3;
  --accent: #2f6690;        /* ours: steel blue, matches the video labels */
  --accent-soft: #dfe9f2;
  --baseline: #a67c52;      /* baseline: warm tan, matches the video labels */
  --best: #0b6b2d;
  --second: #d97a2a;
  --ref: #8a9198;
  --code-bg: #eceff1;
  --shadow: 0 1px 2px rgba(20, 30, 40, .06), 0 8px 24px rgba(20, 30, 40, .06);
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14181c; --bg-2: #1c2127; --ink: #e8ecef; --muted: #a2adb7; --hair: #303840;
    --accent: #7fb0d6; --accent-soft: #223140; --baseline: #c9a27a; --best: #5cc27a;
    --second: #f0a05a; --ref: #7d868e; --code-bg: #1c2127;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  --bg: #14181c; --bg-2: #1c2127; --ink: #e8ecef; --muted: #a2adb7; --hair: #303840;
  --accent: #7fb0d6; --accent-soft: #223140; --baseline: #c9a27a; --best: #5cc27a;
  --second: #f0a05a; --ref: #7d868e; --code-bg: #1c2127;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: none; margin-inline: 0; }
.centered-copy { margin-inline: 0; }
/* body copy and all small print span the full row and are justified (hero stays centred) */
p, figcaption, .tablenote, .demo-stats, .demo-rowlabel, .small, .cmp-cap, .quali-source { text-align: justify; hyphens: auto; }
.hero, .hero p, .hero div { text-align: center; }
.cmp-cap, .demo-row, .demo-kernels figcaption { text-align: left; }
section { padding-block: 40px; }
section + section { border-top: 1px solid var(--hair); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; text-wrap: balance; margin: 0; }
h2 { font-size: 2rem; margin-bottom: 18px; }
h3 { font-size: 1.35rem; margin: 30px 0 10px; }
h3 .tag, summary .tag { font-family: var(--font-body); font-size: .8rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); margin-left: 10px; vertical-align: middle; }
p { margin: 0 0 14px; }
.lead { font-size: 1.15rem; }
.muted { color: var(--muted); }
small, .small { font-size: .9rem; }

/* ---------- header */
.hero { text-align: center; padding-block: 56px 28px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); display: inline-flex; align-items: center; gap: .35em; flex-wrap: wrap; justify-content: center; }
.hero h1 img { height: 1.1em; width: auto; }
.hero .sub { font-family: var(--font-display); font-size: clamp(1.2rem, 2.6vw, 1.7rem); color: var(--muted); margin-top: 8px; font-style: italic; }
.venue { margin-top: 14px; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .85rem; }
.authors { margin-top: 22px; font-size: 1.1rem; line-height: 1.7; }
.authors span { white-space: nowrap; }
.authors sup { font-size: .7em; color: var(--muted); }
.affil { color: var(--muted); margin-top: 8px; line-height: 1.6; }
.affil sup { font-size: .75em; }
.links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 600; font-size: .95rem; border: 1px solid var(--ink); }
.btn:hover { text-decoration: none; background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { color: #fff; }
.btn svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- media */
figure { margin: 0; }
figcaption { color: var(--muted); font-size: .95rem; margin-top: 10px; line-height: 1.5; }
.frame { background: var(--bg-2); border: 1px solid var(--hair); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.frame video, .frame img { width: 100%; height: auto; }
.fig-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: .9rem; color: var(--muted); margin: 8px 0 0; }
.legend i { display: inline-block; width: 26px; height: 5px; border-radius: 3px; vertical-align: middle; margin-right: 8px; }
.legend .b i { background: var(--baseline); } .legend .o i { background: var(--accent); }

/* ---------- tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; padding: 0; list-style: none; }
.tabs button { font: inherit; font-size: .95rem; font-weight: 600; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--hair); background: var(--bg-2); color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.tabs button:hover { border-color: var(--accent); }
.panel[hidden] { display: none; }

/* ---------- comparison slider */
.cmp-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.cmp { position: relative; user-select: none; touch-action: pan-y; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--hair); background: var(--bg-2); box-shadow: var(--shadow); }
.cmp img { width: 100%; height: auto; display: block; pointer-events: none; }
.cmp .top { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); }
.cmp .top img { width: 100%; height: 100%; object-fit: cover; }
.cmp .handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.35); transform: translateX(-1px); }
.cmp .handle::after { content: "⇔"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 38px; height: 38px; border-radius: 50%; background: #fff; color: #222; display: grid; place-items: center;
  font-size: 18px; font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.cmp .lbl { position: absolute; top: 10px; padding: 4px 10px; border-radius: 6px; font-size: .85rem; font-weight: 700; color: #fff; }
.cmp .lbl.l { left: 10px; background: var(--baseline); }
.cmp .lbl.r { right: 10px; background: var(--accent); }
.cmp input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.cmp-cap { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .92rem; margin-top: 8px; }
.cmp-cap b { color: var(--ink); font-weight: 600; }

/* Viewports into an unchanged supplementary figure; crop metadata in README. */
.supp-spotlight { margin: 28px 0; padding: 20px; border: 1px solid var(--hair); border-radius: 12px; background: var(--bg-2); }
.supp-spotlight h3 { margin-top: 0; }
.supp-spotlight > p:last-child { margin: 16px 0 0; }
.supp-compare-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.source-crop { position: relative; overflow: hidden; aspect-ratio: var(--crop-w) / var(--crop-h); border: 0; border-radius: 8px; }
.source-crop img.crop-img {
  position: absolute; max-width: none; width: calc(100% * var(--source-w) / var(--crop-w)); height: auto;
  left: calc(-100% * var(--crop-x) / var(--crop-w)); top: calc(-100% * var(--crop-y) / var(--crop-h));
  object-fit: fill; image-rendering: pixelated;
}
.quali-triptych { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.quali-label { margin: 0 0 8px; font-size: 1rem; font-weight: 600; }
.quali-view h3 .tag { display: inline-block; }
.quali-source { margin: 10px 0 0; }
.quali-view + .quali-view { margin-top: 28px; }
#qualitative-scenes .tabs { margin-top: 20px; }
@media (max-width: 600px) {
  .supp-spotlight { padding: 14px; }
  .supp-compare-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .quali-triptych { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .quali-view h3 .tag { display: block; margin: 6px 0 0; }
}

/* ---------- tables */
.tablewrap { overflow-x: auto; margin: 10px 0 4px; border: 1px solid var(--hair); border-radius: 10px; background: var(--bg-2); }
table.results { border-collapse: collapse; width: 100%; font-size: .86rem; font-variant-numeric: tabular-nums; min-width: 720px; }
table.results th, table.results td { padding: 6px 10px; text-align: center; white-space: nowrap; border-bottom: 1px solid var(--hair); }
table.results thead th { background: var(--accent-soft); color: var(--ink); font-weight: 700; }
table.results tbody th { text-align: left; font-weight: 500; }
table.results th.dataset { font-weight: 700; vertical-align: middle; border-right: 1px solid var(--hair); background: color-mix(in srgb, var(--bg-2) 60%, var(--bg)); }
table.results th.dataset small { display: block; font-weight: 400; color: var(--muted); font-size: .8em; }
table.results tr.rule > * { border-top: 2px solid var(--hair); }
table.results tr.grouprow th { text-align: left; font-weight: 700; background: var(--bg); color: var(--muted); }
table.results tr:last-child > * { border-bottom: none; }
table.results .sep { color: var(--ref); padding: 0 3px; }
table.results .indent { padding-left: 14px; }
.best { color: var(--best); font-weight: 700; }
.second { color: var(--second); }
.ref { color: var(--ref); }
.tablenote { color: var(--muted); font-size: .92rem; margin: 8px 0 22px; line-height: 1.5; }
details { border: 1px solid var(--hair); border-radius: 10px; padding: 8px 16px; margin: 14px 0; background: var(--bg-2); }
details summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; padding: 6px 0; }
details[open] summary { border-bottom: 1px solid var(--hair); margin-bottom: 10px; }

/* ---------- misc */
.callout { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 16px 0; }
.method-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); padding: 0; margin: 20px 0 0; list-style: none; }
.method-list li { background: var(--bg-2); border: 1px solid var(--hair); border-radius: 10px; padding: 14px 16px; }
.method-list b { display: block; font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 4px; }
pre { background: var(--code-bg); border: 1px solid var(--hair); border-radius: 10px; padding: 14px 16px; overflow-x: auto;
  font-family: var(--font-mono); font-size: .82rem; line-height: 1.5; }
code { font-family: var(--font-mono); font-size: .9em; }
.kbd-note { font-size: .9rem; color: var(--muted); }
footer { padding-block: 30px 50px; color: var(--muted); font-size: .92rem; border-top: 1px solid var(--hair); }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
@media (max-width: 600px) {
  body { font-size: 16px; }
  section { padding-block: 28px; }
  h2 { font-size: 1.6rem; }
  .cmp .handle::after { width: 30px; height: 30px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- interactive footprint demo */
.demo { display: grid; gap: 22px; grid-template-columns: 300px 1fr; margin-top: 16px; align-items: start; }
.demo-controls { background: var(--bg-2); border: 1px solid var(--hair); border-radius: 10px; padding: 12px 14px; display: grid; gap: 6px; font-size: .88rem; }
.demo-row { display: grid; grid-template-columns: 1fr 44px; gap: 2px 8px; align-items: center; }
.demo-row span { grid-column: 1 / -1; color: var(--muted); }
.demo-row input[type=range] { width: 100%; margin: 0; accent-color: var(--accent); }
.demo-row output { font-family: var(--font-mono); font-size: .8rem; text-align: right; font-variant-numeric: tabular-nums; }
.demo-model { grid-template-columns: 1fr; gap: 4px; }
.demo-model label { display: flex; gap: 6px; align-items: flex-start; line-height: 1.35; }
.demo-model input { accent-color: var(--accent); margin-top: 3px; }
.demo-row .btn.small { padding: 5px 12px; font-size: .82rem; }
.demo-buttons { grid-template-columns: 1fr; gap: 6px; margin-top: 6px; }
.demo-group { display: grid; gap: 6px; padding: 8px 0 10px; border-bottom: 1px solid var(--hair); }
.demo-group h4 { margin: 0 0 2px; font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; color: var(--ink); }
.demo-view { min-width: 0; }
.demo-3d { width: 100%; height: 360px; display: block; background: var(--bg-2); border: 1px solid var(--hair); border-radius: 10px; cursor: grab; touch-action: none; }
.demo-3d:active { cursor: grabbing; }
.demo-stats { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); margin: 8px 0 12px; line-height: 1.5; }
.demo-kernels { display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); }
.demo-kernels canvas { width: 100%; aspect-ratio: 1; display: block; background: var(--bg-2); border: 1px solid var(--hair); border-radius: 10px; }
.demo-kernels figcaption { font-size: .82rem; line-height: 1.4; margin-top: 6px; }
.demo-kernels .err { font-family: var(--font-mono); }
.demo-kernels .err.best { color: var(--best); font-weight: 700; }
@media (max-width: 900px) { .demo { grid-template-columns: 1fr; } .demo-kernels { grid-template-columns: repeat(2, 1fr); } }
.demo-rowlabel { font-size: .86rem; color: var(--muted); margin: 14px 0 6px; line-height: 1.4; }
.demo-inline { display: inline-flex; gap: 4px; align-items: center; color: var(--ink); font-weight: 600; margin: 0 4px; }
.demo-inline input { accent-color: var(--accent); margin: 0; }

/* The main comparison uses the same footprint and scale in both panels. */
:root { --fp-vk: #8064a2; --fp-ours: #b65b16; --fp-target: #347a45; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --fp-vk: #c4a7e6; --fp-ours: #f2b16e; --fp-target: #8fca9b; }
}
.fp-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fp-comparison figure { min-width: 0; margin: 0; }
.fp-comparison canvas { width: 100%; aspect-ratio: 1; display: block; border: 1px solid var(--hair); border-radius: 10px; background: var(--bg-2); }
.fp-comparison figcaption { font-size: .95rem; line-height: 1.4; margin-top: 10px; }
.fp-comparison figcaption b { display: block; font-size: 1.05rem; }
.fp-vk { color: var(--fp-vk); }
.fp-ours { color: var(--fp-ours); }
.fp-target { color: var(--fp-target); }
.fp-metric { display: block; font: .76rem/1.5 var(--font-mono); color: var(--muted); margin-top: 6px; }
.fp-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .88rem; margin: 12px 0; color: var(--muted); }
.fp-legend span { display: inline-flex; align-items: center; gap: 7px; }
.fp-legend i { display: inline-block; width: 26px; height: 0; border-top: 2px dashed var(--fp-target); }
.fp-legend .solid { border-top: 3px solid currentColor; }
.fp-heading { margin: 0 0 8px; font-weight: 700; }
.fp-explanation { margin-top: 16px; font-size: .92rem; }
.fp-summary { padding: 12px 14px; margin: 0 0 14px; border-left: 3px solid var(--fp-target); background: var(--bg-2); font-size: .94rem; }
.citation-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.citation-actions .btn { font: inherit; cursor: pointer; }
.references { padding-left: 24px; }
.references li { margin-bottom: 14px; padding-left: 6px; }
.cite { white-space: nowrap; font-size: .85em; vertical-align: super; }
:target { scroll-margin-top: 24px; }
@media (max-width: 480px) {
  .fp-comparison { gap: 10px; }
  .fp-comparison figcaption { font-size: .83rem; }
  .fp-comparison figcaption b { font-size: .93rem; }
  .fp-metric { font-size: .66rem; overflow-wrap: anywhere; }
}

#abstract h2 { text-align: center; }

.cmp-gt { margin-top: 8px; }
.cmp-gt img { width: 100%; border-radius: 8px; border: 1px solid var(--hair); }
.cmp-gt figcaption { margin-top: 4px; font-size: .85rem; text-align: left; }

/* ---------- video scrub bar */
.vidbar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--bg-2);
  border-top: 1px solid var(--hair); }
.vidbar-play { width: 30px; height: 30px; flex: none; border-radius: 50%; border: 1px solid var(--hair);
  background: var(--bg); color: var(--ink); cursor: pointer; position: relative; }
.vidbar-play::before { content: ""; position: absolute; inset: 0; margin: auto; width: 9px; height: 11px;
  background: currentColor; clip-path: polygon(0 0, 0 100%, 40% 100%, 40% 0, 60% 0, 60% 100%, 100% 100%, 100% 0); }
.vidbar.is-paused .vidbar-play::before { width: 10px;
  clip-path: polygon(10% 0, 10% 100%, 100% 50%); }
.vidbar-play:hover { border-color: var(--accent); color: var(--accent); }
.vidbar-seek { flex: 1 1 auto; min-width: 0; margin: 0; accent-color: var(--accent); cursor: pointer; }
.vidbar-time { flex: none; font-family: var(--font-mono); font-size: .78rem; color: var(--muted);
  font-variant-numeric: tabular-nums; }

.authors a, .affil a { color: inherit; text-decoration: none; }
.authors a:hover, .affil a:hover { color: var(--accent); text-decoration: underline; }
