/* FrameCrafter project page */
:root {
  --bg: #faf9f6;
  --bg2: #f1efea;
  --card: #ffffff;
  --ink: #15171b;
  --ink2: #3a3f48;
  --muted: #6b7079;
  --line: #e3e0d9;
  --blue: #2563eb;
  --blue-soft: #dbe6fd;
  --orange: #e8590c;
  --orange-soft: #fde4d4;
  --green: #15935b;
  --stage: #0c0d10;
  --stage2: #17191e;
  --stage-line: #2a2d34;
  --stage-ink: #e9eaee;
  --stage-muted: #9a9eaa;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 14px;
  --wrap: 1120px;
  --wide: 1360px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, canvas { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
::selection { background: var(--orange-soft); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wide { max-width: var(--wide); margin: 0 auto; padding: 0 24px; }
.wide.mid { max-width: 1200px; }
.c-blue { color: var(--blue); }
.c-orange { color: var(--orange); }
.c-green { color: var(--green); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: 56px;
  display: flex; align-items: center;
  background: rgba(250, 249, 246, 0.82);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-100%);
  transition: transform .35s ease;
}
.nav.show { transform: none; }
.nav .wide { display: flex; align-items: center; gap: 28px; width: 100%; }
.nav .brand { font-family: var(--serif); font-size: 24px; color: var(--ink); letter-spacing: -.01em; }
.nav .brand:hover { text-decoration: none; }
.nav .links { display: flex; gap: 22px; margin-left: auto; font-size: 14px; }
.nav .links a { color: var(--ink2); }
.nav .links a.on { color: var(--orange); }
.nav .bar { position: absolute; left: 0; bottom: -1px; height: 2px; background: var(--orange); width: 0; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 36px; text-align: center; }
.venue {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink2);
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card);
}
.venue i { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); display: inline-block; }
.hero h1 { margin: 26px 0 0; font-weight: 400; }
.hero .wordmark {
  display: block;
  font-family: var(--serif); font-size: clamp(64px, 11vw, 132px); line-height: .95; letter-spacing: -.025em;
}
.wordmark .fr { color: var(--blue); }
.wordmark .cr { color: var(--orange); }
.hero .subtitle {
  display: block; margin-top: 14px;
  font-family: var(--serif); font-size: clamp(26px, 3.6vw, 40px); line-height: 1.15; color: var(--ink2);
}
.authors { margin-top: 30px; font-size: 18px; }
.authors a { color: var(--ink); border-bottom: 1px solid var(--line); }
.authors a:hover { text-decoration: none; border-color: var(--ink); }
.authors span + span::before { content: "·"; margin: 0 10px; color: var(--muted); }
.affil { margin-top: 6px; color: var(--muted); font-size: 15px; }
.btns { margin-top: 26px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 15px; font-weight: 500;
  border: 1px solid var(--ink); cursor: pointer;
  transition: transform .15s ease, background .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); background: #2b2f37; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--card); }
.btn svg { width: 16px; height: 16px; }
.tagline {
  margin: 38px auto 0; max-width: 820px;
  font-family: var(--serif); font-size: clamp(24px, 3vw, 34px); line-height: 1.25;
}
.tagline em { color: var(--orange); }

