/* UI accents from Paper Colour Palettes.pdf (Paul Tol muted plot palette).
   Scene colors are reserved for render/video assets; institution marks retain their brand colors. */
:root { --primary-color:#72A3FE; --primary-hover:#72A3FE; --text-primary:#242334; --text-secondary:#535465; --text-light:#535465; --background-secondary:#f6f7fb; --gradient-accent:linear-gradient(90deg,#72A3FE,#88ccee); --plot-cyan:#88ccee; --plot-teal:#44aa99; --plot-rose:#cc6677; }
body { font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:var(--text-primary); }
.site-header { border-bottom:1px solid #e5e3ed; padding:1rem 1.5rem; }
.site-header nav { display:flex; justify-content:flex-end; align-items:center; gap:1rem; }
.wordmark { font-size:1.4rem; font-weight:800; color:#72A3FE; }
.pressure-mark { color:#44aa99; letter-spacing:.1rem; margin-left:.45rem; }
.nav-links { display:flex; gap:1.6rem; font-size:.95rem; }
.nav-links a { color:var(--text-secondary); }
.publication-header { position:relative; overflow:hidden; isolation:isolate; background:#182333; }
.hero-mosaic { position:absolute; inset:0; z-index:-2; display:grid; grid-template-columns:1fr 1fr; grid-template-rows:1fr 1fr; gap:8px; opacity:.52; }
.hero-mosaic video { width:100%; height:100%; min-height:0; object-fit:cover; }
.hero-mosaic video:nth-child(2) { object-position:center 30%; }
.hero-mosaic video:nth-child(3) { object-position:center 80%; }
.publication-header::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,rgba(14,24,40,.85),rgba(14,24,40,.68),rgba(14,24,40,.85)); z-index:-1; }
.publication-header .hero-body { padding:4.5rem 1.5rem 3rem; }
.eyebrow { color:#72A3FE; font-size:.9rem; font-weight:600; margin-bottom:1.2rem; }
.publication-title { margin:0 auto!important; max-width:1000px; color:white!important; }
.project-name { display:block; color:#72A3FE; font-size:4.5rem; letter-spacing:-.05em; line-height:1.15; margin-bottom:.75rem; }
.paper-title { display:block; font-size:2.3rem; line-height:1.3; letter-spacing:-.035em; font-weight:700; }
.mosaic-note { text-align:center; color:#dce7f5; font-size:.875rem; padding:0 1rem 1.1rem; }
.author-section { padding:2.3rem 1.5rem 1rem; }
.publication-authors { font-size:1.08rem; line-height:2.2; margin-bottom:.4rem; }
.author-block { white-space:nowrap; margin:0 .6rem; }
.publication-authors a { color:#72A3FE!important; }
sup { font-size:.7em; margin-left:.2em; }
.equal-contribution { font-size:.875rem; color:var(--text-secondary); margin-bottom:1rem; }
.affiliations { display:flex; flex-wrap:wrap; justify-content:center; gap:.3rem 1.1rem; font-size:.95rem; max-width:900px; margin:auto; }
.affiliations span { display:inline-block; }
.institution-logos { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:1rem 1.7rem; margin:1.5rem auto; }
.institution-logos a { height:82px; display:flex; align-items:center; justify-content:center; overflow:hidden; flex:0 0 auto; }
.cmu-logo { width:230px; max-width:none; }
.illinois-logo { width:44px; height:64px; }
.berkeley-logo { width:290px; max-width:none; }
.bosch-logo { width:165px; }
.publication-links { display:flex; flex-wrap:wrap; justify-content:center; gap:.6rem; }
.publication-links .button[disabled] { background:#edf3ff; color:#72A3FE; opacity:1; border:1px solid #d4e2ff!important; box-shadow:none; cursor:default; }
.resource-status { font-size:.875rem; font-weight:400; margin-left:.5rem; }
.section { padding:3.5rem 1.5rem; scroll-margin-top:1rem; }
.overview-section { padding-top:2rem; padding-bottom:1.5rem; }
.research-figure { margin:0; }
.research-figure img { display:block; width:100%; height:auto; }
.research-figure a { display:block; }
figcaption { font-size:.95rem; line-height:1.7; color:var(--text-secondary); margin:1.3rem auto 0; max-width:850px; text-align:center; }
.video-section { padding-top:1rem; }
.video-placeholder { aspect-ratio:16/9; border:1px solid #c8d9f7; border-radius:16px; background:linear-gradient(135deg,#edf3ff,#eff8fb); display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; gap:.5rem; color:#72A3FE; }
.play-symbol { display:grid; place-items:center; font-size:2.7rem; width:80px; height:80px; border-radius:50%; background:white; padding-left:.15rem; margin-bottom:.4rem; }
.video-placeholder h2 { font-size:1.6rem; font-weight:700; }
.video-placeholder p { color:var(--text-secondary); }
.abstract-copy { margin:auto; color:var(--text-secondary); font-size:1.05rem; line-height:1.85; }
.hero.is-light,.citation-section { background:#f6f7fb; }
h3 { font-size:1.45rem; font-weight:700; color:var(--text-primary); margin-bottom:.9rem; }
.panel-intro { text-align:center; max-width:780px; margin:0 auto 2rem; font-size:1.05rem; line-height:1.8; color:var(--text-secondary); }
.task-figure { max-width:820px; margin:3rem auto 0; }
.retargeting-figure { max-width:780px; margin:auto; }
.result-summary { margin:2rem auto 0; max-width:780px; padding:1.5rem; border-left:4px solid #72A3FE; background:#f6f7fb; }
.result-summary strong { color:#72A3FE; font-size:1.8rem; }
.result-summary p { margin-top:.5rem; color:var(--text-secondary); }
.training-flow { display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; margin:2rem auto 3rem; }
.training-flow div { text-align:center; border-top:3px solid #44aa99; background:#f6f7fb; padding:1.5rem .8rem; font-weight:600; }
.policy-results { max-width:800px; margin:auto; }
.policy-results>div { display:grid; grid-template-columns:175px 1fr 65px; gap:1rem; align-items:center; margin:1.3rem 0; }
.bar-track { background:#f1f0f6; height:32px; border-radius:4px; overflow:hidden; }
.bar { width:var(--value); height:100%; }
.bar.baseline { background:#88ccee; }.bar.motion { background:#44aa99; }.bar.ours { background:#72A3FE; }
.results-note { color:var(--text-secondary); font-size:.875rem; text-align:center; margin-top:1.5rem; }
.panel-navigation { display:flex; justify-content:center; align-items:center; gap:1.3rem; margin-top:2.5rem; }
.panel-navigation button { font:inherit; font-size:.95rem; border:1px solid #d4e2ff; background:white; color:#72A3FE; padding:.55rem 1.1rem; border-radius:6px; cursor:pointer; }
.panel-navigation button:disabled { opacity:.45; cursor:default; }
#panel-position { font-size:.875rem; color:var(--text-secondary); }
.footer { padding:2.5rem 1.5rem; background:white; }
.attribution { font-size:.875rem; margin-top:.9rem; color:var(--text-secondary); }
.skip-link { position:absolute; left:1rem; top:-100px; padding:.75rem; background:white; z-index:10; }
.skip-link:focus { top:1rem; }
button:focus-visible,a:focus-visible,[tabindex]:focus-visible { outline:3px solid #72A3FE; outline-offset:3px; }
@media(max-width:768px) { .publication-header .hero-body { padding:3rem 1.25rem 2rem; } .project-name { font-size:3.6rem; } .paper-title { font-size:1.85rem; } .section { padding:2.75rem 1.25rem; } .overview-section { padding-bottom:1rem; } .video-section { padding-top:1rem; } .nav-links { gap:.85rem; font-size:.875rem; } .author-block { margin:0 .4rem; } .institution-logos { gap:.5rem 1rem; } .cmu-logo { width:210px; } .berkeley-logo { width:260px; } .bosch-logo { width:145px; } .institution-logos a { height:72px; } .research-tabs button { font-size:.95rem; padding:.9rem .4rem; } .policy-results>div { grid-template-columns:140px 1fr 55px; gap:.5rem; font-size:.95rem; } }
@media(max-width:480px) { .publication-links .button { width:auto; font-size:.875rem!important; padding:.65rem .85rem!important; } .paper-title { font-size:1.6rem; } .eyebrow { font-size:.875rem; } .publication-authors { font-size:1rem; } .affiliations { font-size:.875rem; gap:.4rem; } .institution-logos { display:grid; grid-template-columns:1fr 1fr; gap:.5rem; } .institution-logos a { width:100%; } .cmu-logo { width:158px; } .berkeley-logo { width:230px; } .bosch-logo { width:125px; } .video-placeholder h2 { font-size:1.25rem; } .play-symbol { width:48px; height:48px; font-size:1.7rem; } .research-tabs button { font-size:.875rem; } .training-flow { grid-template-columns:1fr; gap:.5rem; } .training-flow div { padding:1rem; } .policy-results>div { grid-template-columns:1fr 60px; } .policy-results span { grid-column:1/-1; } }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } *,*::before,*::after { animation:none!important; transition:none!important; } }
@media(max-width:360px) { .site-header { padding:1rem .75rem; } .wordmark { font-size:1.15rem; } .pressure-mark { display:none; } .nav-links { gap:.65rem; } .cmu-logo { width:138px; } }

/* Full-screen title/video hero and optically aligned institution marks. */
:root { --logo-height:44px; }
.site-header { height:72px; display:flex; align-items:center; }
.site-header nav { width:100%; }
.publication-header { min-height:100svh; }
.publication-header .hero-body { display:flex; align-items:center; padding:4rem 2rem; }
.publication-header .container { width:100%; max-width:1200px!important; }
.publication-title { max-width:1200px; }
.project-name { font-size:clamp(5rem,10vw,8.5rem); color:#72A3FE; }
.paper-title { font-size:clamp(2rem,4vw,3.6rem); line-height:1.2; }
.hero-mosaic { opacity:.75; }
.hero,.section { animation:none; }
/* Blue accents with dark text on light surfaces maintain readable contrast. */
.publication-authors a { color:#283c5b!important; text-decoration:underline; text-decoration-color:#72A3FE; text-underline-offset:4px; }
.publication-links .button[disabled],.panel-navigation button,.research-tabs button[aria-selected=true] { color:#283c5b; }
.research-tabs button[aria-selected=true] { border-color:#72A3FE; }
.video-placeholder,.result-summary strong { color:#283c5b; }
.institution-logos { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:2rem; margin:2rem auto; }
.institution-logos a { position:relative; width:auto; height:var(--logo-height); overflow:hidden; flex:0 0 auto; }
.institution-logos img { display:block; width:auto; height:var(--logo-height); max-width:none; }
/* The Berkeley source contains white margins. Crop those margins in layout only. */
/* Berkeley is drawn at 88% of the shared logo height so it sits lighter beside the others. */
.institution-logos { --berkeley-height:calc(var(--logo-height) * .88); }
.institution-logos a:has(.berkeley-logo) { width:calc(var(--berkeley-height) * 5.321905); }
.institution-logos a:has(.berkeley-logo) { height:var(--berkeley-height); }
.institution-logos .berkeley-logo { position:absolute; width:calc(var(--berkeley-height) * 7.809524); height:calc(var(--berkeley-height) * 5); max-width:none; left:calc(var(--berkeley-height) * -1.24381); top:calc(var(--berkeley-height) * -1.980952); }
@media(max-width:768px) {
  :root { --logo-height:48px; }
  .publication-header .hero-body { padding:3rem 1.25rem; }
  .project-name { font-size:clamp(4.5rem,14vw,7rem); }
  .paper-title { font-size:clamp(1.9rem,5.5vw,3rem); }
  .institution-logos { gap:1.5rem; }
}
@media(max-width:480px) { :root { --logo-height:36px; } .institution-logos { gap:1.5rem; } }

/* Navigation and resource controls overlay the opening video mosaic. */
.site-header { position:absolute; inset:0 0 auto; z-index:5; background:transparent; border:0; }
.site-header .wordmark,.site-header .pressure-mark,.site-header .nav-links a { color:#fff; }
.site-header a:focus-visible { outline-color:#fff; }
.publication-header .hero-body { padding-top:calc(72px + 3rem); padding-bottom:3rem; }
.publication-header .publication-links { margin-top:2rem; }
.publication-header .publication-links .button[disabled] { color:#fff; background:rgba(14,24,40,.5); border:1px solid rgba(255,255,255,.7)!important; backdrop-filter:blur(8px); }
.footer .attribution { margin-top:0; }
@media(max-width:480px) { .publication-header .hero-body { padding-top:calc(72px + 1.5rem); padding-bottom:1.5rem; } .publication-header .publication-links { margin-top:1.5rem; } }

/* Research stages. Base (no JS): stacked stages with native horizontal card scrolling.
   With JS (.is-pinned): the section pins as one frame and scrolling is driven stage by stage (see impress.js).
   --gutter is the distance from the screen edge to the 1200px content column; card rows bleed to the screen edge. */
.research-section { --gutter:max(1.5rem,calc((100vw - 1200px) / 2)); --indent:1.5rem; --hp-s:.85rem; --hp-b:clamp(1rem,3vh,2rem); --gap-s:1.25rem; --gap-b:2.25rem; --num-s:1rem; --num-b:1.9rem; --h2-s:1.05rem; --h2-b:clamp(1.5rem,2.6vw,2.2rem); --bp-t:clamp(1rem,3vh,2rem); --bp-b:clamp(.75rem,2vh,1.5rem); --fig-h:420px; --card-max:min(84vw,1200px); padding:4rem 0; background:white; overflow:hidden; }
.research-layout { width:100%; }
.research-stage { margin:0 var(--gutter); border-bottom:1px solid #dfe3ea; }
.stage-header { display:flex; align-items:center; gap:2.25rem; padding:2.4rem var(--indent); border-bottom:1px solid #dfe3ea; }
.stage-number { font-size:1.9rem; font-weight:700; color:#6b7280; font-variant-numeric:tabular-nums; min-width:2.6ch; transition:color .3s; }
.stage-header h2 { font-size:clamp(1.5rem,2.6vw,2.2rem); font-weight:700; color:var(--text-primary); line-height:1.25; margin:0; }
.stage-body { display:grid; grid-template-rows:1fr; }
.stage-body-inner { min-height:0; overflow:hidden; padding:2rem 0 2.5rem; margin:0 calc(-1 * var(--gutter)); }
.research-strip { overflow-x:auto; scroll-snap-type:x mandatory; scroll-padding-inline:calc(var(--gutter) + var(--indent)); padding:0 calc(var(--gutter) + var(--indent)) .25rem; outline-offset:-3px; }
.research-track { display:flex; align-items:flex-start; gap:clamp(1.25rem,2.5vw,2.5rem); width:max-content; will-change:transform; }

/* Frameless cards: the figure itself is the card, sized by its own aspect ratio. */
.research-card { flex:0 0 auto; scroll-snap-align:start; display:flex; flex-direction:column; margin:0; }
.research-card h3 { font-size:1.15rem; font-weight:700; margin:0 0 .75rem; }
.research-card a { display:block; line-height:0; border:1px solid #e4e7ee; border-radius:12px; overflow:hidden; background:white; }
.research-card img { display:block; width:auto; height:auto; max-height:var(--fig-h); max-width:var(--card-max); }
.research-card figcaption,.research-card>p { width:0; min-width:100%; font-size:.95rem; line-height:1.55; color:var(--text-secondary); text-align:left; margin:.75rem 0 0; max-width:none; }
article.research-card { width:clamp(260px,var(--fig-h),460px); }
.retargeting-result { display:flex; flex-direction:column; justify-content:center; min-height:calc(var(--fig-h) * .75); padding:2rem; border-left:4px solid #72A3FE; background:#f6f7fb; border-radius:12px; }
.retargeting-result strong { font-size:clamp(2.5rem,5vw,4rem); line-height:1.1; color:#283c5b; }
.retargeting-result p { margin-top:.75rem; color:var(--text-secondary); line-height:1.6; }
.research-card .training-flow { list-style:none; display:flex; flex-direction:column; gap:.6rem; margin:0; padding:0; counter-reset:flow; }
.research-card .training-flow li { counter-increment:flow; display:flex; align-items:center; gap:.75rem; padding:.95rem 1rem; background:#f6f7fb; border-left:3px solid #44aa99; border-radius:8px; font-weight:600; }
.research-card .training-flow li::before { content:counter(flow); display:grid; place-items:center; width:1.6rem; height:1.6rem; border-radius:50%; background:white; color:#283c5b; font-size:.85rem; }
.research-card .training-flow li:last-child { border-color:#72A3FE; background:#edf3ff; }
.research-card .policy-results { width:100%; margin:0; padding:0; }
.research-card .policy-results>div { grid-template-columns:130px 1fr 55px; gap:.75rem; margin:1rem 0; font-size:.95rem; }
.research-card .results-note { width:auto; min-width:0; text-align:left; margin:.75rem 0 0; }
.research-progress { display:none; height:6px; margin:1.5rem calc(var(--gutter) + var(--indent)) 0; border-radius:999px; background:#e3e6ed; overflow:hidden; }
.research-progress span { display:block; height:100%; width:var(--thumb,30%); border-radius:999px; background:#72A3FE; transform:translateX(var(--offset,0)); }

/* Pinned mode: the whole section is one sticky viewport-height frame. The active stage is open and fills the frame;
   earlier stages collapse to small titles above it, later stages to small titles below it.
   JS sets --total (scroll distance consumed by all stages) and toggles .is-active. */
.research-section.is-pinned { --fig-h:clamp(200px,calc(100svh - 470px),640px); padding:0; height:calc(var(--pin-h,100vh) + var(--total,0px)); overflow:visible; }
.is-pinned .research-layout { position:sticky; top:0; height:var(--pin-h,100vh); display:flex; flex-direction:column; overflow:hidden; padding:clamp(.5rem,3vh,1.5rem) 0; }
/* Each stage's look is interpolated from --e (0 = collapsed title, 1 = open), which impress.js sets from the
   scroll position. There are no time-based transitions here: scrolling through a transition plays it frame by
   frame, and scrolling back reverses it. The body's grid-template-rows (e fr) is also set inline by JS. */
.is-pinned .research-stage { --e:0; flex:var(--e) var(--e) auto; display:flex; flex-direction:column; min-height:0; overflow:hidden; }
.is-pinned .research-stage:last-child { border-bottom:0; }
.is-pinned .stage-pin { flex:1; display:flex; flex-direction:column; min-height:0; }
.is-pinned .stage-header { flex-shrink:0; padding:calc(var(--hp-s) + (var(--hp-b) - var(--hp-s)) * var(--e)) var(--indent); gap:calc(var(--gap-s) + (var(--gap-b) - var(--gap-s)) * var(--e)); border-bottom:1px solid rgba(223,227,234,var(--e)); cursor:pointer; }
.is-pinned .stage-number { font-size:calc(var(--num-s) + (var(--num-b) - var(--num-s)) * var(--e)); color:color-mix(in srgb,#447ddf calc(var(--e) * 100%),#6b7280); }
.is-pinned .stage-header h2 { font-size:calc(var(--h2-s) + (var(--h2-b) - var(--h2-s)) * var(--e)); color:color-mix(in srgb,var(--text-primary) calc(var(--e) * 100%),var(--text-secondary)); }
.is-pinned .stage-header:hover h2,.is-pinned .stage-header:hover .stage-number { color:#447ddf; }
.is-pinned .is-active .stage-header { cursor:default; }
.is-pinned .research-strip { overflow:hidden; scroll-snap-type:none; }
.is-pinned .research-progress { display:block; }
.is-pinned .research-progress[hidden] { display:none; }
.is-pinned .stage-body { grid-template-rows:0fr; }
/* Content fades in over the second half of opening (--e2 = later-starting copy of --e, set by JS). */
.is-pinned .stage-body-inner { opacity:var(--e2,0); transform:translateY(calc((1 - var(--e2,0)) * 24px)); padding-top:calc(var(--bp-t) * var(--e)); padding-bottom:calc(var(--bp-b) * var(--e)); }

@media(max-width:600px) {
  .research-section { --gutter:1rem; --indent:.25rem; --card-max:calc(100vw - 2.5rem); padding:2.5rem 0; }
  .research-section.is-pinned { --fig-h:clamp(160px,calc(100svh - 440px),420px); }
  .research-section { --hp-s:.7rem; --hp-b:1.1rem; --gap-s:.85rem; --gap-b:1rem; --num-b:1.35rem; --h2-b:1.4rem; }
  .stage-header { gap:1rem; padding:1.4rem var(--indent); }
  .stage-number { font-size:1.35rem; }
  article.research-card { width:min(78vw,340px); }
  .research-card .policy-results>div { grid-template-columns:1fr 55px; }
  .research-card .policy-results span { grid-column:1/-1; }
}

/* Collapsible abstract. */
.abstract-toggle summary { display:flex; align-items:center; justify-content:center; gap:.75rem; cursor:pointer; list-style:none; }
.abstract-toggle summary::-webkit-details-marker { display:none; }
.abstract-toggle summary .title { margin:0!important; }
.abstract-toggle summary::after { content:""; width:10px; height:10px; border-right:2px solid #8a93a3; border-bottom:2px solid #8a93a3; transform:rotate(45deg) translate(-2px,-2px); transition:transform .2s; }
.abstract-toggle[open] summary::after { transform:rotate(-135deg); }
.abstract-toggle summary:hover .title { color:#447ddf!important; }
.abstract-toggle .abstract-copy { margin-top:1.5rem; }

.hero-render-mosaic {
  display: block;
}

.hero-render-mosaic video {
  display: block;
  object-fit: cover;
}

.overview-render {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background: #e9e9e9;
}

/* Supplied horizontal CMU and Illinois wordmarks. */
.institution-logos .cmu-logo { height:64px; }
.institution-logos a:has(.cmu-logo) { height:64px; }
.institution-logos .illinois-logo { height:36px; }
@media(max-width:600px) {
  .institution-logos { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
  .institution-logos a { justify-self:center; max-width:100%; }
  .institution-logos .cmu-logo,
  .institution-logos .illinois-logo { width:100%; max-width:100%; height:auto; }
  .institution-logos a:has(.cmu-logo),
  .institution-logos a:has(.illinois-logo) { width:100%; height:48px; }
  .institution-logos a:has(.berkeley-logo) { width:100%; }
  .institution-logos .berkeley-logo { width:146.75%; height:auto; left:-23.375%; top:50%; transform:translateY(-50%); }
}

/* Keep all four institution marks on a single row on desktop; the row may
   extend slightly past the narrow author container, centered on both sides. */
@media(min-width:1024px) {
  .institution-logos { flex-wrap:nowrap; gap:1.5rem; }
}
/* On tablets, use a balanced 2x2 grid instead of a 3+1 wrap. */
@media(min-width:601px) and (max-width:1023px) {
  .institution-logos { display:grid; grid-template-columns:repeat(2,auto); justify-content:center; justify-items:center; align-items:center; gap:1.25rem 2.5rem; }
}

/* One-line dataset summary under the "ImPress Dataset" heading. */
.research-v .research-card>p.dataset-summary { margin:-.25rem 0 1rem; }
.dataset-summary strong { color:var(--text-primary,#283c5b); }

/* Forces Berkeley and Bosch onto a second affiliation line. */
.affiliations { row-gap:0; }
.affiliations span { padding:.15rem 0; }
.affiliations .affiliation-break { flex-basis:100%; height:0; padding:0; }
@media(max-width:600px) { .affiliations .affiliation-break { display:none; } }
