/* The inline preview keeps the original figure and its paper within reach. */
.publication-figure-stack { display:grid; align-content:start; gap:15px; min-width:0; max-width:470px; width:100%; }
.publication-figure { --figure-hover-line:#a5b5d8; --figure-hover-shadow:0 10px 24px #536eae1c,0 2px 5px #536eae0d; --figure-hint-bg:#fafbfeef; --figure-hint-ink:#536eae; }
.academic-site .publication-figure > a { transition:transform .22s cubic-bezier(.2,.7,.3,1),border-color .22s,box-shadow .22s; }
.publication-figure > a[aria-haspopup="dialog"] { cursor:zoom-in; }
.figure-open-hint { position:absolute; top:7px; right:7px; z-index:1; display:flex; align-items:center; justify-content:center; width:27px; height:27px; border:1px solid var(--figure-hover-line); border-radius:6px; color:var(--figure-hint-ink); background:var(--figure-hint-bg); box-shadow:0 2px 6px #22334b0d; opacity:0; pointer-events:none; transition:opacity .18s; }
.figure-open-hint svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.publication h3 > a { transition:color .18s; }
.academic-site:not(.is-reviewing) .publication-figure > a:focus-visible { border-color:var(--figure-hover-line); box-shadow:var(--figure-hover-shadow); }
.academic-site:not(.is-reviewing) .publication-figure > a:focus-visible .figure-open-hint { opacity:1; }
.academic-site:not(.is-reviewing) .publication:has(.publication-figure > a:focus-visible) h3 > a { color:var(--profile-accent); }
@media (hover:hover) and (pointer:fine) {
  .academic-site:not(.is-reviewing) .publication-figure:hover > a { border-color:var(--figure-hover-line); box-shadow:var(--figure-hover-shadow); }
  .academic-site:not(.is-reviewing) .publication-figure:hover .figure-open-hint { opacity:1; }
  .academic-site:not(.is-reviewing) .publication:has(.publication-figure:hover) h3 > a { color:var(--profile-accent); }
}
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  .academic-site:not(.is-reviewing) .publication-figure:hover > a { transform:translateY(-3px); }
}
.academic-site.is-reviewing .publication-figure > a { transition:none; }
html[data-user-color-scheme="dark"] .publication-figure { --figure-hover-line:#98abd5; --figure-hover-shadow:0 10px 24px #080e1b4d,0 2px 5px #080e1b33; --figure-hint-bg:#26334df2; --figure-hint-ink:#cad7f1; }
body.has-figure-viewer { overflow:hidden; }
.figure-viewer { width:1120px; max-width:calc(100vw - 48px); max-height:calc(100dvh - 48px); padding:24px; margin:auto; color:var(--profile-text); background:var(--profile-bg); border:1px solid var(--profile-line); border-radius:8px; box-shadow:0 24px 80px #101b3340; font-family:var(--reading-font); }
.figure-viewer[open] { display:flex; flex-direction:column; }
.figure-viewer::backdrop { background:#111d30ad; }
.figure-viewer-header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin:0 0 18px; flex-shrink:0; }
.figure-viewer-header h2 { font-size:23px; line-height:1.4; margin:0 0 5px; font-weight:500; }
.figure-viewer-header p { font-size:17px; line-height:1.7; margin:0; color:var(--profile-muted); }
.figure-viewer button { color:var(--profile-accent); background:var(--profile-panel); border:1px solid var(--profile-line); border-radius:4px; cursor:pointer; font:inherit; font-size:18px; min-width:42px; min-height:42px; }
.figure-viewer button:hover { border-color:var(--profile-accent); }
.figure-viewer button:disabled { opacity:.35; cursor:default; }
.figure-viewer button.figure-viewer-close { background:none; border:0; font-size:29px; padding:0; flex-shrink:0; }
.figure-viewer-viewport { position:relative; height:min(64dvh,700px); min-height:120px; overflow:auto; overscroll-behavior:contain; border:1px solid #d3dce9; background:white; flex:1 1 auto; }
.figure-viewer-viewport:focus-visible { outline:2px solid var(--profile-accent); outline-offset:2px; }
.figure-viewer-canvas { display:flex; align-items:center; justify-content:center; width:max-content; min-width:100%; min-height:100%; }
.figure-viewer-canvas img { display:block; max-width:none; height:auto; flex-shrink:0; filter:none !important; }
.figure-viewer-canvas img[hidden] { display:none; }
.figure-viewer-status { position:absolute; inset:30% 24px auto; text-align:center; color:#59677d; font-size:18px; line-height:1.7; }
.figure-viewer-hint { margin:9px 0 0; color:var(--profile-muted); font-size:16px; line-height:1.5; }
.figure-viewer-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:14px 24px; margin-top:18px; flex-shrink:0; }
.figure-viewer-zoom { display:flex; gap:7px; align-items:center; }
.figure-viewer-zoom output { min-width:45px; text-align:center; font-size:17px; font-variant-numeric:tabular-nums; }
.figure-viewer-zoom [data-figure-fit] { padding-inline:12px; margin-left:5px; }
.figure-viewer-navigation { display:flex; align-items:center; gap:7px; }
.figure-viewer-navigation[hidden] { display:none; }
.figure-viewer-navigation output { min-width:44px; text-align:center; color:var(--profile-muted); font-family:var(--ui-font); font-size:14px; font-variant-numeric:tabular-nums; }
.figure-viewer-navigation button { display:flex; align-items:center; justify-content:center; }
.figure-viewer-navigation svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.figure-viewer-links { display:flex; gap:19px; font-size:18px; }
.figure-viewer-links a { color:var(--profile-accent); text-decoration:underline; text-underline-offset:4px; }
@media (max-width:760px) {
  .figure-viewer { max-width:calc(100vw - 24px); max-height:calc(100dvh - 24px); padding:16px; }
  .figure-viewer-header { gap:8px; margin-bottom:14px; }
  .figure-viewer-header h2 { font-size:23px; }
  .figure-viewer-header p { font-size:17px; }
  .figure-viewer-viewport { height:min(48dvh,340px); }
  .figure-viewer-toolbar { gap:12px; margin-top:14px; }
  .figure-viewer-links { font-size:17px; }
}