/* ---------- reel (hero mosaic) ---------- */
.reel { background: var(--stage); padding: 28px 0 22px; margin-top: 36px; }
.reel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.reel-tile { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 832 / 480; background: #000; }
.reel-tile video { width: 100%; height: 100%; object-fit: cover; }
.reel-tile span {
  position: absolute; left: 10px; bottom: 8px; font-size: 12px; color: #fff; font-family: var(--mono);
  text-shadow: 0 1px 4px rgba(0, 0, 0, .7); opacity: .9;
}
.reel-cap { color: var(--stage-muted); font-size: 14.5px; text-align: center; margin: 16px auto 0; max-width: 860px; }
.reel-cap b { color: var(--stage-ink); font-weight: 600; }

/* ---------- sections ---------- */
section.sec { padding: 96px 0 24px; }
.kicker {
  font-family: var(--mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--orange);
  display: flex; align-items: center; gap: 10px;
}
.kicker::after { content: ""; flex: 0 0 40px; height: 1px; background: var(--orange); opacity: .5; }
h2.title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(36px, 4.6vw, 56px); line-height: 1.04; letter-spacing: -.015em;
  margin: 14px 0 18px;
}
h3 { font-size: 21px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 8px; }
.lede { font-size: 19px; color: var(--ink2); max-width: 780px; margin: 0 0 30px; }
p { margin: 0 0 16px; }
.sub-h { margin: 64px 0 6px; font-family: var(--serif); font-weight: 400; font-size: 32px; letter-spacing: -.01em; }
.sub-p { color: var(--ink2); max-width: 780px; margin-bottom: 22px; }

