/* GenDAG project page. Light, restrained, data first. No external fonts or CDNs. */
:root {
  --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --faint: #94a3b8;
  --line: #e5e7eb; --line-2: #eef0f3; --bg: #ffffff; --soft: #f7f8fa;
  --accent: #2a78d6; --accent-ink: #1c5cab; --accent-soft: #eaf2fd; --ours-dark: #184f95;
  --good: #16a34a; --warn: #f08c00; --bad: #e5484d; --pink: #d55181; --phrase: #2162b0;
  --radius: 12px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Arial, "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 60px; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--accent-ink); text-decoration: none; }
code { font-family: var(--mono); font-size: .86em; background: var(--soft); border: 1px solid var(--line-2); padding: 0 .3em; border-radius: 4px; color: var(--ink-2); }
h2 { text-wrap: balance; font-size: 28px; line-height: 1.2; margin: 0 0 6px; font-weight: 700; letter-spacing: -.015em; }
h3 { font-size: 17px; line-height: 1.35; margin: 0; font-weight: 650; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); font-size: 13px; }
.fine { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }

/* nav */
.topnav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.topnav.scrolled { border-bottom-color: var(--line); }
.nav-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; height: 52px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-weight: 700; color: var(--ink); font-size: 16px; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { color: var(--muted); font-size: 14px; padding: 5px 10px; border-radius: 7px; }
.nav-links a:hover { color: var(--ink); background: var(--soft); }
.nav-links a.active { color: var(--ink); font-weight: 600; }

