@font-face {
  font-family: "Paper Math";
  src: url("assets/paper-math.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #18203a;
  --muted: #505d74;
  --line: #dce4f1;
  --blue: #214bc7;
  --blue-tint: #edf3ff;
  --teal: #087e73;
  --paper: #ffffff;
  --canvas: #f5f8fe;
  --coral: #b64262;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #4a74fd; outline-offset: 4px; }
button { color: inherit; font: inherit; cursor: pointer; }
h1, h2, h3, p, figure { margin: 0; }
h2 { font-size: clamp(2rem, 4vw, 3.15rem); line-height: 1.06; letter-spacing: -.05em; }
h3 { font-size: 1.12rem; }
p { line-height: 1.6; }
img { display: block; max-width: 100%; }
small { color: var(--muted); font-size: .88rem; }
[hidden] { display: none !important; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px max(5vw, calc((100% - 1240px) / 2));
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 1.35rem; font-weight: 780; letter-spacing: -.045em; }
.brand picture { flex: none; }
.brand img { object-fit: contain; }
.top nav { display: flex; flex-wrap: wrap; justify-content: end; gap: 10px clamp(14px, 3vw, 30px); font-size: .9rem; font-weight: 650; }

.hero {
  padding: 42px max(5vw, 20px) 54px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0, #eaf1ff, transparent 69%), #fff;
}
.hero-logo { margin: 0 auto 12px; object-fit: contain; }
.hero h1 {
  max-width: 1050px;
  margin: 0 auto;
  font-size: clamp(2.25rem, 4.15vw, 3.85rem);
  font-weight: 765;
  line-height: 1.035;
  letter-spacing: -.062em;
  text-wrap: balance;
}
.authors { max-width: 840px; margin: 25px auto 0; font-size: clamp(.93rem, 1.5vw, 1.1rem); font-weight: 650; line-height: 1.75; }
.authors a { text-decoration: underline; text-decoration-color: #aabbed; text-underline-offset: 4px; }
sup { font-size: .7em; color: var(--blue); }
.affiliations { max-width: 830px; margin: 8px auto 0; color: var(--muted); font-size: .87rem; }
.actions { display: grid; gap: 10px; margin: 26px auto 0; }
.action-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.action-dot { margin-inline: 6px; color: var(--blue); }
.button, .arxiv-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 15px;
  border: 1px solid #c5d1e7;
  border-radius: 7px;
  background: var(--paper);
  font-size: .92rem;
  line-height: 1.4;
  font-weight: 680;
}
.button:hover { border-color: var(--blue); background: var(--blue-tint); }
.button.primary { background: var(--blue); border-color: var(--blue); color: white; }
.button.primary:hover { background: #183aab; }
.arxiv-status small { margin-left: .55em; font-size: .72em; font-weight: 600; }

.section { padding: clamp(46px, 6vw, 82px) max(5vw, calc((100% - 1240px) / 2)); scroll-margin-top: 20px; }
.section-heading { display: grid; gap: 12px; margin-bottom: 25px; }
.section-heading p { max-width: 68ch; color: var(--muted); font-size: 1.04rem; }
.method { padding-top: 24px; }
.method > .section-heading, .method-player { width: min(100%, 1040px); margin-inline: auto; }
.method-player {
  overflow: hidden;
  border: 1px solid #ccd9f0;
  border-radius: 14px;
  background: #fcfdff;
  box-shadow: 0 16px 46px #20376812;
}
.player-controls { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.method-player.is-playing .player-controls::after { position: absolute; inset: auto 0 -1px; height: 2px; content: ""; background: var(--blue); transform-origin: left; animation: playback 17s linear both; }
@keyframes playback { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.step-buttons, .tables-nav { display: flex; flex-wrap: wrap; gap: 7px; }
.step-buttons button, .tables-nav button, .play-button {
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  font-size: .9rem;
  font-weight: 665;
}
.step-buttons button:hover, .tables-nav button:hover { background: #edf3ff; }
.step-buttons button[aria-pressed="true"], .tables-nav button[aria-pressed="true"] { color: var(--blue); background: var(--blue-tint); border-color: #c6d6fa; }
.play-button { background: var(--ink); color: white; }
.play-button:hover { background: var(--blue); }
.player-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(170px, 214px) minmax(0, 1fr);
  justify-items: center;
  gap: clamp(18px, 2.3vw, 30px);
  padding: clamp(15px, 2.5vw, 30px);
  background: radial-gradient(ellipse at 0 70%, #e9f0ff 0, transparent 60%), radial-gradient(ellipse at 100% 25%, #e8f8f4 0, transparent 58%), #f9fbff;
}
.figure-gallery {
  grid-row: span 2;
  align-self: start;
  width: 100%;
  padding: 13px;
  background: #ffffffd9;
  border: 1px solid #d3dff2;
  border-radius: 12px;
}
.method-player[data-step="figure"] .player-stage { grid-template-columns: minmax(0, 1fr); }
.method-player[data-step="figure"] .figure-gallery-grid { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.method-player[data-step="figure"] .figure-gallery,
.method-player[data-step="selected"] .figure-gallery { grid-row: auto; }
.figure-gallery h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-bottom: 10px; font-size: .94rem; }
.figure-gallery-count { color: var(--muted); font-size: .76rem; font-weight: 600; }
.figure-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  max-height: 440px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 4px 5px 4px 4px;
}
.figure-flight {
  position: absolute;
  z-index: 20;
  max-width: none;
  object-fit: contain;
  background: white;
  border: 1px solid #5276dc;
  border-radius: 8px;
  box-shadow: 0 5px 20px #4768ba45;
  pointer-events: none;
}
.source-image > img.figure-in-flight { opacity: 0; }
.figure-gallery button {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1.02;
  padding: 3px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d8e2f2;
  border-radius: 6px;
  transition: border-color .23s ease, box-shadow .23s ease, transform .23s ease;
}
.figure-gallery button:hover { border-color: #557be7; transform: translateY(-2px); }
.figure-gallery button[aria-pressed="true"] {
  border-color: #365fd1;
  box-shadow: inset 0 0 0 1px #365fd1, 0 0 0 2px #d7e4ff;
}
.figure-gallery button[aria-pressed="true"]::after {
  position: absolute;
  right: 2px;
  bottom: 2px;
  display: grid;
  place-items: center;
  width: 1.3em;
  height: 1.3em;
  content: "✓";
  border-radius: 50%;
  background: #365fd1;
  color: white;
  font-size: .7rem;
  font-weight: 800;
}
.figure-gallery-grid img { width: 100%; height: 100%; object-fit: contain; }
.figure-context {
  display: grid;
  width: min(100%, 700px);
  grid-template-columns: minmax(115px, 167px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(12px, 3vw, 32px);
}
.experiment-context {
  padding: 13px 15px;
  border-inline-start: 2px solid #c1cfe4;
  background: #edf3fa;
  border-radius: 0 8px 8px 0;
  font-size: .86rem;
  color: var(--muted);
}
.experiment-context h4 { margin: 0 0 5px; color: #304665; font-size: .9rem; }
.experiment-context p { line-height: 1.45; }
.source-caption { display: inline-block; margin-top: 10px; color: var(--blue); font-weight: 670; text-decoration: underline; text-underline-offset: 3px; }
.method-player[data-preview] .figure-context { display: block; width: min(620px, 100%); }
.method-player[data-preview] .experiment-context { display: none; }
.method-player[data-preview] .source-image > img {
  max-height: 320px;
  object-fit: contain;
  aspect-ratio: 1.36;
}
.source-figure, .panel-card { min-width: 0; }
.source-figure > figcaption { margin-bottom: 9px; color: var(--ink); font-weight: 730; text-align: center; }
.source-image { position: relative; background: white; border: 1px solid #5276dc; border-radius: 10px; box-shadow: 0 0 0 3px #dce7ff; }
.source-image > img { width: 100%; height: auto; border-radius: inherit; }
.method-player[data-step="selected"] .source-image { animation: select-whole-figure .75s ease-out; }
@keyframes select-whole-figure {
  45% { box-shadow: 0 0 0 5px #b9cfff, 0 6px 18px #537be938; }
}
.source-frame {
  position: absolute;
  display: block;
  left: var(--frame-left);
  width: var(--frame-width);
  top: 68.1%;
  min-width: 0;
  border: 2px solid var(--panel-color);
  border-radius: 4px;
  background: color-mix(in srgb, var(--panel-color) 7%, transparent);
  box-shadow: 0 0 0 1px #fff;
  z-index: 2;
  visibility: hidden;
}
.frame-micro, .microscopy { --panel-color: #3e67d3; --panel-tint: #eef3ff; }
.frame-chart, .chart { --panel-color: #bc4974; --panel-tint: #fff0f6; }
.frame-micro { --frame-left: 32.83%; --frame-width: 65.28%; height: 30.48%; }
.frame-chart { --frame-left: 1.13%; --frame-width: 30.94%; height: 31.05%; }
.source-frame:hover, .method-player[data-step="exact"] .frame-micro, .method-player[data-show-sibling] .source-frame {
  visibility: visible;
  background: color-mix(in srgb, var(--panel-color) 19%, transparent);
  box-shadow: 0 0 0 2px #fff, 0 0 12px var(--panel-color);
}
.method-player[data-step="exact"] .frame-micro,
.method-player[data-show-sibling] .frame-chart { animation: frame-in .35s cubic-bezier(.2,.75,.3,1) both; }
@keyframes frame-in {
  from { opacity: 0; transform: scale(1.06); }
  to { opacity: 1; transform: scale(1); }
}
.paired-panels {
  --caption-gap: clamp(23px, 4vw, 51px);
  width: min(100%, 700px);
  display: grid;
  position: relative;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--caption-gap);
  min-width: 0;
}
.panel-card {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 3;
  gap: 10px;
  padding: clamp(8px, 1.3vw, 16px);
  border-radius: 12px;
  background: #fff;
  border: 1px solid #d8e2f0;
  transition: border-color .3s, box-shadow .3s;
}
.panel-card figcaption { grid-row: 1; font-size: clamp(.79rem, 1.45vw, 1.05rem); font-weight: 730; color: #243858; }
.panel-letter {
  display: inline-grid;
  place-items: center;
  height: 1.45em;
  width: 1.45em;
  margin-right: 3px;
  border-radius: 4px;
  color: var(--panel-color);
  background: var(--panel-tint);
}
.panel-image { grid-row: 3; display: block; width: 100%; height: clamp(97px, 12vw, 165px); object-fit: contain; border-radius: 6px; }
.panel-text {
  grid-row: 2;
  padding: 8px 9px;
  font-size: clamp(.74rem, 1.05vw, .92rem);
  border: 1px solid transparent;
  border-left: 3px solid var(--panel-color);
  background: var(--panel-tint);
  border-radius: 7px;
  visibility: hidden;
}
.caption-role { display: block; margin-bottom: 3px; color: var(--panel-color); font-weight: 740; }
.panel-text p { line-height: 1.4; }
.panel-text mark { color: inherit; background: transparent; }
.method-player:not([data-step="figure"]) .microscopy, .method-player[data-show-sibling] .chart {
  border-color: var(--panel-color);
  box-shadow: 0 9px 24px color-mix(in srgb, var(--panel-color) 15%, transparent);
}
.method-player:not([data-step="figure"]) .microscopy .panel-text,
.method-player[data-show-sibling] .chart .panel-text { visibility: visible; }
.method-player[data-step="exact"] .microscopy .panel-text,
.method-player[data-show-sibling] .chart .panel-text { animation: caption-reveal .45s .68s ease-out both; }
.method-player[data-show-sibling] .panel-text mark {
  background: #ffedaa;
  box-shadow: 0 0 0 2px #ffedaa;
  box-decoration-break: clone;
  animation: highlight-context .56s 1.22s ease-out both;
}
@keyframes caption-reveal {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes highlight-context {
  from { background: transparent; box-shadow: 0 0 0 2px transparent; }
}
.stage-announcement { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.learning-summary {
  padding: 16px clamp(18px, 4vw, 48px) 19px;
  border-top: 1px solid #d9e4f7;
  background: #f3f7ff;
  color: #273e62;
}
.learning-summary h3 { margin-bottom: 6px; color: #263e82; }
.learning-summary p { font-size: .93rem; }
.learning-summary p + p { margin-top: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .learning-summary > * { animation: learning-reveal .38s ease-out both; }
  .learning-summary p { animation-delay: .28s; }
  .learning-summary p + p { animation-delay: .58s; }
}
@keyframes learning-reveal {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.paper-abstract { padding-block: 32px 48px; }
.paper-abstract h2, .method-overview h3 { text-align: center; }
.paper-abstract p { max-width: 94ch; margin: 20px auto 0; color: var(--muted); }
.method-overview { margin-top: clamp(36px, 5vw, 62px); }
.method-overview > h3 { font-size: clamp(1.65rem, 3vw, 2.55rem); letter-spacing: -.04em; }
.full-figure img { width: min(100%, 1100px); height: auto; margin: 22px auto; border: 1px solid var(--line); border-radius: 12px; }
.method-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 940px; margin: 22px auto 0; }
.method-points article {
  --point-color: #4268cf;
  --point-tint: #edf2ff;
  position: relative;
  overflow: hidden;
  padding: 14px 16px;
  border-radius: 8px;
  background: linear-gradient(150deg, var(--point-tint), #fff 78%);
  border: 1px solid var(--line);
  transition: transform .24s, box-shadow .24s, border-color .24s;
}
.method-points article:nth-child(2) { --point-color: #b64262; --point-tint: #fff0f5; --point-delay: .1s; }
.method-points article:nth-child(3) { --point-color: #087e73; --point-tint: #e9f8f4; --point-delay: .2s; }
.method-points article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--point-color);
  transform-origin: left center;
}
.method-points article.is-visible { animation: rise-point .42s var(--point-delay, 0s) ease-out both; }
.method-points article.is-visible::before { animation: fill-metric .54s var(--point-delay, 0s) ease-out both; }
.method-points article:hover { transform: translateY(-3px); border-color: var(--point-color); box-shadow: 0 6px 16px #2b436318; }
@keyframes rise-point { from { opacity: .6; translate: 0 7px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .method-points article:hover { transform: none; } }
.method-points h4 { margin: 0 0 5px; }
.method-points p { color: var(--muted); font-size: .91rem; }
details { padding: 13px 0; }
details + details { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 650; }
details p { margin: 10px 0; max-width: 80ch; color: var(--muted); }

.datasets { border-top: 1px solid var(--line); }
.dataset-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); align-items: center; gap: clamp(20px, 5vw, 78px); }
.dataset-copy { display: grid; gap: 22px; }
.dataset-item + .dataset-item { padding-top: 22px; border-top: 1px solid var(--line); }
.dataset-count { color: var(--blue); font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.1; font-weight: 760; letter-spacing: -.05em; }
.dataset-count span:not(.dataset-count-value) { font-size: .8em; }
.dataset-count-value { font-variant-numeric: tabular-nums; }
.dataset-item.is-visible h3 { animation: rise-point .4s ease-out both; }
.dataset-item.is-visible p:not(.dataset-count) { animation: rise-point .47s .11s ease-out both; }
.dataset-item p:not(.dataset-count) { color: var(--muted); margin: 5px 0 12px; }
.dataset-figure { max-width: 620px; justify-self: center; }
.dataset-figure img { height: auto; }
.dataset-figure figcaption { margin-top: 12px; color: var(--muted); font-size: .92rem; line-height: 1.5; }

.results { background: var(--canvas); border-block: 1px solid #e4ebf8; }
.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin: 24px 0 28px; }
.metrics-legend { display: flex; grid-column: 1/-1; flex-wrap: wrap; gap: 8px 20px; color: #4c5c78; font-size: .83rem; font-weight: 650; }
.metrics-legend span { display: inline-flex; align-items: center; gap: 7px; }
.metrics-legend i { width: .72em; height: .72em; border-radius: 2px; background: #3868e9; }
.metrics-legend span + span i { background: #8395bb; }
.metric-card {
  --metric-accent: #6186ed;
  --metric-wash: #edf3ff;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 13px;
  padding: clamp(11px, 1.4vw, 19px);
  min-width: 0;
  background: radial-gradient(ellipse 95% 80% at 100% 0, var(--metric-wash) 0%, transparent 100%), #fff;
  border-radius: 10px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--metric-accent);
  box-shadow: 0 4px 12px #263f7910;
  transition: box-shadow .24s, transform .24s, border-color .24s;
}
.metric-card:nth-of-type(3) { --metric-accent: #42a9a5; --metric-wash: #e7f7f4; }
.metric-card:nth-of-type(4) { --metric-accent: #a67aeb; --metric-wash: #f5eeff; }
.metric-card:hover {
  transform: translateY(-3px);
  border-color: var(--metric-accent);
  box-shadow: 0 9px 18px #263f7924;
}
.metric-card p { margin-top: 4px; color: var(--muted); font-size: .83rem; }
.metric-bars { min-width: 0; display: grid; align-self: end; gap: 4px; }
.metric-track {
  display: grid;
  align-items: center;
  grid-template-columns: var(--score) 1fr;
  gap: 8px;
  color: #234694;
  font-size: clamp(.82rem, 1.3vw, 1rem);
  font-variant-numeric: tabular-nums;
}
.metric-track i { display: block; width: 100%; height: 7px; border-radius: 2px; background: #3868e9; transform-origin: left center; }
.metric-track.baseline { color: #4c5c78; }
.metric-track.baseline i { height: 5px; background: #8395bb; }
.metric-card.is-visible .metric-track i { animation: fill-metric .68s cubic-bezier(.22,.72,.36,1) both; }
.metric-card.is-visible .metric-track.baseline i { animation-delay: .08s; }
@keyframes fill-metric { from { transform: scaleX(.08); } to { transform: scaleX(1); } }
@media (max-width: 680px) { .metrics { grid-template-columns: minmax(0,1fr); gap: 9px; } }
@media (prefers-reduced-motion: reduce) { .metric-card:hover { transform: none; } }
.tables-nav { margin-top: 28px; }
.tables-nav button { border-color: #d8e1f0; background: white; }
.result-block { margin-top: 22px; }
.result-block > p { margin: 8px 0 16px; color: var(--muted); }
.result-block a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.paper-results-table { width: 100%; border-collapse: collapse; table-layout: fixed; background: white; font-variant-numeric: tabular-nums; font-size: clamp(.73rem, 1vw, .88rem); }
.paper-results-table th:first-child { width: 15%; text-align: left; padding-left: 10px; }
.paper-results-table th, .paper-results-table td { padding: 9px 5px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.paper-results-table thead th { text-align: right; color: #263b65; background: #e9f0fe; }
.paper-results-table thead th[colspan] { text-align: center; }
.paper-results-table tbody th { font-weight: 500; }
.biomedflickr-table th:first-child { width: 22%; }
.paper-results-table .our-model { background: #e8f1ff; color: #17356e; }
.paper-results-table .our-model th { box-shadow: inset 3px 0 #3766e4; }
.result-block + .result-block { margin-top: 38px; }

pre { overflow-x: auto; margin: 10px 0; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: #f3f6fc; color: #1f365e; font-size: .85rem; line-height: 1.6; }
pre[id] { scroll-margin-top: 24px; }
.citation { padding-top: 18px; }
.citation .section-heading { display: flex; align-items: center; justify-content: space-between; }
footer { padding: 26px max(5vw, calc((100% - 1240px) / 2)); color: var(--muted); border-top: 1px solid var(--line); }
.footer-acknowledgment { margin: 12px 0 0; color: #3d4d68; font-size: .95rem; }
.footer-acknowledgment a { text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 900px) {
  .paper-results-table, .paper-results-table tbody { display: block; background: transparent; }
  .paper-results-table thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .paper-results-table tr { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); margin-bottom: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: white; }
  .paper-results-table tbody th:first-child { grid-column: 1/-1; width: auto; padding-left: 5px; font-size: .9rem; }
  .paper-results-table th, .paper-results-table td { border: 0; text-align: left; }
  .paper-results-table td::before { display: block; content: attr(data-label); color: var(--muted); font-size: .74rem; }
  .paper-results-table .our-model th { box-shadow: none; }
}
@media (max-width: 680px) {
  .hero { padding-top: 28px; }
  .top { padding: 12px 5%; }
  .top nav { gap: 6px 12px; font-size: .82rem; }
  .brand { gap: 2px; font-size: 1.15rem; }
  .brand img { width: 36px; height: 36px; }
  .player-stage { grid-template-columns: minmax(0,1fr); }
  .figure-gallery { grid-row: auto; padding: 9px; }
  .figure-gallery-grid { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 5px; max-height: 155px; }
  .figure-context { grid-template-columns: minmax(100px, .8fr) minmax(0, 1fr); }
  .experiment-context { padding: 9px 10px; }
  .experiment-context h4 { font-size: .82rem; }
  .experiment-context p { font-size: .78rem; }
  .method-player[data-step="figure"] .figure-gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-height: 270px; }
  .dataset-grid { grid-template-columns: minmax(0,1fr); }
  .paper-results-table tr { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.hero {
  background:
    radial-gradient(ellipse at 21% 12%, #e6efff 0%, transparent 53%),
    radial-gradient(ellipse at 80% 8%, #e5f9f2 0%, transparent 50%),
    linear-gradient(180deg, #f3f7ff, #fff);
}
.hero h1 { color: #17264d; }
.hero .button {
  --action-accent: #305ac7;
  --action-wash: #ebf1ff;
  background: linear-gradient(135deg, #fff 35%, var(--action-wash));
  border-color: #cbd8ef;
  border-radius: 10px;
  color: #24427b;
  box-shadow: 0 3px 9px #293f7310;
  transition: transform .23s ease, box-shadow .23s ease, border-color .23s ease;
}
.hero .button[href*="huggingface.co"] { --action-accent: #087e73; --action-wash: #e8f8f3; }
.hero .button.hero-demo { --action-accent: #6437b8; --action-wash: #f1eaff; }
.hero .button:hover, .hero .button:focus-visible {
  transform: translateY(-3px);
  border-color: var(--action-accent);
  box-shadow: 0 7px 16px #293f7326;
}
.action-icon {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  margin-right: 7px;
  border-radius: 6px;
  color: var(--action-accent);
  background: var(--action-wash);
  font-size: .92em;
  transition: transform .23s ease, background .23s ease, color .23s ease;
}
.hero .button:hover .action-icon { transform: rotate(-10deg); color: white; background: var(--action-accent); }
.hero .arxiv-status small { color: #526489; }
.method-connections { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.method-connections path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.method-connections path { visibility: hidden; }
.link-exact { stroke: #4b70db; }
.link-related { stroke: #c65279; }
.method-player[data-step="exact"] .link-exact,
.method-player[data-show-sibling] .link-related { visibility: visible; animation: trace-route .7s .22s cubic-bezier(.2,.65,.3,1) both; }
.link-context, .link-context-arrow { stroke: #a13864; }
.link-context-label {
  visibility: hidden;
  fill: #86284f;
  stroke: white;
  stroke-width: 5px;
  stroke-linejoin: round;
  paint-order: stroke;
  font-size: clamp(.68rem, 1.25vw, .84rem);
  font-weight: 760;
}
.method-player[data-show-sibling] .panel-image { margin-top: 45px; }
.method-player[data-show-sibling] .link-context-label { visibility: visible; animation: context-arrow-in .2s 1.72s ease-out both; }
.method-player[data-show-sibling] .link-context {
  visibility: visible;
  animation: trace-route .52s 1.22s ease-out both;
}
.method-player[data-show-sibling] .link-context-arrow {
  visibility: visible;
  animation: context-arrow-in .2s 1.72s ease-out both;
}
@keyframes context-arrow-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes trace-route {
  from { stroke-dasharray: 1; stroke-dashoffset: 1; }
  to { stroke-dasharray: 1; stroke-dashoffset: 0; }
}
@media (max-width: 680px) {
  .method-connections .link-exact { opacity: .8; }
}

.demo-section { padding-top: 0; padding-bottom: clamp(24px,4vw,48px); scroll-margin-top: 18px; }
.demo-switcher {
  display: inline-flex;
  gap: 5px;
  margin: 0 0 12px 12px;
  padding: 5px;
  border: 1px solid #d2dced;
  border-radius: 12px;
  background: #f7f9fd;
  box-shadow: 0 6px 18px #3045710b;
}
.demo-switcher button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 13px;
  border: 0;
  border-radius: 8px;
  color: #53637e;
  background: transparent;
  font-size: .84rem;
  font-weight: 730;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.demo-switcher button span { color: #8290a8; font-size: .68rem; font-variant-numeric: tabular-nums; }
.demo-switcher button:hover { color: #2148ae; transform: translateY(-1px); }
.demo-switcher button[aria-selected="true"] { color: #173f9f; background: #fff; box-shadow: 0 3px 11px #233e7320; }
.demo-switcher button[aria-selected="true"] span { color: #315ed0; }
.retrieval-demo {
  margin: 0;
  padding: clamp(15px, 3vw, 34px);
  border: 1px solid #cfdcf0;
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 90% 0%, #e4f7f1, transparent 55%),
    radial-gradient(ellipse at 0% 10%, #edf0ff, transparent 57%),
    #fff;
  box-shadow: 0 18px 45px #30457112;
  scroll-margin-top: 18px;
}

.classification-demo {
  position: relative;
  overflow: hidden;
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid #cfdcf0;
  border-radius: 24px;
  background:
    radial-gradient(circle at 8% 8%, #e9edff 0, transparent 34%),
    radial-gradient(circle at 96% 4%, #dff8f1 0, transparent 30%),
    linear-gradient(145deg, #fbfcff 0%, #f6f9ff 58%, #f8fffc 100%);
  box-shadow: 0 18px 45px #30457112;
  scroll-margin-top: 18px;
}
.classification-demo::before {
  content: "";
  position: absolute;
  width: 290px;
  height: 290px;
  right: -160px;
  bottom: -180px;
  border: 1px solid #6c8be52b;
  border-radius: 50%;
  box-shadow: 0 0 0 32px #6c8be50b, 0 0 0 72px #24a9870a;
  pointer-events: none;
}
.classification-demo-header {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}
.classification-demo-header > div { max-width: 760px; }
.classification-kicker {
  margin: 0 0 5px;
  color: #4069d6;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .14em;
}
.classification-demo-header h3 { font-size: clamp(1.75rem, 3vw, 2.6rem); letter-spacing: -.05em; }
.classification-demo-header h3 + p { margin-top: 5px; color: var(--muted); font-size: .91rem; line-height: 1.55; }
.classification-domain-nav {
  position: relative;
  display: flex;
  gap: 7px;
  margin: 19px 0 15px;
  padding: 2px 1px 7px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.classification-domain-nav button {
  flex: 0 0 auto;
  min-height: 35px;
  padding: 6px 11px;
  border: 1px solid #d5dfef;
  border-radius: 999px;
  color: #53637e;
  background: #ffffffbf;
  font-size: .77rem;
  font-weight: 720;
  transition: border-color .2s, color .2s, background .2s, box-shadow .2s, transform .2s;
}
.classification-domain-nav button:hover { transform: translateY(-1px); border-color: #9db2ea; color: #2148ae; }
.classification-domain-nav button[aria-selected="true"] {
  border-color: #315fd1;
  color: #fff;
  background: linear-gradient(135deg, #315fd1, #5b48c8);
  box-shadow: 0 5px 14px #315fd136;
}
.classification-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, .72fr) minmax(0, 1.65fr);
  gap: clamp(12px, 2vw, 24px);
}
.classification-spotlight,
.classification-leaderboard {
  min-width: 0;
  border: 1px solid #d5dfef;
  border-radius: 16px;
  background: #ffffffd9;
  box-shadow: 0 8px 25px #2a46780b;
  backdrop-filter: blur(9px);
}
.classification-spotlight { display: flex; flex-direction: column; padding: clamp(17px, 2.5vw, 27px); }
.classification-domain-index { margin: 0 0 11px; color: #4a68bd; font-size: .69rem; font-weight: 850; letter-spacing: .12em; }
.classification-spotlight h4 { max-width: 330px; font-size: clamp(1.4rem, 2.3vw, 2.05rem); line-height: 1.06; letter-spacing: -.04em; }
.classification-spotlight h4 + p { margin-top: 12px; color: #68778f; font-size: .85rem; line-height: 1.55; }
.classification-path {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  margin: 18px 0;
  padding: 11px;
  border: 1px solid #dde5f4;
  border-radius: 11px;
  background: #f8faff;
}
.classification-path span { display: grid; justify-items: center; gap: 4px; color: #42577c; font-size: .64rem; font-weight: 760; text-align: center; }
.classification-path span i { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #c5d3ef; border-radius: 8px; color: #315fd1; background: #edf2ff; font-style: normal; font-size: .68rem; }
.classification-path > b { height: 1px; background: repeating-linear-gradient(90deg, #90a6d5 0 4px, transparent 4px 7px); }
.classification-path small { grid-column: 1 / -1; margin-top: 2px; color: #7d8ba2; font-size: .61rem; text-align: center; }
.classification-winner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: end;
  margin-top: auto;
  padding: 15px;
  border: 1px solid #b9caef;
  border-radius: 13px;
  background: linear-gradient(145deg, #eef3ff, #f2eeff 60%, #eafff8);
  box-shadow: inset 0 1px #fff;
}
.classification-winner span { grid-column: 1 / -1; color: #63759a; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.classification-winner strong { overflow: hidden; color: #203f91; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.classification-winner b { color: #193a93; font-size: 1.35rem; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.classification-summary { display: flex; gap: 14px; margin-top: 13px; color: #71809a; font-size: .72rem; }
.classification-summary b { color: #2f466f; font-size: .78rem; }
.classification-leaderboard { padding: 16px 17px 17px; }
.classification-leaderboard-head { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 5px 64px; color: #38517c; font-size: .8rem; }
.classification-leaderboard-head span { color: #7a899f; font-size: .7rem; }
.classification-scale { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0 42px 7px 193px; color: #8b97aa; font-size: .63rem; font-variant-numeric: tabular-nums; }
.classification-scale span:not(:first-child) { text-align: right; }
.classification-models { display: flex; flex-direction: column; gap: 4px; }
.classification-model {
  display: grid;
  grid-template-columns: 30px 155px minmax(80px, 1fr) 40px;
  gap: 7px;
  align-items: center;
  min-height: 28px;
  padding: 3px 5px;
  border-radius: 7px;
  transition: background .25s ease, box-shadow .25s ease;
  will-change: transform;
}
.classification-model:hover { background: #f3f6fc; }
.classification-model.is-domain-winner { background: #edf2ff; box-shadow: inset 3px 0 #315fd1; }
.classification-rank { color: #98a4b5; font-size: .65rem; font-weight: 750; font-variant-numeric: tabular-nums; text-align: center; }
.classification-model-name { overflow: hidden; color: #40516e; font-size: .72rem; font-weight: 690; text-overflow: ellipsis; white-space: nowrap; }
.classification-model-bioloom .classification-model-name { color: #274db3; font-weight: 820; }
.classification-bar-track {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, #edf1f7 0, #edf1f7 calc(25% - 1px), #dfe5ef calc(25% - 1px), #dfe5ef 25%);
}
.classification-bar-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8a9ab6, #60769d);
  box-shadow: 0 0 12px #647ba248;
  transition: width .62s cubic-bezier(.2,.8,.24,1);
}
.classification-model-biomedical .classification-bar-track i { background: linear-gradient(90deg, #2d9d8e, #57b6a2); box-shadow: 0 0 12px #2d9d8e3b; }
.classification-model-bioloom .classification-bar-track i { background: linear-gradient(90deg, #315fd1, #7652cf 70%, #d64d86); box-shadow: 0 0 14px #5d54d94d; }
.classification-model > strong { color: #344a6f; font-size: .72rem; font-variant-numeric: tabular-nums; text-align: right; }
.classification-model.is-domain-winner > strong { color: #244bb2; font-size: .8rem; }
.classification-demo-footer { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 15px; margin-top: 13px; color: #5f708b; font-size: .72rem; }
.classification-demo-footer > span { display: inline-flex; align-items: center; gap: 6px; }
.classification-demo-footer small { margin-left: auto; color: #7e8ba0; font-size: .69rem; }
.classification-key { width: 18px; height: 5px; border-radius: 999px; background: #71819e; }
.classification-key.biomedical-key { background: #3aa38f; }
.classification-key.bioloom-key { background: linear-gradient(90deg, #315fd1, #d64d86); }

@media (max-width: 820px) {
  .classification-stage { grid-template-columns: 1fr; }
  .classification-winner { margin-top: 20px; }
  .classification-scale { margin-left: 193px; }
}
@media (max-width: 600px) {
  .demo-switcher { display: flex; margin-left: 0; }
  .demo-switcher button { flex: 1; justify-content: center; padding-inline: 9px; }
  .classification-demo-header { align-items: stretch; flex-direction: column; }
  .classification-tour { align-self: start; }
  .classification-leaderboard { padding-inline: 9px; }
  .classification-leaderboard-head { margin-left: 38px; }
  .classification-scale { margin-left: 126px; margin-right: 39px; }
  .classification-model { grid-template-columns: 24px 92px minmax(70px, 1fr) 36px; gap: 4px; }
  .classification-model-name { font-size: .66rem; }
  .classification-demo-footer small { flex-basis: 100%; margin-left: 0; }
}

/* Qualitative zero-shot case explorer. These rules supersede the earlier
   aggregate leaderboard layout while keeping the shared demo shell. */
.classification-demo-header { align-items: center; }
.classification-actions { display: flex; align-items: center; gap: 7px; }
.classification-next,
.classification-replay { flex: 0 0 auto; }
.classification-domain-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 17px;
  padding: 3px 1px 6px;
}
.classification-domain-strip button {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 7px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #d5deec;
  border-radius: 999px;
  color: #566780;
  background: #ffffffc7;
  font: inherit;
  font-size: .67rem;
  font-weight: 760;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s, transform .2s;
}
.classification-domain-strip button:hover { transform: translateY(-1px); border-color: #91a9e2; color: #3158b7; }
.classification-domain-strip button[aria-selected="true"] { border-color: #315fd1; color: #244ba8; background: #edf2ff; box-shadow: 0 4px 12px #315fd11c; }
.classification-domain-strip small {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #8292aa;
  font-size: .57rem;
}
.classification-domain-strip button[aria-selected="true"] small { background: #315fd1; }
.classification-inference {
  position: relative;
  margin-top: 10px;
  padding: 11px 15px 13px;
  overflow: hidden;
  border: 1px solid #cfdaf0;
  border-radius: 15px;
  background: linear-gradient(110deg, #f8faff, #f4fbfa);
  box-shadow: inset 0 1px #fff, 0 7px 18px #2646770d;
}
.classification-inference::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 15%, #ffffffb8 45%, transparent 72%);
  transform: translateX(-115%);
}
.is-animating .classification-inference::before { animation: classification-pipeline-scan 2.7s .15s ease-in-out; }
@keyframes classification-pipeline-scan { to { transform: translateX(115%); } }
.classification-inference-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 9px;
}
.classification-inference-head span { display: inline-flex; align-items: center; gap: 7px; color: #355ab9; font-size: .62rem; font-weight: 850; letter-spacing: .11em; }
.classification-inference-head span i { width: 7px; height: 7px; border-radius: 50%; background: #6f7f98; }
.is-animating .classification-inference-head span i { background: #18a17d; box-shadow: 0 0 0 0 #18a17d55; animation: classification-live-pulse 1.2s infinite; }
@keyframes classification-live-pulse { 70% { box-shadow: 0 0 0 7px #18a17d00; } }
.classification-inference-head strong { color: #536985; font-size: .7rem; font-weight: 760; }
.classification-inference-track {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 42px 1fr 42px 1fr 42px 1fr 42px 1fr;
  align-items: center;
  gap: 5px;
}
.classification-process-step { display: grid; min-width: 0; place-items: center; gap: 6px; opacity: .52; filter: grayscale(.45); transform: translateY(2px); }
.classification-process-step > span { color: #62728a; font-size: .6rem; font-weight: 760; text-align: center; }
.is-animating .classification-process-step { animation: classification-step-active .68s both ease-out; }
.is-animating .process-image { animation-delay: .8s; }
.is-animating .process-vision { animation-delay: 1.25s; }
.is-animating .process-prompts { animation-delay: 1.75s; }
.is-animating .process-similarity { animation-delay: 2.45s; }
.is-animating .process-result { animation-delay: 3.35s; }
.is-inference-complete .classification-process-step { opacity: 1; filter: none; transform: none; }
@keyframes classification-step-active { 55%, 100% { opacity: 1; filter: none; transform: translateY(0) scale(1.03); } }
.classification-process-link { position: relative; display: flex; align-items: center; justify-content: space-around; height: 2px; background: #c8d3e7; }
.classification-process-link i { width: 5px; height: 5px; border-radius: 50%; background: #87a0d8; opacity: 0; transform: translateX(-12px); }
.is-animating .classification-process-link i { animation: classification-particle-flow .9s infinite ease-in-out; }
.is-animating .classification-process-link i:nth-child(2) { animation-delay: .18s; }
.is-animating .classification-process-link i:nth-child(3) { animation-delay: .36s; }
@keyframes classification-particle-flow { 40% { opacity: 1; } 100% { opacity: 0; transform: translateX(12px); } }
.process-patch-grid { display: grid; grid-template-columns: repeat(3, 7px); gap: 2px; }
.process-patch-grid i { width: 7px; height: 7px; border-radius: 2px; background: #7593db; }
.is-animating .process-patch-grid i { animation: classification-patch-wave .8s infinite alternate; }
.is-animating .process-patch-grid i:nth-child(3n+2) { animation-delay: .15s; }
.is-animating .process-patch-grid i:nth-child(3n) { animation-delay: .3s; }
@keyframes classification-patch-wave { to { background: #21a681; transform: scale(.7); } }
.process-orbit { position: relative; width: 30px; height: 30px; border: 1px solid #8099d4; border-radius: 50%; }
.process-orbit i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #4269ca; }
.process-orbit i:nth-child(1) { top: -3px; left: 12px; }
.process-orbit i:nth-child(2) { right: -2px; bottom: 4px; background: #20a680; }
.process-orbit i:nth-child(3) { bottom: 1px; left: 2px; background: #8a65d5; }
.is-animating .process-orbit { animation: classification-orbit 1.6s linear infinite; }
@keyframes classification-orbit { to { transform: rotate(360deg); } }
.process-prompts > div { display: grid; gap: 2px; }
.process-prompts i { min-width: 50px; padding: 2px 5px; border-radius: 4px; color: #536887; background: #e4eaf7; font-size: .48rem; font-style: normal; text-align: center; }
.is-animating .process-prompts i { animation: classification-prompt-in .8s both ease-out; }
.is-animating .process-prompts i:nth-child(2) { animation-delay: .15s; }
.is-animating .process-prompts i:nth-child(3) { animation-delay: .3s; }
@keyframes classification-prompt-in { from { opacity: .2; transform: translateX(-12px); } }
.process-similarity > div { display: grid; width: 54px; gap: 3px; }
.process-similarity i { display: block; width: 35%; height: 5px; border-radius: 5px; background: #9bb0dc; transform-origin: left; }
.process-similarity i:nth-child(2) { width: 88%; background: #21a681; }
.process-similarity i:nth-child(3) { width: 57%; background: #8a65d5; }
.is-animating .process-similarity i { animation: classification-score-grow .9s 2.25s both ease-out; }
@keyframes classification-score-grow { from { transform: scaleX(.06); } }
.process-result > div { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; color: #fff; background: #1b9a77; font-size: 1rem; font-weight: 900; }
.is-animating .process-result > div { animation: classification-result-pop .65s 3.35s both cubic-bezier(.2,.9,.25,1.4); }
@keyframes classification-result-pop { from { opacity: .2; transform: scale(.35) rotate(-20deg); } }
.classification-stage {
  grid-template-columns: minmax(280px, .88fr) 46px minmax(410px, 1.2fr);
  align-items: stretch;
  gap: 14px;
  margin-top: 20px;
}
.classification-input-card,
.classification-output-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d3deef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px #293f6b12;
}
.classification-input-card { display: flex; flex-direction: column; padding: 12px; }
.classification-case-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 31px;
  padding: 0 3px 10px;
}
.classification-case-meta span {
  color: #4266c5;
  font-size: .69rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.classification-case-meta strong { color: #40516d; font-size: .78rem; }
.classification-image-frame {
  position: relative;
  display: grid;
  flex: 1;
  min-height: 285px;
  overflow: hidden;
  place-items: center;
  border: 1px solid #dce4f0;
  border-radius: 13px;
  background:
    linear-gradient(45deg, #edf1f6 25%, transparent 25%) 0 0 / 18px 18px,
    linear-gradient(45deg, transparent 75%, #edf1f6 75%) 0 0 / 18px 18px,
    linear-gradient(45deg, transparent 75%, #edf1f6 75%) 9px -9px / 18px 18px,
    linear-gradient(45deg, #edf1f6 25%, #f7f9fc 25%) 9px -9px / 18px 18px;
}
.classification-image-frame img { width: 100%; height: 100%; max-height: 370px; object-fit: contain; }
.classification-image-frame > img[data-classification-image] { position: relative; z-index: 1; }
.classification-image-frame.is-native-low-resolution::before {
  position: absolute;
  z-index: 0;
  inset: -24px;
  content: "";
  background: linear-gradient(#f8fbffe6, #f8fbffb8), var(--preview-image) center / cover no-repeat;
  filter: blur(13px) saturate(.88);
  opacity: .78;
  transform: scale(1.08);
}
.classification-image-frame.is-native-low-resolution > img[data-classification-image] {
  width: var(--native-display-width);
  height: var(--native-display-width);
  max-height: none;
  border: 1px solid #d0daeb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 35px #1b315733, 0 0 0 8px #ffffffb8;
  image-rendering: pixelated;
  object-fit: contain;
}
.classification-image-pool {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  padding: 36px 11px 11px;
  background: linear-gradient(145deg, #eaf0fbf2, #effaf7f2);
  backdrop-filter: blur(7px);
  pointer-events: none;
}
.classification-image-pool > span {
  position: absolute;
  top: 12px;
  right: 12px;
  max-width: calc(100% - 118px);
  overflow: hidden;
  color: #3f5fae;
  font-size: .57rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.classification-image-pool > i {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 5px 13px #223d6c24;
  transform: rotate(var(--tile-angle, -1deg));
}
.classification-image-pool > i:nth-of-type(2n) { --tile-angle: 1.2deg; }
.classification-image-pool > i:nth-of-type(3n) { --tile-angle: -.5deg; }
.classification-image-pool img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.classification-image-pool b {
  position: absolute;
  right: 4px;
  bottom: 4px;
  left: 4px;
  overflow: hidden;
  padding: 3px 4px;
  border-radius: 4px;
  color: #fff;
  background: #1a2948bd;
  font-size: .43rem;
  font-style: normal;
  letter-spacing: .04em;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.classification-image-pool > i.is-selected { border-color: #20a27f; box-shadow: 0 0 0 3px #20a27f35, 0 9px 23px #146d562d; }
.classification-image-pool > i.is-selected b { background: #16876b; }
.is-animating .classification-image-pool > i { animation: classification-pool-spread .48s both ease-out; }
.is-animating .classification-image-pool > i:nth-of-type(2) { animation-delay: .05s; }
.is-animating .classification-image-pool > i:nth-of-type(3) { animation-delay: .1s; }
.is-animating .classification-image-pool > i:nth-of-type(4) { animation-delay: .15s; }
.is-animating .classification-image-pool > i:nth-of-type(5) { animation-delay: .2s; }
.is-animating .classification-image-pool > i:nth-of-type(6) { animation-delay: .25s; }
@keyframes classification-pool-spread { from { opacity: 0; transform: scale(.7) rotate(-5deg); } }
.is-animating .classification-image-pool > i:not(.is-selected) { animation: classification-pool-reject .4s .62s both ease-in; }
@keyframes classification-pool-reject { to { opacity: .12; filter: grayscale(1) blur(1px); transform: scale(.86); } }
.is-animating .classification-image-pool > i.is-selected { animation: classification-pool-select .72s .48s both cubic-bezier(.18,.9,.25,1.15); }
@keyframes classification-pool-select { 55% { transform: scale(1.1); } 100% { transform: scale(1.06); box-shadow: 0 0 0 5px #20a27f42, 0 14px 28px #146d5640; } }
.is-animating .classification-image-pool { animation: classification-pool-exit .4s 1.14s both ease-in; }
@keyframes classification-pool-exit { to { opacity: 0; visibility: hidden; transform: scale(1.035); } }
.is-inference-complete .classification-image-pool { display: none; }
.is-animating .classification-image-frame > img[data-classification-image] { animation: classification-selected-image 1s .82s both ease-out; }
@keyframes classification-selected-image { from { opacity: .1; filter: blur(8px); transform: scale(.88); } to { opacity: 1; filter: none; transform: scale(1); } }
.classification-input-tag {
  position: absolute;
  z-index: 4;
  top: 10px;
  left: 10px;
  padding: 5px 8px;
  border: 1px solid #ffffff80;
  border-radius: 7px;
  color: #fff;
  background: #152645d9;
  box-shadow: 0 3px 10px #07122233;
  font-size: .59rem;
  font-weight: 850;
  letter-spacing: .1em;
}
.classification-resolution {
  position: absolute;
  z-index: 4;
  right: 10px;
  bottom: 10px;
  padding: 5px 7px;
  border: 1px solid #ffffff9c;
  border-radius: 6px;
  color: #fff;
  background: #263958d9;
  box-shadow: 0 3px 10px #0712222b;
  font-size: .54rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.classification-ground-truth {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  padding: 11px 13px;
  border: 1px solid #9dd7c5;
  border-radius: 11px;
  background: linear-gradient(120deg, #eaf9f4, #f2fbf8);
}
.classification-ground-truth span { color: #457064; font-size: .69rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.classification-ground-truth strong { color: #0b6c56; font-size: .93rem; text-align: right; }
.classification-flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  color: #5872ba;
}
.classification-flow-arrow span { font-size: 2rem; line-height: 1; }
.classification-flow-arrow small { color: #7b89a1; font-size: .57rem; font-weight: 760; text-align: center; }
.classification-output-card { padding: 13px; }
.classification-output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 3px 11px;
}
.classification-output-head > div { display: grid; gap: 3px; }
.classification-output-head > div span { color: #4266c5; font-size: .68rem; font-weight: 850; letter-spacing: .1em; }
.classification-output-head > div strong { color: #708099; font-size: .7rem; font-weight: 650; }
.classification-output-head p { display: flex; align-items: center; gap: 5px; margin: 0; color: #718099; font-size: .64rem; }
.classification-output-head p i { width: 8px; height: 8px; margin-left: 5px; border-radius: 50%; background: #1a9b78; }
.classification-output-head p i + i { background: #d95f68; }
.classification-predictions { display: grid; gap: 7px; }
.classification-prediction {
  display: grid;
  grid-template-columns: 28px minmax(112px, .8fr) minmax(150px, 1.25fr) 50px;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 7px 10px;
  border: 1px solid #ead1d3;
  border-radius: 11px;
  background: #fff8f8;
  animation: classification-row-in .36s var(--delay) both ease-out;
}
@keyframes classification-row-in { from { opacity: .48; transform: translateX(14px); filter: saturate(.5); } }
.classification-prediction.is-correct {
  position: relative;
  overflow: hidden;
  border-color: #8dcdb9;
  background: linear-gradient(110deg, #e8f8f2, #f5fcf9);
  box-shadow: inset 3px 0 #16876b, 0 5px 14px #16876b12;
  animation: classification-row-in .36s both ease-out, classification-correct-confirm 1.15s .38s ease-out;
}
.is-animating .classification-prediction {
  border-color: #d9e1ee;
  background: #f8fafc;
  box-shadow: inset 3px 0 #a8b5c8;
}
.is-animating .classification-prediction.is-correct { animation: classification-row-in .36s var(--delay) both ease-out, classification-correct-resolve .48s var(--reveal) both ease-out; }
.is-animating .classification-prediction.is-wrong { animation: classification-row-in .36s var(--delay) both ease-out, classification-error-resolve .42s var(--reveal) both ease-out; }
@keyframes classification-correct-resolve {
  from { border-color: #d9e1ee; background: #f8fafc; box-shadow: inset 3px 0 #a8b5c8; }
  to { border-color: #8dcdb9; background: #eaf8f3; box-shadow: inset 3px 0 #16876b, 0 7px 18px #16876b18; transform: translateY(-1px); }
}
@keyframes classification-error-resolve {
  from { border-color: #d9e1ee; background: #f8fafc; box-shadow: inset 3px 0 #a8b5c8; }
  to { border-color: #ead1d3; background: #fff8f8; box-shadow: none; }
}
.classification-prediction.is-correct::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 20%, #ffffffb8 46%, transparent 70%);
  transform: translateX(-125%);
  animation: classification-correct-shine .85s .52s ease-out;
  pointer-events: none;
}
.is-animating .classification-prediction.is-correct::after { animation: classification-correct-shine .85s var(--reveal) both ease-out; }
@keyframes classification-correct-confirm {
  36% { border-color: #2aa07e; box-shadow: inset 3px 0 #16876b, 0 0 0 5px #27a4811c, 0 10px 24px #16876b1e; transform: translateY(-2px); }
}
@keyframes classification-correct-shine { to { transform: translateX(125%); } }
.classification-verdict {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #d95f68;
  font-size: .92rem;
  font-weight: 900;
}
.is-animating .classification-verdict { opacity: .18; filter: grayscale(1); animation: classification-verdict-resolve .4s var(--reveal) both cubic-bezier(.2,.9,.25,1.35); }
@keyframes classification-verdict-resolve { to { opacity: 1; filter: none; transform: scale(1.08); } }
.is-correct .classification-verdict { background: #16876b; }
.is-correct .classification-verdict { animation: classification-check-pop .6s .28s both cubic-bezier(.2,.9,.25,1.35); }
@keyframes classification-check-pop { from { opacity: .35; transform: scale(.55) rotate(-18deg); } }
.classification-prediction-model { color: #3b4d6c; font-size: .74rem; font-weight: 750; }
.is-correct .classification-prediction-model { color: #0c6a55; font-weight: 880; }
.classification-prediction-label { overflow: hidden; color: #8a4f55; font-size: .76rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.is-correct .classification-prediction-label { color: #126c59; }
.classification-thinking { display: none; align-items: center; gap: 3px; color: #71819a; font-size: .61rem; font-weight: 650; }
.classification-thinking i { width: 4px; height: 13px; border-radius: 3px; background: #7d97d2; transform-origin: bottom; animation: classification-thinking-bars .48s infinite alternate ease-in-out; }
.classification-thinking i:nth-child(2) { height: 8px; animation-delay: .12s; }
.classification-thinking i:nth-child(3) { height: 11px; animation-delay: .24s; }
.classification-thinking em { margin-left: 3px; font-style: normal; }
@keyframes classification-thinking-bars { to { height: 5px; background: #23a17f; } }
.is-animating .classification-thinking { display: inline-flex; animation: classification-thinking-hide .2s var(--reveal) both; }
.is-animating .classification-final { display: inline-block; animation: classification-final-reveal .38s var(--reveal) both ease-out; }
@keyframes classification-thinking-hide { to { opacity: 0; transform: translateX(7px); } }
@keyframes classification-final-reveal { from { opacity: 0; filter: blur(4px); transform: translateX(-8px); } }
.is-animating .classification-prediction > strong { opacity: 0; animation: classification-result-text .35s var(--reveal) both ease-out; }
.is-animating .classification-prediction .classification-verdict { opacity: .18; filter: grayscale(1); animation: classification-verdict-resolve .4s var(--reveal) both cubic-bezier(.2,.9,.25,1.35); }
@keyframes classification-result-text { to { opacity: 1; } }
.classification-prediction > strong { color: #b45059; font-size: .62rem; text-transform: uppercase; }
.classification-prediction.is-correct > strong { color: #13755d; }
.classification-case-strip {
  position: relative;
  display: flex;
  gap: 9px;
  margin-top: 14px;
  padding: 3px 1px 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.classification-case-strip button {
  position: relative;
  display: grid;
  grid-template-columns: 49px minmax(90px, 1fr);
  align-items: center;
  flex: 1 0 150px;
  gap: 8px;
  min-width: 0;
  padding: 6px;
  overflow: hidden;
  border: 1px solid #d6dfed;
  border-radius: 10px;
  color: #41516c;
  background: #ffffffd9;
  text-align: left;
  transition: border-color .2s, box-shadow .2s, transform .2s, background .2s;
}
.classification-case-strip button:hover { transform: translateY(-2px); border-color: #91a9e2; }
.classification-case-strip button[aria-selected="true"] { border-color: #3562ce; background: #eff3ff; box-shadow: 0 5px 14px #315fd126; }
.classification-case-strip button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid #3562ce;
  border-radius: inherit;
  animation: classification-active-case .65s ease-out;
  pointer-events: none;
}
@keyframes classification-active-case { from { opacity: .2; transform: scale(.94); } }
.classification-case-strip img { width: 49px; height: 43px; border-radius: 7px; background: #edf1f6; object-fit: cover; }
.classification-case-strip span { display: grid; min-width: 0; gap: 2px; }
.classification-case-strip small { overflow: hidden; color: #75849b; font-size: .56rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.classification-case-strip strong { overflow: hidden; font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.classification-case-strip i {
  position: absolute;
  top: 3px;
  left: 39px;
  display: grid;
  width: 15px;
  height: 15px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #16876b;
  font-size: .52rem;
  font-style: normal;
  font-weight: 900;
}
.classification-demo-footer { justify-content: space-between; }
.classification-demo-footer > span { color: #3f5fae; font-weight: 780; }
.classification-load-error { padding: 30px; color: #a74851; text-align: center; }

@media (max-width: 900px) {
  .classification-stage { grid-template-columns: minmax(250px, .85fr) 34px minmax(340px, 1.15fr); gap: 9px; }
  .classification-prediction { grid-template-columns: 26px 104px minmax(120px, 1fr); gap: 7px; }
  .classification-prediction > strong { display: none; }
}
@media (max-width: 700px) {
  .classification-demo-header { align-items: stretch; flex-direction: column; }
  .classification-actions { align-self: start; flex-wrap: wrap; }
  .classification-domain-strip { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
  .classification-inference-track { grid-template-columns: repeat(5, minmax(64px, 1fr)); gap: 5px; overflow-x: auto; }
  .classification-process-link { display: none; }
  .classification-inference-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .classification-stage { grid-template-columns: 1fr; }
  .classification-flow-arrow { flex-direction: row; min-height: 28px; }
  .classification-flow-arrow span { transform: rotate(90deg); }
  .classification-image-frame { min-height: 250px; }
  .classification-output-card { padding: 10px; }
  .classification-prediction { grid-template-columns: 26px minmax(105px, .8fr) minmax(115px, 1.2fr); }
  .classification-demo-footer small { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .classification-inference::before,
  .classification-inference-head span i,
  .classification-process-step,
  .classification-process-link i,
  .process-patch-grid i,
  .process-orbit,
  .process-prompts i,
  .process-similarity i,
  .process-result > div,
  .classification-thinking,
  .classification-final,
  .classification-image-pool,
  .classification-image-pool > i,
  .classification-image-frame > img[data-classification-image],
  .classification-prediction,
  .classification-prediction.is-correct,
  .classification-prediction.is-correct::after,
  .is-correct .classification-verdict,
  .classification-case-strip button[aria-selected="true"]::after { animation: none !important; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.search-header, .search-controls, .search-footer, .search-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.search-header { flex-wrap: wrap; }
.search-header h3 { font-size: clamp(1.75rem, 3vw, 2.6rem); letter-spacing: -.05em; }
.search-header p { color: var(--muted); font-size: .88rem; margin-top: 3px; }
.search-controls {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(0, 1.4fr);
  max-width: 480px;
  gap: 9px;
  margin: 17px 0 0;
  min-width: 0;
}
.search-controls:has([data-search-caption-field]:not([hidden])) {
  grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1.4fr);
  max-width: 680px;
}
.search-controls label { display: grid; gap: 3px; min-width: 0; color: #4c5c78; font-size: .75rem; font-weight: 730; }
.search-controls select {
  min-width: 0;
  width: 100%;
  height: 36px;
  padding: 0 6px;
  border: 1px solid #c8d6ee;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-overflow: ellipsis;
  font: inherit;
  font-size: .86rem;
  font-weight: 640;
}
.search-controls select:focus-visible { outline: 3px solid #4a74fd; outline-offset: 4px; }
.search-source { color: var(--blue); font-size: .8rem; font-weight: 650; }
.search-query {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  margin: 20px 0 14px;
  padding: 11px 13px;
  border: 1px solid #d2ddf3;
  border-radius: 11px;
  background: #fff;
}
.search-query > span { padding: 4px 8px; border-radius: 6px; background: #edf2ff; color: #3158c0; font-size: .72rem; font-weight: 760; text-transform: uppercase; }
.search-query p { color: #23365a; font-size: .94rem; font-weight: 580; line-height: 1.5; }
.search-query p.is-excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.search-expand { padding: 3px 0; border: 0; background: none; color: #3158c0; font-size: .78rem; font-weight: 690; white-space: nowrap; }
.search-stage {
  --search-accent: #4b70eb;
  --search-glow: #83b6ff;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(9px, 1.6vw, 21px);
}
.search-stage[data-phase="match"] { --search-accent: #079478; --search-glow: #8cebd0; }
.search-stage[data-phase="miss"] { --search-accent: #bc4f70; --search-glow: #f8c0cf; }
.search-gallery, .search-result { min-width: 0; padding: 11px; border: 1px solid #d4dff1; border-radius: 14px; background: #fff; }
.search-result { display: grid; grid-template-rows: auto 1fr; }
.search-strip { min-height: 23px; margin: 0 2px 9px; font-size: .87rem; flex-wrap: wrap; gap: 4px 10px; }
.search-strip span:last-child { color: var(--muted); font-size: .76rem; font-variant-numeric: tabular-nums; }
.search-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 4px;
  height: clamp(245px, 27vw, 390px);
  overflow-y: auto;
  overflow-x: clip;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 2px 5px 2px 2px;
}
.search-gallery-window { position: relative; }
.search-gallery-window::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 8px;
  background: linear-gradient(180deg, transparent 20%, #82a9ff22 42%, #5d87ffaa 49%, #5d87ff 50%, #82a9ff22 54%, transparent 76%);
  background-repeat: no-repeat;
  background-size: 100% 42%;
  opacity: 0;
}
.search-stage[data-phase="scanning"] .search-gallery-window::after { animation: scan-sweep 1.19s cubic-bezier(.41,.03,.43,1) both; }
@keyframes scan-sweep {
  0% { background-position: 0 -80%; opacity: 0; }
  20%, 82% { opacity: .73; }
  to { background-position: 0 180%; opacity: 0; }
}
.search-tile {
  display: grid;
  place-items: center;
  position: relative;
  width: 100%;
  aspect-ratio: 1.4;
  overflow: hidden;
  border: 1px solid #e0e8f5;
  border-radius: 6px;
  background: #fff url("assets/retrieval/demo-gallery.webp") no-repeat var(--sprite-x) var(--sprite-y) / 2500% 4000%;
  transition: opacity .38s ease, transform .45s cubic-bezier(.2,.8,.3,1), box-shadow .38s ease;
}
.search-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: white; }
.search-stage:is([data-phase="match"], [data-phase="miss"]) .search-tile:not(.search-hit) { opacity: .43; }
.search-tile.search-hit {
  z-index: 1;
  outline: 3px solid var(--search-accent);
  outline-offset: -2px;
  box-shadow: 0 3px 16px var(--search-glow);
  transform: scale(1.055);
}
.search-result-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 145px;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
  border: 2px solid #d8e3f4;
  border-radius: 10px;
  background: radial-gradient(ellipse at 50% 45%, #fff, #edf3fd);
  transition: border-color .33s, box-shadow .33s;
}
.search-result-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.search-stage:is([data-phase="match"], [data-phase="miss"]) .search-result-frame {
  border-color: var(--search-accent);
  box-shadow: 0 0 0 2px var(--search-glow);
}
.search-stage[data-phase="match"] .search-result-frame { border-width: 3px; }
.search-stage:is([data-phase="match"], [data-phase="miss"]) .search-result-frame img { animation: lock-figure .46s cubic-bezier(.19,.72,.25,1) both; }
@keyframes lock-figure {
  from { opacity: .15; transform: scale(1.1); filter: blur(6px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}
.search-feedback { position: relative; margin: 0 12px; color: #4c5c78; text-align: center; font-size: .88rem; }
.search-stage[data-phase="scanning"] .search-feedback { translate: 0 39px; }
.search-header button:disabled { opacity: .65; cursor: default; }
.search-orbit {
  visibility: hidden;
  width: 48px;
  height: 48px;
  border: 2px solid #cbdafd;
  border-radius: 50%;
  position: absolute;
}
.search-orbit::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px solid #b9cdf9;
  border-radius: 50%;
}
.search-stage[data-phase="scanning"] .search-orbit { visibility: visible; border-top-color: #2e62e4; animation: orbit .8s linear infinite; }
.search-stage[data-phase="scanning"] .search-orbit::after { border-right-color: #07aa9c; animation: orbit .65s linear infinite reverse; }
@keyframes orbit { to { transform: rotate(360deg); } }
.search-verdict {
  position: absolute;
  left: 9px;
  right: auto;
  bottom: 9px;
  max-width: calc(100% - 18px);
  padding: 5px 9px;
  border-radius: 6px;
  color: #8a2a4d;
  background: #fff2f7;
  box-shadow: 0 3px 11px #122f5624;
  font-size: clamp(.72rem, 1.2vw, .94rem);
  font-weight: 740;
  animation: lock-figure .42s .16s ease-out both;
}
.search-stage[data-phase="match"] .search-verdict { background: #e6fff3; color: #076a54; font-weight: 820; }
.search-stage.is-paused *,
.search-stage.is-paused *::after { animation-play-state: paused !important; }
.search-footer { flex-wrap: wrap; margin-top: 14px; }
.search-footer small { font-size: .78rem; }
.search-models { display: flex; flex-wrap: wrap; gap: 6px; }
.search-models button {
  border: 1px solid #d9e2f2;
  border-radius: 6px;
  padding: 4px 8px;
  color: #4a5f86;
  background: #f9fbff;
  font-size: .76rem;
  font-weight: 670;
}
.search-models button:hover, .search-models button[aria-pressed="true"] { color: #234aba; background: #eaf1ff; border-color: #9cb4f7; }

@media (max-width: 650px) {
  .search-stage { grid-template-columns: minmax(0,1fr); }
  .search-controls { grid-template-columns: minmax(100px, 1fr) minmax(0, 1.8fr); }
  .search-controls:has([data-search-caption-field]:not([hidden])) {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .search-controls:has([data-search-caption-field]:not([hidden])) .search-example { grid-column: 1 / -1; }
  .search-grid { grid-template-columns: repeat(7,minmax(0,1fr)); height: 167px; }
  .search-result-frame { min-height: clamp(145px, 48vw, 290px); }
  .search-query { grid-template-columns: auto minmax(0,1fr); }
  .search-expand { grid-column: 2; justify-self: start; }
  .search-footer { gap: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero .button:hover, .hero .button:focus-visible, .hero .button:hover .action-icon { transform: none; }
}

@media (max-width: 680px) {
  .method-points { grid-template-columns: minmax(0, 1fr); }
  .panel-image { height: clamp(82px, 26vw, 139px); }
}

.experiment-explorer {
  isolation: isolate;
  padding: clamp(14px, 3vw, 25px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, #f1f5ff, #f6fbf9);
}
.experiment-summary {
  margin: 20px 0 14px;
  color: #304665;
  text-align: center;
  font-size: clamp(1rem, 1.65vw, 1.16rem);
  font-weight: 600;
}
.experiment-link-hint {
  margin: -7px 0 12px;
  color: #61708a;
  text-align: center;
  font-size: .82rem;
}
.experiment-paper-figure { max-width: 740px; margin-inline: auto; }
.experiment-plot { position: relative; }
.experiment-paper-panel { position: relative; display: block; width: 100%; height: auto; }
.experiment-plot-base { position: absolute; inset: 0; width: 100%; height: 100%; }
.experiment-reading {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 14px;
  margin: 14px auto 0;
  color: #304665;
  text-align: center;
}
.experiment-reading p { font-size: .92rem; font-weight: 600; }
.experiment-replay {
  padding: 4px 9px;
  border: 1px solid #b6c8e2;
  border-radius: 6px;
  background: transparent;
  color: #214bc7;
  font-size: .8rem;
}
.experiment-replay:hover { background: #e4edff; }

.experiment-paper-figure:has(.paper-scaling-key) { max-width: 860px; }
.experiment-paper-figure:has(.paper-scaling-key) .experiment-plot {
  max-width: 540px;
  margin-inline: auto;
}
.paper-scaling-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px 12px; }
.paper-scaling-key img { width: auto; height: clamp(26px, 3vw, 32px); }
.experiment-plot-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.experiment-plot-overlay [data-plot-highlight] { visibility: hidden; }
.experiment-plot-overlay [data-plot-highlight].is-selected { visibility: visible; }
.experiment-plot-overlay polyline {
  fill: none;
  stroke: var(--series-color);
  stroke-width: 11px;
  stroke-linejoin: round;
  stroke-linecap: round;
  opacity: .36;
}
.experiment-plot-overlay circle { fill: none; stroke: var(--series-color); stroke-width: 3px; vector-effect: non-scaling-stroke; }
.experiment-plot.has-hit { cursor: pointer; }
.paper-scaling-key button, .probe-legend-hit {
  padding: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
}
.paper-scaling-key button { padding-inline: 4px; }
.probe-legend-hit { position: absolute; }
.paper-scaling-key button:is(:hover,[aria-pressed="true"]),
.probe-legend-hit:is(:hover,:focus-visible,.is-selected) {
  border-color: var(--series-color);
  background: color-mix(in srgb, var(--series-color) 17%, transparent);
}
.probe-legend-hit:focus-visible { outline: 2px solid #315fd1; outline-offset: 2px; }
.model-paper-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color .15s ease, text-decoration-color .15s ease;
}
.model-paper-link:is(:hover,:focus-visible) {
  color: #214bc7;
  text-decoration-color: currentColor;
}
.experiment-pane { mix-blend-mode: multiply; }
@media (prefers-reduced-motion: no-preference) {
  .experiment-pane[data-plot-state="ready"] .experiment-paper-panel {
    clip-path: inset(0 calc(100% - var(--plot-start)) 0 0);
  }
  .experiment-pane[data-plot-state="playing"] .experiment-paper-panel {
    animation: experiment-trace 1.55s cubic-bezier(.33,.04,.28,1) both;
  }
  .experiment-pane[data-plot-state="playing"] .experiment-reading {
    animation: experiment-enter .35s 1.25s ease-out both;
  }
  .method-player[data-step="figure"][data-gallery-enter] .figure-gallery button {
    animation: gallery-tile-enter .45s var(--tile-delay, 0ms) ease-out both;
  }
  .figure-gallery button.figure-gallery-target {
    border-color: #365fd1;
    box-shadow: inset 0 0 0 2px #365fd1, 0 0 0 2px #d7e4ff;
    animation: gallery-target-pulse .7s ease-out both !important;
  }
}
@keyframes experiment-enter { from { opacity: 0; transform: translateY(4px); } }
@keyframes experiment-trace {
  from { clip-path: inset(0 calc(100% - var(--plot-start)) 0 0); }
  to { clip-path: inset(0 0 0 0); }
}
@keyframes gallery-tile-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes gallery-target-pulse {
  40% { box-shadow: inset 0 0 0 2px #365fd1, 0 0 0 4px #aac2ff; transform: scale(1.055); }
}

.method-objective {
  margin-top: clamp(28px, 4vw, 48px);
  padding: clamp(14px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(150deg, #edf3ff, #f8fcfa);
}
.method-objective math { font-family: "Paper Math", math; }
.method-objective h4 { margin: 0 0 14px; font-size: clamp(1.22rem, 2.6vw, 1.7rem); letter-spacing: -.025em; }
.objective-total { margin-bottom: 12px; text-align: center; }
.objective-total math { margin: 0 auto 9px; font-size: 1.45rem; }
.method-objective p, .objective-symbols dd { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.objective-terms, .objective-symbols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.objective-terms article { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.objective-terms h5 { margin: 0 0 6px; font-size: 1rem; }
.objective-terms math { margin: 10px 0 13px; font-size: clamp(.93rem, 2vw, 1.21rem); }
.objective-symbols { margin: 16px 0 0; }
.objective-symbols div { display: grid; grid-template-columns: minmax(27px, auto) minmax(0, 1fr); align-items: baseline; gap: 10px; }
.objective-symbols dt { font-weight: 700; }
.objective-symbols dd { margin: 0; }
@media (max-width: 680px) {
  .objective-terms, .objective-symbols { grid-template-columns: minmax(0, 1fr); }
}

.project-overview {
  position: relative;
  scroll-margin-top: 80px;
  width: min(900px, calc(100% - 32px));
  margin: 0 auto 32px;
  --frame-inset: clamp(4px, .75vw, 9px);
  padding: var(--frame-inset);
  border: 2px solid #748ba2;
  border-radius: calc(13px + var(--frame-inset));
  background: #edf2f7;
  box-shadow: 0 6px 20px rgba(24, 45, 76, .12);
}
.project-overview video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: #102437;
}

.overview-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: clamp(56px, 8vw, 76px);
  aspect-ratio: 1;
  padding: 0;
  color: #fff;
  background: rgba(10, 34, 55, .86);
  border: 2px solid rgba(255, 255, 255, .88);
  border-radius: 50%;
  box-shadow: 0 3px 18px rgba(0, 0, 0, .35);
  cursor: pointer;
}
.overview-play[hidden] { display: none; }
.overview-play:hover { background: #105269; }
.overview-play:focus-visible { outline: 3px solid #8fead6; outline-offset: 4px; }