/* ---------- tl;dr ---------- */
.tldr { padding: 72px 0 0; }
.tldr .big { font-family: var(--serif); font-size: clamp(28px, 3.4vw, 40px); line-height: 1.2; max-width: 960px; margin: 0; }
.tldr .big .hl { background: linear-gradient(transparent 62%, var(--orange-soft) 0); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 40px 0 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 18px; }
.stat .n { font-family: var(--serif); font-size: 52px; line-height: 1; letter-spacing: -.02em; }
.stat .n small { font-size: 26px; }
.stat .l { margin-top: 10px; font-size: 14.5px; color: var(--ink2); line-height: 1.45; }
.abstract { margin-top: 44px; display: grid; grid-template-columns: 180px 1fr; gap: 28px; }
.abstract h4 { margin: 4px 0 0; font-family: var(--mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.abstract p { color: var(--ink2); font-size: 16.5px; }

/* ---------- method ---------- */
.fig-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.fig-card img { width: 100%; height: auto; cursor: zoom-in; }
.fig-card img.narrow { max-width: 760px; margin: 0 auto; }
.fig-cap { font-size: 14.5px; color: var(--muted); margin-top: 12px; }
.changes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.change { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 18px; display: flex; flex-direction: column; }
.change .no {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 15px; margin-bottom: 12px;
}
.change:nth-child(1) .no { background: var(--blue); }
.change:nth-child(2) .no { background: #7c3aed; }
.change:nth-child(3) .no { background: var(--green); }
.change h3 { font-size: 19px; }
.change p { font-size: 15px; color: var(--ink2); }
.change .viz { margin: 8px 0 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.change .viz svg { width: 100%; height: auto; overflow: visible; }
.change .res { font-size: 14.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.change .res b { color: var(--ink); }
#ropeTokens .tb {
  position: absolute; top: -25px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 13px;
  color: #fff; padding: 1px 5px; border-radius: 5px; white-space: nowrap; transition: background .3s;
}
.rope-msg { text-align: center; min-height: 46px; line-height: 1.45; font-size: 14.5px; color: var(--ink2); margin-top: 8px; }
.seg { display: inline-flex; background: var(--bg2); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button {
  border: 0; background: transparent; padding: 5px 12px; border-radius: 999px; font-size: 13px; cursor: pointer; color: var(--ink2); white-space: nowrap;
}
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.seg.dark { background: #22252c; }
.seg.dark button { color: var(--stage-muted); }
.seg.dark button.on { background: #3a3e47; color: #fff; box-shadow: none; }
.ctrl-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip-btn {
  border: 1px solid var(--line); background: var(--card); padding: 5px 12px; border-radius: 999px; font-size: 13px; cursor: pointer; color: var(--ink2);
  display: inline-flex; align-items: center; gap: 6px;
}
.chip-btn:hover { border-color: var(--ink2); }

/* ---------- dark stage panels (viewers) ---------- */
.stage-panel { background: var(--stage); color: var(--stage-ink); border-radius: 20px; padding: 22px; }
.stage-panel .muted { color: var(--stage-muted); }
.scene-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.scene-chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1px solid var(--stage-line); background: var(--stage2); color: var(--stage-muted);
  padding: 3px 10px 3px 3px; border-radius: 999px; font-size: 12.5px;
}
.scene-chip img { width: 28px; height: 19px; object-fit: cover; border-radius: 999px; }
.scene-chip.on { border-color: #fff; color: #fff; }
.scene-chip.light { background: var(--card); border-color: var(--line); color: var(--ink2); }
.scene-chip.light.on { border-color: var(--ink); color: var(--ink); }

.rig { position: relative; border-radius: 12px; overflow: hidden; background: #08090b; min-height: 300px; border: 1px solid var(--stage-line); }
.rig canvas { width: 100% !important; height: 100% !important; touch-action: pan-y; }
.rig .hint {
  position: absolute; left: 12px; bottom: 10px; font-size: 12px; color: var(--stage-muted); font-family: var(--mono); pointer-events: none;
}
.rig .legend {
  position: absolute; left: 12px; top: 10px; font-size: 12px; color: var(--stage-muted); font-family: var(--mono); pointer-events: none; line-height: 1.7;
}
.rig .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.rig .fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--stage-muted); font-size: 13px; padding: 20px; text-align: center; }
.thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.thumbs img, .thumbs .th {
  width: 100%; aspect-ratio: 832 / 480; object-fit: cover; border-radius: 6px; cursor: pointer;
  border: 2px solid transparent; opacity: .75; transition: opacity .2s, border-color .2s, transform .2s;
}
.thumbs img:hover { opacity: 1; }
.thumbs img.on { border-color: var(--orange); opacity: 1; }
.thumbs.inputs img { border-color: rgba(37, 99, 235, .7); cursor: default; opacity: 1; }
.thumbs.inputs img.lit { border-color: #fff; transform: translateY(-3px); box-shadow: 0 6px 18px rgba(37, 99, 235, .55); }
.row-label { font-family: var(--mono); font-size: 12px; color: var(--stage-muted); display: flex; justify-content: space-between; gap: 10px; margin: 2px 0 -4px; }
.row-label .k { color: #8fb0ff; }
.row-label .q { color: #ff9d66; }
.tnav { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12.5px; color: var(--stage-muted); }
.tnav button {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--stage-line); background: var(--stage2); color: var(--stage-ink);
  font-size: 19px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0 0 3px; transition: border-color .2s, color .2s;
}
.tnav button:hover { border-color: #ff9d66; color: #ff9d66; }
.tnav .q { color: #ff9d66; min-width: 86px; text-align: center; }
.tnav .meta { margin-left: auto; text-align: right; }

/* wipe slider */
.wipe { position: relative; border-radius: 10px; overflow: hidden; background: #000; user-select: none; -webkit-user-select: none; cursor: ew-resize; touch-action: pan-y; }
.wipe img, .wipe video { -webkit-user-drag: none; user-select: none; pointer-events: none; }
.wipe > img, .wipe > video { width: 100%; height: auto; display: block; }
.wipe .top { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); }
.wipe .top > img, .wipe .top > video { width: 100%; height: 100%; object-fit: cover; }
.wipe .handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #fff; transform: translateX(-1px); pointer-events: none; box-shadow: 0 0 8px rgba(0, 0, 0, .5); }
.wipe .handle::after {
  content: "‹ ›"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 36px; height: 36px; border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center;
  font-size: 15px; font-weight: 700; letter-spacing: 2px; box-shadow: 0 2px 10px rgba(0, 0, 0, .4);
}
.wipe .lab {
  position: absolute; top: 10px; padding: 3px 10px; border-radius: 6px; font-size: 12.5px; font-family: var(--mono);
  background: rgba(0, 0, 0, .62); color: #fff; pointer-events: none; backdrop-filter: blur(4px);
}
.wipe .lab.l { left: 10px; }
.wipe .lab.r { right: 10px; }
.wipe .lab.ours { background: rgba(232, 89, 12, .9); }
.wipe .lab.gt { background: rgba(21, 147, 91, .9); }

/* results switch */
.res-top { display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap; margin-bottom: 18px; }
.res-tabs button { font-size: 14px; padding: 7px 16px; }
.res-cap:empty { display: none; }
.res-cap { margin: 0; font-size: 13.5px; color: var(--stage-muted); flex: 1; min-width: 260px; }
.res-pane[hidden] { display: none; }
.viewer { display: grid; grid-template-columns: 1fr 1.55fr; gap: 16px; }
.mainview { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.itw { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.itw img { width: 100%; border-radius: 10px; background: #fff; cursor: zoom-in; display: block; }

/* theater */
.theater { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.theater .vid { position: relative; border-radius: 12px; overflow: hidden; background: #000; }
.theater .vid video { width: 100%; height: auto; display: block; }
.theater .side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.theater .rig { flex: 1; min-height: 260px; }
.tl { position: relative; height: 26px; margin-top: 4px; }
.tl .track { position: absolute; left: 0; right: 0; top: 12px; height: 2px; background: var(--stage-line); }
.tl .key { position: absolute; top: 6px; width: 3px; height: 14px; background: var(--blue); border-radius: 2px; transform: translateX(-1px); }
.tl .head { position: absolute; top: 4px; width: 12px; height: 18px; border-radius: 3px; background: var(--orange); transform: translateX(-6px); }
.badge-gen {
  position: absolute; top: 10px; left: 10px; font-family: var(--mono); font-size: 12px; padding: 3px 9px; border-radius: 6px;
  background: rgba(232, 89, 12, .9); color: #fff; transition: background .15s;
}
.badge-gen.input { background: rgba(37, 99, 235, .92); }

/* denoise */
.dn { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
.dn .main { position: relative; border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 832 / 480; }
.dn .main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dn .hud {
  position: absolute; left: 12px; top: 10px; font-family: var(--mono); font-size: 12.5px; color: #fff;
  background: rgba(0, 0, 0, .55); padding: 4px 10px; border-radius: 6px; backdrop-filter: blur(4px);
}
.dn .side { display: flex; flex-direction: column; gap: 12px; }
.dn figcaption { font-size: 12px; font-family: var(--mono); color: var(--stage-muted); margin-top: 4px; }
.dn .inputs6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dn .inputs6 img { border-radius: 6px; border: 2px solid rgba(37, 99, 235, .75); aspect-ratio: 832 / 480; object-fit: cover; }
.scrub { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.scrub input[type=range] { flex: 1; accent-color: var(--orange); }
.play {
  width: 38px; height: 38px; border-radius: 50%; border: 0; background: #fff; color: #111; cursor: pointer; display: grid; place-items: center; flex: none;
}
.play svg { width: 14px; height: 14px; }
.strip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-top: 14px; }
.strip figure { margin: 0; cursor: pointer; }
.strip img { border-radius: 6px; aspect-ratio: 832 / 480; object-fit: cover; width: 100%; opacity: .8; }
.strip figure.on img { outline: 2px solid var(--orange); opacity: 1; }
.strip figcaption { text-align: center; }

.dn-chart svg { width: 100%; height: auto; display: block; margin-top: 6px; }
.dn-chart text { font-family: var(--sans); }
.dn-explain { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--stage-line); font-size: 14px; color: var(--stage-muted); line-height: 1.55; }
.dn-explain b { color: var(--stage-ink); font-weight: 600; }
.dn-explain .mono { color: #d8dbe2; font-size: 13px; }
.c-dn1 { color: #ffb38a !important; }
@media (max-width: 860px) { .dn-explain { grid-template-columns: 1fr; } }

/* comparisons */
.cmp-ctrl { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--stage-muted); margin-bottom: 16px; }
.cmp-ctrl .seg button { min-width: 34px; }
.cmpv { grid-template-columns: minmax(0, 1fr) minmax(0, 500px); }
.cmpv .wipe { aspect-ratio: 1; }
.cmpv .wipe > img { height: 100%; object-fit: cover; }
.cmpv .thumbs img { aspect-ratio: 1; }
.tnav .vs { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; font-family: var(--sans); font-size: 13.5px; }
.sel { position: relative; display: inline-block; }
.sel select {
  appearance: none; -webkit-appearance: none; background: #22252c; color: #fff; border: 1px solid #3a3e47; border-radius: 999px;
  padding: 7px 36px 7px 15px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.sel select:hover { border-color: #5b5f68; }
.sel select:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.sel::after {
  content: ""; position: absolute; right: 15px; top: 50%; width: 7px; height: 7px; pointer-events: none;
  border-right: 2px solid #c9ccd4; border-bottom: 2px solid #c9ccd4; transform: translateY(-70%) rotate(45deg);
}


/* tables */
.tbl-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table.res { border-collapse: collapse; width: 100%; font-size: 14.5px; font-variant-numeric: tabular-nums; }
table.res th, table.res td { padding: 10px 12px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.res th { font-weight: 600; font-size: 13px; color: var(--ink2); background: var(--bg); }
table.res td:first-child, table.res th:first-child { text-align: left; padding-left: 18px; }
table.res tr:last-child td { border-bottom: 0; }
table.res tr.ours td { background: #fff6f0; font-weight: 600; }
table.res tr.sep td { border-top: 2px solid var(--line); }
table.res td.r1, table.res tr.ours td.r1 { background: #ffd2c2; }
table.res td.r2, table.res tr.ours td.r2 { background: #ffe3c8; }
table.res td.r3, table.res tr.ours td.r3 { background: #fff1c9; }
table.res .grp { border-left: 1px solid var(--line); }
.tbl-note { font-size: 13.5px; color: var(--muted); margin-top: 10px; }
.legend-rank { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.legend-rank span { padding: 1px 8px; border-radius: 4px; color: var(--ink); }

/* analysis */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.perm-inputs { display: flex; gap: 8px; position: relative; }
.perm-inputs .pi { position: relative; flex: 1; transition: transform .6s cubic-bezier(.65, .02, .25, 1); }
.perm-inputs img { width: 100%; border-radius: 6px; border: 2px solid rgba(37, 99, 235, .7); aspect-ratio: 336 / 192; object-fit: cover; }
.perm-inputs .t {
  position: absolute; top: -9px; left: 6px; font-family: var(--mono); font-size: 11px; background: #2a2d34; color: #fff; padding: 0 6px; border-radius: 5px;
}
.perm-outs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.perm-outs figure { margin: 0; }
.perm-outs .ph { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 336 / 192; background: #000; }
.perm-outs .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.perm-outs figcaption { margin-top: 8px; font-size: 14px; display: flex; justify-content: space-between; gap: 10px; }
.perm-outs figcaption b { font-weight: 600; }
.perm-outs .ours .ph { outline: 2px solid var(--orange); outline-offset: 2px; }
.perm-ctrl { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.permid { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.bars { width: 100%; height: auto; }
.chart { width: 100%; height: auto; }
.chart text, .bars text { font-family: var(--sans); }

/* quote / discussion */
.quote {
  font-family: var(--serif); font-size: clamp(26px, 3.2vw, 38px); line-height: 1.22; margin: 0; max-width: 980px;
}
.quote::before { content: "“"; color: var(--orange); margin-right: 4px; }
.quote::after { content: "”"; color: var(--orange); margin-left: 2px; }

/* video + poster + bib */
.video-box { border-radius: 16px; overflow: hidden; background: #000; }
.video-box video { width: 100%; }
pre.bib {
  background: var(--stage); color: #d8dbe2; border-radius: var(--radius); padding: 22px 24px; overflow-x: auto;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.6; margin: 0; position: relative;
}
.bib-wrap { position: relative; }
.copy { position: absolute; top: 12px; right: 12px; background: #2a2d34; color: #fff; border: 0; border-radius: 8px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
footer { padding: 60px 0 50px; color: var(--muted); font-size: 13.5px; border-top: 1px solid var(--line); margin-top: 90px; }
footer p { max-width: 980px; }

/* lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(10, 11, 14, .92); z-index: 100; display: none; place-items: center; padding: 30px; cursor: zoom-out; }
.lightbox.show { display: grid; }
.lightbox img { max-width: 96vw; max-height: 92vh; background: #fff; border-radius: 8px; }

/* ---------- extreme camera paths ---------- */
.path-views { margin-bottom: 14px; }
.path-views button { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 5px 14px 5px 5px; }
.path-views button b {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #3a3e47; color: #fff;
  font-size: 12px; font-weight: 600; transition: background .2s;
}
.path-views button.on b { background: var(--orange); }
.path-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.path-row figure { margin: 0; }
.path-row .ph { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #000; cursor: zoom-in; border: 2px solid transparent; }
.path-row .ours .ph { border-color: var(--orange); }
.path-row img { width: 100%; height: 100%; object-fit: cover; }
.path-row figcaption { text-align: center; font-size: 14.5px; font-weight: 600; color: var(--stage-ink); margin-top: 8px; line-height: 1.25; }
.path-row figcaption small { display: block; font-weight: 400; font-size: 12px; color: var(--stage-muted); margin-top: 2px; }
.path-row .ours figcaption { color: #ff9d66; }
.paths { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: start; }
.paths .rig { height: 250px; min-height: 0; }
.paths .thumbs { grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.paths-note { font-size: 12.5px; color: var(--stage-muted); margin: 14px 0 0; }
.perm-two { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.perm-two .card h3 { margin-top: 0; }

/* reveal on scroll */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.rv.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .reel-grid { grid-template-columns: repeat(3, 1fr); }
  .reel-tile:nth-child(n+7) { display: none; }
  .changes { grid-template-columns: 1fr; }
  .viewer, .theater, .dn, .perm-two { grid-template-columns: minmax(0, 1fr); }
  .viewer .mainview { order: -1; }
  .rig { min-height: 320px; }
  .nav .links { gap: 14px; }
}
@media (max-width: 860px) {
  body { font-size: 16px; }
  .wrap, .wide { padding: 0 16px; }
  .nav .links { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .abstract { grid-template-columns: 1fr; gap: 6px; }
  .paths { grid-template-columns: minmax(0, 1fr); }
  .path-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 8px; }
  .path-row figcaption { font-size: 13.5px; }
  .path-views { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 14px; }
  .path-views button { flex-direction: column; gap: 4px; padding: 7px 4px 8px; border-radius: 11px; font-size: 12px; line-height: 1.25; white-space: normal; text-align: center; }
  .tnav { gap: 8px; }
  .tnav .q { min-width: 72px; }
  .tnav .vs { font-size: 13px; gap: 6px; }
  .tnav .vs .fc { display: none; }
  .tnav .sel select { font-size: 13px; padding: 6px 30px 6px 12px; }
  .tnav .sel::after { right: 12px; }
  .itw { grid-template-columns: 1fr; }
  .res-tabs button { font-size: 13px; padding: 6px 12px; }
  .res-tabs .lg { display: none; }
  .scrub { flex-wrap: wrap; gap: 10px 14px; }
  .scrub input[type=range] { min-width: 0; }
  .scene-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px 14px; padding: 0 14px 4px; scrollbar-width: none; }
  .scene-chips::-webkit-scrollbar { display: none; }
  .scene-chip { flex: none; }
  .perm-outs figcaption { flex-direction: column; gap: 0; }
  .two { grid-template-columns: 1fr; }
  .strip { grid-template-columns: repeat(4, 1fr); }
  .reel-grid { grid-template-columns: repeat(2, 1fr); }
  .reel-tile:nth-child(n+5) { display: none; }
  section.sec { padding-top: 72px; }
  .stage-panel { padding: 14px; border-radius: 16px; }
  .thumbs { gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .perm-inputs .pi { transition: none; }
}