/* hero */
.hero { padding: 52px 0 28px; text-align: center; }
.title { font-size: 56px; line-height: 1.05; font-weight: 750; letter-spacing: -.03em; margin: 0; }
.subtitle { text-wrap: balance; font-size: 24px; line-height: 1.3; font-weight: 600; color: var(--ink-2); margin: 10px auto 22px; max-width: 820px; letter-spacing: -.01em; }
.authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 16px; max-width: 900px; margin: 0 auto 8px; font-size: 16px; }
.authors a { color: var(--ink); border-bottom: 1px solid #cbd5e1; }
.authors a:hover { color: var(--accent-ink); border-bottom-color: var(--accent); }
.authors sup, .affils sup, .notes sup { font-size: 10px; color: var(--muted); margin-left: 1px; }
.affils { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; font-size: 14.5px; color: var(--ink-2); margin: 0 0 2px; }
.notes { font-size: 12.5px; color: var(--muted); margin: 0 0 20px; }
.links { display: flex; gap: 8px; justify-content: center; }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink); border: 1px solid var(--line); background: var(--bg); }
.btn:hover { background: var(--soft); }
.btn.is-disabled { color: var(--faint); cursor: default; }
.btn.is-disabled:hover { background: var(--bg); }
.btn small { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

/* sections */
.section { padding: 64px 0; }
.section-tight { padding: 8px 0 24px; }
.section.alt { background: var(--soft); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.head { margin-bottom: 20px; }
.head p { margin: 0; color: var(--muted); font-size: 15.5px; }
.head-sub { margin-top: 36px; }
.head-sub h3 { font-size: 19px; margin-bottom: 4px; }
#abstract p { font-size: 16.5px; color: var(--ink-2); text-align: justify; hyphens: auto; margin: 0; }
.caption { text-align: center; font-size: 14px; color: var(--muted); margin: 12px 0 0; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.card:last-child { margin-bottom: 0; }
.card-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 10px; }
.card-head .legend { margin: 0 0 0 auto; }

/* ---------- teaser ---------- */
.teaser { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
#teaser .wrap-wide { max-width: 1340px; }
.t-tile { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.t-head { display: flex; align-items: center; gap: 6px; margin: 0 2px 8px; font-size: 13.5px; font-weight: 650; white-space: nowrap; min-height: 20px; }
.t-head .tag { margin-left: auto; font-size: 10.5px; font-weight: 600; color: var(--muted); background: var(--soft); border: 1px solid var(--line-2); border-radius: 999px; padding: 0 7px; white-space: nowrap; }
.t-head .tag.ours { color: var(--accent-ink); background: var(--accent-soft); border-color: #d3e3f8; }
.t-prompt { grid-column: 1 / 3; grid-row: 1; }
.t-plan { grid-column: 1 / 3; grid-row: 2; }
.t-photo.qwen { grid-column: 3; grid-row: 1; }
.t-photo.gpt { grid-column: 4; grid-row: 1; }
.t-photo.gems { grid-column: 5; grid-row: 1; }
.t-check { grid-column: 6; grid-row: 1; }
.t-photo.ours { grid-column: 3; grid-row: 2; }
.t-bench { grid-column: 4 / 7; grid-row: 2; }
.t-photo.ours { border-color: #b9d3f3; box-shadow: 0 0 0 1px #b9d3f3; }
.t-photo.col-on { border-color: var(--ink-2); }
.t-prompt .ptext { font-size: 13.5px; line-height: 1.6; color: var(--ink-2); margin: 0 2px; }
.t-prompt .ptext p { margin: 0 0 6px; }
.t-prompt .ptext p:last-child { margin: 0; }
.t-prompt .ptext b { color: var(--ink); }
.ph { color: var(--phrase); font-style: italic; font-weight: 600; border-radius: 3px; transition: background .15s; }
.ph.on { background: #fff1b8; }
.photo { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--soft); cursor: zoom-in; container-type: inline-size; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.ann { position: absolute; transition: opacity .15s; pointer-events: none; }
.ann.box { border: 2px dashed; border-radius: 5px; }
.ann.line { border-top: 2px dashed; height: 0 !important; }
.ann.label { color: #fff; font-size: clamp(7.5px, 5.6cqw, 10.5px); font-weight: 700; padding: .1em .55em; border-radius: 999px; white-space: nowrap; width: auto !important; height: auto !important; line-height: 1.45; }
.teaser[data-focus] .ann:not(.on) { opacity: .1; }
.t-check table { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
.t-check col.c { width: 22px; }
.t-check th img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; margin: 0 auto; box-shadow: 0 0 0 1px var(--line); }
.t-check th { font-size: 11px; font-weight: 600; color: var(--muted); padding: 0 0 6px; text-align: center; }
.t-check th:first-child { text-align: left; }
.t-check td { padding: 4px 0; border-top: 1px solid var(--line-2); text-align: center; }
.t-check td:first-child { text-align: left; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 2px; }
.t-check tr.row { transition: background .12s; }
.t-check tr.row:hover, .t-check tr.row.on { background: #fff8db; }
.t-check th.col-on, .t-check td.col-on { background: #f1f5f9; }
.t-check .t-note { font-size: 11px; color: var(--muted); margin-top: auto; padding-top: 8px; display: flex; gap: 10px; flex-wrap: wrap; }
.t-check .t-note span { display: inline-flex; align-items: center; gap: 4px; }
.mk { display: inline-block; width: 16px; height: 16px; vertical-align: middle; }
.t-plan .mini-dag { flex: 1; display: flex; align-items: center; }
.t-plan .mini-dag svg { width: 100%; height: auto; display: block; }
.fb-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.fb-row .fb-note { font-size: 11px; color: var(--muted); margin-left: auto; text-align: right; line-height: 1.35; }
.fb-row .fb-label { font-size: 11.5px; font-weight: 650; color: var(--pink); margin-right: 2px; white-space: nowrap; }
.fb-row button { position: relative; flex: 1; max-width: 58px; padding: 0; border: 0; background: none; cursor: zoom-in; min-width: 0; }
.fb-row img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 5px; }
.fb-row .fb-mark { position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; }
.t-bench .chart { flex: 1; display: flex; align-items: flex-end; }
.t-bench .chart svg { width: 100%; height: auto; display: block; }
.t-bench .legend { margin: 0 2px 4px; font-size: 11px; gap: 2px 10px; }
.t-bench .legend i { width: 9px; height: 9px; }

/* ---------- overview ---------- */
.overview { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.ov-controls { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.ov-controls .hint { font-size: 13px; color: var(--muted); margin-left: auto; }
.play { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13.5px; font-weight: 600; padding: 5px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; color: var(--ink); }
.play:hover { background: var(--soft); }
.ov-band { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; padding: 12px; border-radius: 10px; }
.ov-band + .ov-band { margin-top: 10px; }
.ov-band.plan { background: #f5f8fd; }
.ov-band.exec { background: #faf7fc; }
.ov-band > .band-label { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; color: var(--accent-ink); }
.ov-band.exec > .band-label { color: #7c3aed; }
.ov-plan-grid { display: grid; grid-template-columns: 1.05fr .9fr 1.55fr; gap: 10px; align-items: stretch; }
.ov-mid { display: grid; gap: 10px; grid-template-rows: 1fr auto; min-width: 0; }
.ov-exec-grid { display: grid; grid-template-columns: .95fr .95fr 1.2fr 1.15fr 1.45fr; gap: 10px; align-items: stretch; }
.ov-box { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; transition: opacity .2s, border-color .2s, box-shadow .2s; }
.ov-box h4 { display: flex; align-items: center; gap: 7px; margin: 0 0 8px; font-size: 13.5px; font-weight: 650; }
.ov-box h4 svg { flex: none; }
.ov-box h4 .sub { margin-left: auto; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.overview.focus .ov-box:not(.on) { opacity: .3; }
.ov-box.on { border-color: var(--ink-2); box-shadow: 0 0 0 1px var(--ink-2); }
.ov-input { font-size: 13px; line-height: 1.65; color: var(--ink-2); }
.ov-input p { margin: 0 0 6px; }
.ov-input p:last-child { margin: 0; }
.ov-input b { color: var(--ink); }
.ops-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.ops-grid span { position: relative; display: grid; place-items: center; }
.ops-grid span.off svg { opacity: .22; filter: grayscale(1); }
.ops-grid span .tick { position: absolute; right: 2px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--good); border: 1.5px solid #fff; }
.chk-list { font-size: 12.5px; color: var(--ink-2); display: grid; gap: 4px; }
.chk-list span { display: flex; align-items: center; gap: 6px; }
.ov-dag-box { display: flex; flex-direction: column; }
.ov-dag { flex: 1; display: flex; align-items: center; }
.ov-dag svg { width: 100%; height: auto; display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: #fdeee7; color: #b4441a; border: 1px solid #f7d5c6; transition: background .15s; }
.chip.k.on, .ov-rw .k.on, .ov-input .k.on, .clue.on, .ph.k.on { background: #fff1b8 !important; }
.ov-search .q { margin-bottom: 10px; }
.ov-search .q:last-child { margin-bottom: 0; }
.ov-search .q-text { font-size: 11px; color: var(--muted); line-height: 1.4; margin-top: 4px; }
.ov-analyze .arrow { text-align: center; color: var(--faint); font-size: 14px; line-height: 1; margin: 6px 0; }
.ov-analyze .result { text-align: center; font-size: 13px; font-weight: 650; color: var(--accent-ink); background: var(--accent-soft); border-radius: 8px; padding: 4px 6px; }
.clues { display: grid; gap: 1px; font-size: 12.5px; }
.clue { display: grid; grid-template-columns: 1fr auto .75fr; gap: 6px; align-items: center; padding: 2px 5px; border-radius: 5px; cursor: default; }
.clue .from { color: var(--phrase); font-style: italic; font-weight: 600; }
.clue .to { color: #0f766e; font-weight: 600; }
.clue .ar { color: var(--faint); }
.ov-rw { font-size: 12.5px; line-height: 1.6; color: #3f3a2a; background: #fffbeb; border: 1px solid #f3e4b5; border-radius: 8px; padding: 6px 8px; }
.ov-rw .k { color: #a16207; font-style: italic; font-weight: 600; border-radius: 3px; }
.gen-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.rd { min-width: 0; }
.rd button { padding: 0; border: 0; background: none; cursor: zoom-in; width: 100%; display: block; }
.rd img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; border: 2px solid transparent; }
.rd.final img { border-color: var(--good); }
.rd .rd-label { font-size: 10.5px; color: var(--muted); text-align: center; margin-top: 2px; white-space: nowrap; }
.dots { display: flex; gap: 2px; justify-content: center; margin-top: 3px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; display: block; cursor: default; }
.dots i.p { background: var(--good); }
.dots i.f { background: var(--bad); }
.gen-fails { margin: 8px 0 0; padding: 0; list-style: none; font-size: 11.5px; color: var(--ink-2); line-height: 1.45; }
.gen-fails li { padding: 3px 0 3px 15px; position: relative; border-top: 1px solid var(--line-2); }
.gen-fails li::before { content: "✕"; position: absolute; left: 1px; color: var(--bad); font-size: 10px; top: 4px; }
.gen-fails li.ok::before { content: "✓"; color: var(--good); }
.gen-fails .r-tag { color: var(--muted); margin-right: 4px; }

/* ---------- operator catalog ---------- */
.catalog { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
.cat-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 14px; align-content: start; }
.cat-group h4 { margin: 0 0 4px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 650; padding-left: 6px; }
.op-btn { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 1px solid transparent; background: none; padding: 5px 6px; border-radius: 8px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; transition: background .12s, opacity .15s; }
.op-btn:hover { background: var(--soft); }
.op-btn svg { flex: none; }
.op-btn.sel { background: var(--accent-soft); border-color: #d3e3f8; }
.op-btn.dim { opacity: .3; }
.op-btn.prod { background: #e9f7ef; border-color: #c6e9d4; }
.op-btn.cons { background: #fff6e5; border-color: #f3dfb2; }
.op-btn.prod.cons { background: linear-gradient(90deg, #e9f7ef 50%, #fff6e5 50%); border-color: #d9dfc4; }
.cat-side { border-left: 1px solid var(--line-2); padding-left: 18px; }
.type-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.type-chip { font: inherit; font-family: var(--mono); font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); cursor: pointer; }
.type-chip.sel { background: var(--ink); color: #fff; border-color: var(--ink); }
.cat-info { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.cat-info .sig { font-family: var(--mono); font-size: 12px; background: var(--soft); border-radius: 6px; padding: 6px 8px; margin: 6px 0; color: var(--ink); }
.cat-info .key { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.cat-info .key span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.cat-info .key .k-prod::before { background: #e9f7ef; border: 1px solid #c6e9d4; }
.cat-info .key .k-cons::before { background: #fff6e5; border: 1px solid #f3dfb2; }

/* ---------- checker ---------- */
.checker { display: grid; grid-template-columns: 1.1fr 1fr .95fr; gap: 20px; align-items: stretch; }
.checker > div { min-width: 0; }
.chk-dag { display: flex; flex-direction: column; }
.chk-dag .dag-box { flex: 1; display: flex; align-items: center; }
.chk-dag svg { width: 100%; height: auto; display: block; }
.chk-title { font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.chk-mid { display: flex; flex-direction: column; gap: 10px; border-left: 1px solid var(--line-2); border-right: 1px solid var(--line-2); padding: 0 20px; }
.msg { font-family: var(--mono); font-size: 12.5px; line-height: 1.55; border-radius: 8px; padding: 10px 12px; background: #fff5f5; border: 1px solid #f6d3d3; color: #7a1d1d; white-space: pre-wrap; word-break: break-word; }
.msg.ok { background: #effaf1; border-color: #c7ebcf; color: #14532d; }
.msg .k { color: #b42318; font-weight: 700; }
.msg.ok .k { color: #15803d; }
.chk-note { font-size: 13.5px; color: var(--ink-2); margin: 0; }
.btn-sm { font: inherit; font-size: 13px; font-weight: 600; padding: 4px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; align-self: flex-start; }
.btn-sm:hover { background: var(--soft); }

/* ---------- segmented controls ---------- */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; background: #eef0f3; border-radius: 9px; padding: 3px; }
.seg button { font: inherit; font-size: 13.5px; font-weight: 550; padding: 4px 12px; border: 0; border-radius: 7px; background: none; color: var(--muted); cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button.sel { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgba(15,23,42,.08), 0 0 0 1px rgba(15,23,42,.04); }
.seg-small button { font-size: 12.5px; padding: 3px 9px; }
.linkish { font: inherit; font-size: 13px; font-weight: 600; color: var(--accent-ink); background: none; border: 0; cursor: pointer; padding: 4px 2px; margin-left: auto; }
.linkish:hover { text-decoration: underline; }

/* ---------- charts & tables ---------- */
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--sans); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-2); margin: 0 0 8px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; }
.legend i.dot { border-radius: 50%; }
.legend i.ring { border-radius: 50%; background: var(--bg) !important; border: 2.5px solid; }
.hit { cursor: default; }   /* tooltip only; clickable chart rows (.mrow) set their own cursor */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th, table.data td { padding: 7px 10px; border-bottom: 1px solid var(--line-2); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.data th { font-weight: 650; color: var(--ink-2); font-size: 12.5px; border-bottom: 1px solid var(--line); }
table.data td:first-child, table.data th:first-child { text-align: left; }
table.data tr.group td { background: var(--soft); color: var(--muted); font-style: italic; font-size: 12.5px; text-align: left; }
table.data tr.ours td { background: var(--accent-soft); }
table.data td.best { font-weight: 700; }
table.data td.second { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- explorer ---------- */
.case-picker { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.case-btn { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 5px 5px 6px; cursor: pointer; text-align: left; font: inherit; transition: border-color .15s, box-shadow .15s; min-width: 0; }
.case-btn:hover { border-color: #cdd3db; }
.case-btn.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.case-btn img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--soft); }
.case-btn .cb-bench { font-size: 10.5px; font-weight: 650; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.case-btn .cb-title { font-size: 11.5px; line-height: 1.3; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.explorer { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; }
.ex-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.ex-request { grid-column: 1 / -1; }
.ex-request .req-text { font-size: 14.5px; color: var(--ink); line-height: 1.55; }
.ex-request .req-meta { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.ex-request .req-row { display: flex; gap: 12px; align-items: flex-start; }
.ex-request .req-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); cursor: zoom-in; flex: none; }
.ex-dag { display: flex; flex-direction: column; }
.ex-dag .dag-box { flex: 1; display: flex; align-items: center; min-height: 240px; }
.ex-dag .dag-box svg { width: 100%; height: auto; display: block; max-height: 380px; }
.ex-dag .nd { cursor: pointer; }
.ex-dag .nd:focus { outline: none; }
.ex-dag .nd:focus-visible .nd-sel { opacity: 1 !important; }
.ex-label { font-size: 11.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ex-side .final { position: relative; margin-top: 8px; }
.ex-side .final img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; cursor: zoom-in; background: var(--soft); }
.badge { position: absolute; top: 7px; left: 7px; background: rgba(15,23,42,.78); color: #fff; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.badge.low { background: rgba(229,72,77,.9); }
.checks-strip { display: flex; gap: 6px; margin-top: 10px; align-items: center; min-height: 46px; }
.checks-strip .cs-label { font-size: 11.5px; color: var(--muted); margin-right: 2px; line-height: 1.3; }
.checks-strip button { position: relative; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; width: 44px; height: 44px; cursor: pointer; background: var(--soft); flex: none; }
.checks-strip button.best { border-color: var(--good); }
.checks-strip button { opacity: .7; transition: opacity .15s; }
.checks-strip button:hover, .checks-strip button.sel { opacity: 1; }
.checks-strip button.sel { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }
.checks-strip img { width: 100%; height: 100%; object-fit: cover; }
.checks-strip .pc { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9.5px; font-weight: 700; color: #fff; background: rgba(15,23,42,.62); text-align: center; line-height: 1.4; }
.ex-detail { grid-column: 1 / -1; max-height: 420px; overflow: auto; }
.det-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; position: sticky; top: -18px; background: var(--bg); padding: 4px 0 6px; z-index: 1; }
.det-head .det-op { font-weight: 650; font-size: 15px; }
.det-head .det-sig { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.det-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 28px; }
.det-cols.one { grid-template-columns: minmax(0, 1fr); }
.det-body { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.det-body h5 { margin: 2px 0 5px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; }
.det-body ul { margin: 0; padding-left: 17px; }
.det-body li { margin: 2px 0; }
.det-body .q { font-family: var(--mono); font-size: 12px; background: var(--soft); border-radius: 6px; padding: 6px 9px; margin: 3px 0; color: var(--ink); }
.det-body .hit-item { padding: 5px 0; border-bottom: 1px solid var(--line-2); }
.det-body .hit-item:last-child { border-bottom: 0; }
.det-body .hit-title { color: var(--ink); font-weight: 550; }
.det-body .hit-dom { font-size: 11.5px; color: var(--muted); }
.det-body .hit-snip { font-size: 12.5px; color: var(--muted); }
.det-body .prompt-box { background: #fffbeb; border: 1px solid #f3e4b5; border-radius: 8px; padding: 10px 12px; font-size: 13.5px; color: #3f3a2a; }
.det-body .tag { display: inline-block; font-size: 10.5px; font-family: var(--mono); color: var(--muted); background: var(--soft); border-radius: 4px; padding: 0 4px; margin-right: 5px; }
.rounds { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.round img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; cursor: zoom-in; border: 2px solid transparent; background: var(--soft); }
.round.pass img { border-color: var(--good); }
.round .r-label { font-size: 11.5px; color: var(--muted); margin-top: 3px; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.round .r-label b { color: var(--ink); font-variant-numeric: tabular-nums; }
.pip { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.pip.ok { background: var(--good); }
.pip.no { background: var(--bad); }
.fails { margin: 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--ink-2); }
.fails li { padding: 4px 0 4px 18px; position: relative; border-top: 1px solid var(--line-2); }
.fails li:first-child { border-top: 0; }
.fails li::before { content: "✕"; position: absolute; left: 2px; color: var(--bad); font-size: 11px; top: 5px; }
.fails .r-tag { font-size: 10.5px; color: var(--muted); margin-right: 5px; }
.plan-json pre { font-family: var(--mono); font-size: 11.5px; background: var(--soft); border-radius: 8px; padding: 10px; overflow: auto; max-height: 300px; margin: 0; }

/* ---------- gallery ---------- */
.gallery-head { margin-bottom: 12px; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); margin-left: auto; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { width: 34px; height: 20px; border-radius: 999px; background: #d5dae1; position: relative; transition: background .15s; flex: none; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(14px); }
.gallery { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.g-header, .g-tiles { display: grid; gap: 4px; }
.g-header { position: sticky; top: 52px; z-index: 5; background: rgba(255,255,255,.96); padding: 8px 12px 7px; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.g-header div { font-size: 12px; font-weight: 600; color: var(--ink-2); text-align: center; line-height: 1.25; }
.g-header div.ours { color: var(--accent-ink); }
.g-header div small { display: block; font-weight: 500; color: var(--faint); font-size: 10.5px; }
.g-row { padding: 10px 12px 12px; border-bottom: 1px solid var(--line-2); }
.g-row:last-child { border-bottom: 0; }
.g-prompt { font-size: 13.5px; color: var(--ink); line-height: 1.5; margin: 0 0 8px; display: flex; gap: 8px; align-items: baseline; }
.g-bench { flex: none; font-size: 11px; font-weight: 650; color: var(--muted); background: var(--soft); border: 1px solid var(--line-2); padding: 0 7px; border-radius: 999px; }
.g-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.g-text.open { -webkit-line-clamp: unset; display: block; }
.g-tile { position: relative; aspect-ratio: 1; background: var(--soft); border-radius: 5px; overflow: hidden; cursor: zoom-in; border: 0; padding: 0; }
.g-tile > img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.g-tile:hover > img { transform: scale(1.03); }
.g-tile.ours { outline: 2.5px solid var(--accent); outline-offset: -2.5px; }
.g-tile .badge { top: 4px; left: 4px; font-size: 10.5px; padding: 0 5px; }
.g-tile.empty { cursor: default; display: grid; place-items: center; font-size: 11px; color: var(--faint); text-align: center; padding: 6px; }
.pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pair { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; }
.pair-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pair-imgs figure { margin: 0; min-width: 0; }
.pair-imgs .im { position: relative; aspect-ratio: 1; border-radius: 7px; overflow: hidden; background: var(--soft); cursor: zoom-in; }
.pair-imgs .im img { width: 100%; height: 100%; object-fit: cover; }
.pair-imgs .im.ours { outline: 2.5px solid var(--accent); outline-offset: -2.5px; }
.pair-imgs figcaption { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-top: 5px; text-align: center; }
.pair-imgs figcaption.ours { color: var(--accent-ink); }
.pair-prompt { font-size: 13px; color: var(--ink-2); line-height: 1.5; margin: 10px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.pair-prompt.open { -webkit-line-clamp: unset; display: block; }

.footer { padding: 24px 0 40px; font-size: 12.5px; color: var(--faint); text-align: center; border-top: 1px solid var(--line-2); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(9, 11, 16, .9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; justify-items: center; padding: 14px 72px 16px; animation: lbIn .18s ease-out; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lb-top { width: 100%; display: flex; justify-content: space-between; align-items: center; color: #cbd5e1; font-size: 13px; font-variant-numeric: tabular-nums; min-height: 36px; }
.lb-close { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; display: grid; place-items: center; }
.lb-close:hover { background: rgba(255,255,255,.2); }
.lb-stage { position: relative; margin: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; max-width: min(1100px, 100%); }
.lb-img { max-width: 100%; max-height: calc(100vh - 230px); object-fit: contain; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.45); animation: lbZoom .2s ease-out; }
@keyframes lbZoom { from { transform: scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
.lb-img.loading { opacity: 0; animation: none; }
.lb-frame.loading::after { content: ''; position: absolute; top: calc(50% - 18px); left: calc(50% - 18px); width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(255,255,255,.18); border-top-color: rgba(255,255,255,.8); opacity: 0; animation: lbSpin .8s linear infinite, lbAppear .01s linear .15s forwards; pointer-events: none; }
@keyframes lbSpin { to { transform: rotate(360deg); } }
@keyframes lbAppear { to { opacity: 1; } }
.lb-cap { color: #e2e8f0; font-size: 13.5px; line-height: 1.5; margin-top: 12px; max-width: 820px; text-align: center; }
.lb-cap b { color: #fff; }
.lb-cap .sc { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 650; padding: 0 8px; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; }
.lb-cap .pr { color: #94a3b8; margin-top: 4px; font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.lb-cap .pr.open { -webkit-line-clamp: unset; display: block; max-height: 30vh; overflow: auto; }
.lb-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; display: grid; place-items: center; }
.lb-nav:hover { background: rgba(255,255,255,.22); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-strip { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 10px; min-height: 0; }
.lb-strip button { padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; cursor: pointer; width: 46px; height: 46px; background: #1e293b; opacity: .55; transition: opacity .15s; }
.lb-strip button:hover { opacity: .85; }
.lb-strip button.sel { border-color: #fff; opacity: 1; }
.lb-strip img { width: 100%; height: 100%; object-fit: cover; }

.tooltip { position: fixed; z-index: 120; pointer-events: none; background: var(--ink); color: #fff; font-size: 12px; line-height: 1.45; padding: 6px 9px; border-radius: 7px; max-width: 300px; box-shadow: 0 4px 14px rgba(15,23,42,.25); }
.tooltip b { font-weight: 650; }
.tooltip .tt-sub { color: #cbd5e1; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .teaser { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .t-prompt { grid-column: 1 / 3; grid-row: 1; }
  .t-plan { grid-column: 3 / 5; grid-row: 1; }
  .t-check { grid-column: 1 / 3 !important; grid-row: 3 !important; } .t-bench { grid-column: 3 / 5 !important; grid-row: 3 !important; }
  .t-photo.qwen { grid-column: 1 !important; grid-row: 2 !important; } .t-photo.gpt { grid-column: 2 !important; grid-row: 2 !important; }
  .t-photo.gems { grid-column: 3 !important; grid-row: 2 !important; } .t-photo.ours { grid-column: 4 !important; grid-row: 2 !important; }
  .ov-plan-grid { grid-template-columns: 1fr 1fr; } .ov-plan-grid .ov-dag-box { grid-column: 1 / -1; }
  .ov-exec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ov-exec-grid .ov-gen { grid-column: 1 / -1; }
  .catalog, .checker { grid-template-columns: minmax(0, 1fr); }
  .cat-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-2); padding-top: 14px; }
  .chk-mid { border: 0; padding: 0; }
  .case-picker { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { font-size: 15.5px; }
  .title { font-size: 44px; } .subtitle { font-size: 19px; }
  h2 { font-size: 24px; }
  .section { padding: 48px 0; }
  .nav-links { display: none; }
  .teaser { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-prompt, .t-plan, .t-check, .t-bench { grid-column: 1 / -1 !important; grid-row: auto !important; }
  .t-photo.qwen, .t-photo.gpt, .t-photo.gems, .t-photo.ours { grid-column: auto !important; grid-row: auto !important; }
  .t-photo .t-head .tag { display: none; }
  .ov-plan-grid, .ov-exec-grid { grid-template-columns: minmax(0, 1fr); }
  .ov-band { grid-template-columns: minmax(0, 1fr); } .ov-band > .band-label { writing-mode: horizontal-tb; transform: none; text-align: left; }
  .cat-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .explorer { grid-template-columns: minmax(0, 1fr); }
  .case-picker { display: flex; overflow-x: auto; padding-bottom: 6px; } .case-btn { flex: none; width: 118px; }
  .t-plan .mini-dag, .t-bench .chart { overflow-x: auto; } .t-plan .mini-dag svg { min-width: 440px; } .t-bench .chart svg { min-width: 520px; }
  .ex-dag .dag-box { overflow-x: auto; } .ex-dag .dag-box svg { min-width: 480px; } .ex-dag.paper .dag-box svg { min-width: 0; }
  .chk-dag .dag-box { overflow-x: auto; } .chk-dag svg { min-width: 420px; }
  .det-cols { grid-template-columns: minmax(0, 1fr); }
  .pairs { grid-template-columns: minmax(0, 1fr); }
  .gallery { overflow-x: auto; } .gallery > * { min-width: 720px; } .g-header { position: static; }
  .lightbox { padding: 10px 10px 12px; } .lb-nav { top: auto; bottom: 12px; transform: none; }
  .lb-strip { padding: 0 50px; gap: 4px; } .lb-strip button { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } .lb-frame.loading::after { animation: lbAppear .01s linear .15s forwards; } }

/* ---------- v3: paper figures with overlays ---------- */
.teaser-fig { background: var(--bg); }
.fig-wrap { position: relative; }
.fig-base { width: 100%; height: auto; display: block; pointer-events: none; }
.fig-hi, .fig-ov { position: absolute; inset: 0; width: 100%; height: 100%; }
.fig-hi { mix-blend-mode: multiply; pointer-events: none; }
.fig-hi .hl { fill: #fde047; opacity: 0; transition: opacity .15s; }
.fig-hi .hl.on { opacity: .62; }
.fig-hi .hl.row.on { opacity: .42; }
.fig-hi .hl.col { fill: #cbd5e1; }
.fig-hi .hl.col.on { opacity: .45; }
.fig-ov .hit { fill: transparent; cursor: pointer; }
.fig-ov .hit.photo, .fig-ov .hit.fb, .fig-ov .hit.round { cursor: zoom-in; }
.fig-ov .hit.row, .fig-ov .hit.clue, .fig-ov .hit.phr, .fig-ov .hit.series, .fig-ov .hit.dot, .fig-ov .hit.cap, .fig-ov .hit.pill { cursor: default; }
.fig-ov .outline { fill: none; stroke: #2a78d6; stroke-width: 3; opacity: 0; transition: opacity .15s; pointer-events: none; }
.fig-ov .outline.on { opacity: 1; }
.fig-ov .dim, .fig-ov .val { opacity: 0; transition: opacity .15s; pointer-events: none; }
.fig-ov .dim.on { opacity: .8; }
.fig-ov .val.on { opacity: 1; }
.fig-ov .dimmer { opacity: 0; transition: opacity .2s; pointer-events: none; }
.fig-ov .dimmer.on { opacity: .3; }
.fig-ov .ol { fill: none; stroke: #2a78d6; stroke-width: 2.2; pointer-events: none; }
.fig-ov .ol-glow { fill: none; stroke: #2a78d6; stroke-opacity: .16; stroke-width: 9; pointer-events: none; }
.overview .fig-wrap { margin-top: 2px; }
/* catalog input / output */
.type-chip.in { background: #fff6e5; border-color: #f3dfb2; color: #92400e; }
.type-chip.out { background: #e9f7ef; border-color: #c6e9d4; color: #166534; }
.io { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: stretch; margin: 10px 0 8px; }
.io-box { border: 1px solid; border-radius: 8px; padding: 6px 8px 8px; display: flex; flex-wrap: wrap; gap: 4px; align-content: flex-start; }
.io-box h6 { width: 100%; margin: 0 0 2px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; }
.io-box.in { background: #fffbf2; border-color: #f3dfb2; } .io-box.in h6 { color: #92400e; }
.io-box.out { background: #f3fbf6; border-color: #c6e9d4; } .io-box.out h6 { color: #166534; }
.io-t { font: inherit; font-family: var(--mono); font-size: 11.5px; line-height: 1.5; padding: 1px 6px; border-radius: 999px; border: 0; cursor: pointer; }
.io-t:hover { box-shadow: inset 0 0 0 1px currentColor; }
.io-link { font: inherit; padding: 0; border: 0; background: none; color: var(--accent-ink); cursor: pointer; }
.io-link:hover { text-decoration: underline; }
.io-t.in { background: #fff1d6; color: #92400e; } .io-t.out { background: #dcf3e5; color: #166534; }
.io-arrow { align-self: center; color: var(--faint); }
/* explorer paper-style DAG */
.explorer { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.ex-dag.paper .dag-box { min-height: 0; }
.ex-dag.paper svg { width: 100%; height: auto; max-height: none; display: block; }
.dag-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.dag-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.dag-legend svg { flex: none; }
.dag-legend .lg-img { width: 13px; height: 13px; border-radius: 3px; background: linear-gradient(135deg, #bfdbfe 40%, #34a36b 41%); box-shadow: 0 0 0 1px #fff, 0 0 0 1.5px #cbd5e1; display: inline-block; }
/* results samples */
.samples-head { font-size: 13px; color: var(--muted); margin: 14px 0 8px; }
.samples-head b { color: var(--ink); }
.samples { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.chart .bar { cursor: pointer; }
@media (max-width: 760px) { .samples { grid-template-columns: repeat(3, minmax(0, 1fr)); } .explorer { grid-template-columns: minmax(0, 1fr); } }

/* ---------- v3b ---------- */
.ov-caption { display: flex; align-items: center; gap: 10px; min-height: 50px; margin-top: 10px; padding: 9px 14px; background: var(--soft); border: 1px solid var(--line-2); border-radius: 10px; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.ov-caption svg { flex: none; }
.ov-caption b { color: var(--ink); white-space: nowrap; }
.ov-caption .cap-hint { color: var(--muted); }
.fig-ov .ol.pill { stroke-width: 1.8; }
.explorer { grid-template-columns: minmax(0, 1fr) 330px; }
.ex-request-in { margin: 0 0 12px; padding: 0 0 12px; border-bottom: 1px solid var(--line-2); }
.ex-dag.pill .dag-box { min-height: 0; margin-top: 6px; }
.ex-dag.pill .dag-box svg { width: 100%; height: auto; max-height: none; display: block; }
.ex-dag.pill .nd { cursor: pointer; }
.chart .mrow { cursor: pointer; }
.chart .mrow .rowbg { fill: transparent; transition: fill .12s; }
.chart .mrow:hover .rowbg { fill: rgba(15, 23, 42, .045); }
.chart .mrow.sel .rowbg { fill: rgba(42, 120, 214, .11); }
.chart .mrow:focus { outline: none; }
.chart .mrow:focus-visible .rowbg { stroke: #2a78d6; stroke-width: 1.5; }
@media (max-width: 760px) { .explorer { grid-template-columns: minmax(0, 1fr); } .ex-dag.pill .dag-box { overflow-x: auto; } .ex-dag.pill .dag-box svg { min-width: 560px; } }

/* ---------- v3c ---------- */
.on-touch { display: none; }
@media (hover: none) { .on-hover { display: none; } .on-touch { display: inline; } }
.g-tile .inset { position: absolute; right: 4px; bottom: 4px; width: 34%; aspect-ratio: 1; border-radius: var(--img-r); overflow: hidden; box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(15,23,42,.3); cursor: zoom-in; }
.g-tile .inset img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) {
  #teaser-root, #overview-root { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #teaser-root .fig-wrap, #overview-root .fig-wrap { min-width: 880px; }
  #overview-root .ov-caption { position: sticky; left: 0; max-width: calc(100vw - 80px); }
}

/* ---------- v4d: one image frame, one hover zoom, one badge ---------- */
:root { --img-r: 6px; }
.zoom { display: block; overflow: hidden; border-radius: var(--img-r); background: var(--soft); }
.zoom img, .ex-side .final img, .pair-imgs .im img, .checks-strip img, .g-tile > img, .g-tile .inset img { transition: transform .25s ease; }
.zoom:hover img, .case-btn:hover .zoom img, .ex-side .final:hover img, .pair-imgs .im:hover img, .checks-strip button:hover img, .g-tile:hover > img, .g-tile .inset:hover img { transform: scale(1.03); }
.g-tile:has(.inset:hover) > img { transform: none; }
.g-tile, .pair-imgs .im, .checks-strip button { border-radius: var(--img-r); }
.ex-side .final { overflow: hidden; border-radius: var(--img-r); }
.ex-side .final img, .case-btn .zoom img, .round .zoom img, .ex-request .req-row .zoom img { border-radius: 0; }
.case-btn .zoom img { display: block; }
.round .zoom { border: 2px solid transparent; cursor: zoom-in; }
.round.pass .zoom { border-color: var(--good); }
.round .zoom img { border: 0; display: block; }
.ex-request .req-row .zoom { width: 64px; height: 64px; flex: none; border: 1px solid var(--line); }
.ex-request .req-row .zoom img { width: 100%; height: 100%; border: 0; display: block; }
.ex-dag .ref-img { transform-box: fill-box; transform-origin: center; transition: transform .25s ease; }
.ex-dag .nd:hover .ref-img { transform: scale(1.03); }
.badge, .g-tile .badge { top: 5px; left: 5px; font-size: 11px; padding: 1px 6px; line-height: 1.35; }
.lb-frame { position: relative; display: flex; justify-content: center; min-height: 0; max-width: 100%; }
.lb-img:not([src]) { width: min(calc(100vh - 230px), calc(100vw - 144px), 832px); aspect-ratio: 1; }
@media (max-width: 760px) { .lb-img:not([src]) { width: min(calc(100vh - 230px), calc(100vw - 20px)); } }

/* ---------- v5c: no layout jump while the data loads ---------- */
#teaser-root:empty { aspect-ratio: 1614 / 612; }
#overview-root:empty::before { content: ''; display: block; aspect-ratio: 1244 / 592; margin-bottom: 62px; }   /* figure + caption */
@media (max-width: 760px) {   /* the figures keep 880 px on phones */
  #teaser-root:empty { aspect-ratio: auto; height: calc(880px * 612 / 1614); }
  #overview-root:empty::before { aspect-ratio: auto; height: calc(880px * 592 / 1244); margin-bottom: 72px; }
}
