:root {
  --bg: #ffffff;
  --bg-alt: #f7f8fc;
  --ink: #1a1d2e;
  --ink-2: #4a5068;
  --muted: #7a809a;
  --line: #e6e8f0;
  --card: #ffffff;
  --video-bg: #151827;
  --accent: #a8577c;
  --accent-2: #e8590c;
  --grad: linear-gradient(100deg, #c9839f 0%, #b06a8e 38%, #8f6b9f 72%, #6f6c9f 100%);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 24, 50, .05), 0 6px 24px rgba(20, 24, 50, .07);
  --shadow-lg: 0 10px 40px rgba(20, 24, 50, .16);
  --frontier: #d9480f;
  --closed: #4263eb;
  --open: #2b8a3e;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--mono); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 880px; }
.muted { color: var(--muted); font-weight: 400; }
.small { font-size: .85rem; }
.center { text-align: center; }
.caption { color: var(--ink-2); font-size: .95rem; margin-top: 1.2rem; }
.note { color: var(--muted); font-size: .88rem; margin-top: .8rem; }

/* ---------- nav ---------- */
.topnav {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 1rem;
  padding: .6rem 1.4rem; background: rgba(255,255,255,.86); backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.brand-mark { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-right: .2rem; }
.nav-links { margin-left: auto; display: flex; gap: .2rem; flex-wrap: wrap; }
.nav-links a { color: var(--ink-2); font-size: .9rem; font-weight: 500; padding: .35rem .7rem; border-radius: 8px; }
.nav-links a:hover, .nav-links a.active { background: #f6eff3; color: var(--accent); text-decoration: none; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; font-size: 1.4rem; cursor: pointer; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 3.6rem 0 2.6rem; text-align: center; overflow: hidden; }
.hero-bg {
  position: absolute; inset: -20% -10% auto; height: 520px; z-index: -1; filter: blur(70px); opacity: .22;
  background:
    radial-gradient(closest-side at 20% 40%, #efd5e0, transparent),
    radial-gradient(closest-side at 50% 25%, #e2d8ee, transparent),
    radial-gradient(closest-side at 80% 45%, #f2e2e4, transparent);
}
.title { font-family: var(--display); font-size: clamp(3rem, 8vw, 5.6rem); line-height: 1; margin: 0 0 .6rem; letter-spacing: -.03em; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.subtitle { font-size: clamp(1.15rem, 2.4vw, 1.6rem); color: var(--ink-2); margin: 0 auto 1.8rem; line-height: 1.35; }
.subtitle b { color: var(--ink); }
.authors { display: flex; justify-content: center; flex-wrap: wrap; gap: .3rem 1.4rem; font-size: 1.12rem; font-weight: 500; }
.author a { color: var(--ink); border-bottom: 2px solid transparent; transition: border-color .2s, color .2s; }
.author a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.author sup { color: var(--accent); font-weight: 600; margin-left: 1px; }
.affils { display: flex; justify-content: center; flex-wrap: wrap; gap: .2rem 1.2rem; margin-top: .6rem; color: var(--ink-2); font-size: .95rem; }
.affils sup { color: var(--accent); font-weight: 600; margin-right: 2px; }
.logos { display: flex; justify-content: center; align-items: center; gap: 2.4rem; margin: 1.3rem 0 .4rem; }
.logos a { display: inline-flex; align-items: center; gap: .35rem; opacity: .92; transition: opacity .2s, transform .2s; }
.logos a:hover { opacity: 1; transform: translateY(-1px); text-decoration: none; }
.logo-cmu { height: 22px; }
.logo-amazon { height: 34px; margin-top: 8px; }
.logo-agi { font-family: var(--display); font-weight: 700; color: #1f2b3e; font-size: 1.15rem; letter-spacing: .02em; }
.corr { font-size: .85rem; color: var(--muted); margin: .3rem 0 1.6rem; }
.buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: .7rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.25rem; border-radius: 999px;
  font-weight: 600; font-size: .98rem; transition: transform .15s, box-shadow .15s, opacity .15s;
}
.btn svg { width: 18px; height: 18px; }
.btn small { font-weight: 400; opacity: .7; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; }
.btn-dark { background: #1a1d2e; color: #fff; }
.btn-color { background: var(--grad); color: #fff; }
.btn-light { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.disabled { opacity: .55; cursor: not-allowed; }
.btn.disabled:hover { transform: none; box-shadow: none; }

/* stats band */
.stats-band { background: #221a25; color: #fff; padding: 2.2rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; text-align: center; }
.stat b { display: block; font-family: var(--display); font-size: 2.1rem; line-height: 1.1;
  background: linear-gradient(100deg, #e2bccb, #cfc3e3, #e6cbc2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: .85rem; color: #d9bfd6; }

/* sections */
.section { padding: 5rem 0; }
.section.alt { background: var(--bg-alt); }
.sec-title { font-family: var(--display); font-size: clamp(1.8rem, 3.6vw, 2.5rem); line-height: 1.15; margin: 0 0 .8rem; letter-spacing: -.02em; }
.kicker { display: block; font-family: var(--sans); font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: .5rem; }
.sec-sub { color: var(--ink-2); max-width: 900px; margin: 0 0 2rem; }
.lead { font-size: 1.12rem; }
h3 { font-family: var(--display); font-size: 1.3rem; margin: 2.4rem 0 1rem; }
h4 { margin: .2rem 0 .5rem; font-size: 1.05rem; }

/* task flow */
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.cap-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2.4rem; }
.cap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow); }
.cap p { margin: 0; font-size: .92rem; }
.cap-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--c); margin-bottom: .7rem; font-size: 1rem; }

/* findings */
.finding-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.finding { border-radius: var(--radius); padding: 1.4rem; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.finding::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c); }
.finding .big { font-family: var(--display); font-size: 2rem; font-weight: 700; color: var(--c); line-height: 1.1; margin-bottom: .6rem; }
.finding .big small { font-size: 1rem; }
.finding .vs { font-size: .9rem; color: var(--muted); font-weight: 500; }
.finding p { font-size: .92rem; color: var(--ink-2); margin: 0; }

/* tabs & segmented */
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.2rem; }
.tab { border: 1px solid var(--line); background: #fff; padding: .55rem 1.05rem; border-radius: 999px; font: 600 .9rem var(--sans); color: var(--ink-2); cursor: pointer; transition: all .15s; }
.tab:hover { border-color: #c5c9de; color: var(--ink); }
.tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabs.small .tab { padding: .35rem .8rem; font-size: .82rem; }
.tab-panel { display: none; animation: fade .3s ease; }
.tab-panel.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.seg { display: inline-flex; flex-wrap: wrap; background: #eef0f7; border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: .4rem .8rem; border-radius: 8px; font: 500 .84rem var(--sans); color: var(--ink-2); cursor: pointer; }
.seg button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); font-weight: 600; }
.seg.small button { font-size: .76rem; padding: .3rem .6rem; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; flex-wrap: wrap; margin-bottom: .8rem; }
.chart-head p { margin: 0; max-width: 720px; color: var(--ink-2); font-size: .95rem; }
.chart-box { position: relative; height: 300px; background: #fff; border-radius: var(--radius); padding: 1rem; border: 1px solid var(--line); box-shadow: var(--shadow); }
.chart-box.tall { height: 440px; }
.chart-box.wide { height: 280px; }

/* tables */
.table-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
.rtable { border-collapse: collapse; width: 100%; font-size: .86rem; }
.rtable th, .rtable td { padding: .55rem .7rem; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rtable th { background: #f3f4fa; font-weight: 600; position: sticky; top: 0; }
.rtable.sortable th { cursor: pointer; user-select: none; }
.rtable.sortable th:hover { background: #e9ebf7; }
.rtable th.sorted::after { content: ' ▾'; color: var(--accent); }
.rtable th.sorted.asc::after { content: ' ▴'; }
.rtable td:first-child, .rtable th:first-child { text-align: left; }
.rtable tr.grp td { background: #fafbff; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: left; }
.rtable.compact { box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); }
.rtable.compact td:not(:first-child) { font-weight: 500; }
.mdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .45rem; vertical-align: middle; }
.rtable.prior td.y { color: #2b8a3e; font-weight: 700; }
.rtable.prior td.n { color: #d0d3df; }
.rtable.prior tr.ours td { background: linear-gradient(90deg, #f8eef3, #f1edf7); font-weight: 700; }

/* kappa */
.kappa-wrap { margin-top: 3rem; }
.kappa-wrap h3 { margin-top: 0; }
.kappa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 1rem; }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: var(--shadow); }
.kcard h5 { margin: 0 0 .7rem; font-size: .9rem; }
.krow { display: grid; grid-template-columns: 230px 1fr 54px; align-items: center; gap: .7rem; margin: .45rem 0; font-size: .84rem; }
.kbar { height: 14px; background: #f0f1f7; border-radius: 99px; position: relative; overflow: hidden; }
.kbar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.krow b { text-align: right; font-family: var(--mono); font-size: .82rem; }

/* frontier */
.frontier-charts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.fc h4 { font-size: .95rem; }
.fc .chart-box { height: 380px; }
.comparator { margin-top: 3rem; background: var(--bg-alt); border-radius: 20px; padding: 1.6rem; border: 1px solid var(--line); }
.cmp-head h3 { margin: 0 0 .3rem; }
.cmp-head p { margin: 0 0 1rem; }
.sample-strip { display: flex; gap: .7rem; overflow-x: auto; padding: .3rem .1rem .8rem; scrollbar-width: thin; }
.sthumb { flex: none; width: 150px; border-radius: 10px; overflow: hidden; cursor: pointer; background: #fff; border: 2px solid transparent; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.sthumb:hover { transform: translateY(-2px); }
.sthumb.active { border-color: var(--accent); }
.sthumb img { width: 100%; height: 84px; object-fit: contain; background: var(--video-bg); display: block; }
.sthumb div { font-size: .72rem; padding: .35rem .5rem; font-weight: 600; line-height: 1.3; }
.sthumb div small { display: block; color: var(--muted); font-weight: 500; }
.cmp-controls { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: .4rem 0 1rem; }
.ctl { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: .4rem .8rem; font: 600 .82rem var(--sans); cursor: pointer; color: var(--ink); }
.ctl:hover { border-color: var(--accent); color: var(--accent); }
.ctl.wide { width: 100%; margin-top: .7rem; }
.ctl-speed { font-size: .82rem; color: var(--ink-2); }
.ctl-speed select { margin-left: .3rem; border-radius: 6px; border: 1px solid var(--line); padding: .2rem; }
.cmp-meta { margin-left: auto; font-size: .82rem; color: var(--muted); }
.cmp-body { display: grid; grid-template-columns: 340px 1fr; gap: 1.2rem; align-items: start; }
.cmp-ref { position: sticky; top: 76px; background: #fff; border-radius: var(--radius); padding: .9rem; box-shadow: var(--shadow); border: 2px solid #1a1d2e; }
.cmp-ref video { width: 100%; border-radius: 8px; background: var(--video-bg); display: block; aspect-ratio: 1; object-fit: contain; }
.ref-law { font-size: .8rem; color: var(--ink-2); margin-top: .6rem; }
.grp-title { margin: .4rem 0 .5rem; }
.cmp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.tile { background: #fff; border-radius: 12px; padding: .5rem; box-shadow: var(--shadow); cursor: pointer; border: 2px solid transparent; transition: transform .15s, border-color .15s; }
.tile:hover { transform: translateY(-2px); border-color: var(--c); }
.tile video, .tile .failed { width: 100%; aspect-ratio: 1; border-radius: 8px; background: var(--video-bg); display: block; object-fit: contain; }
.tile .failed { display: grid; place-items: center; color: #ff8787; font-weight: 700; font-size: .95rem; text-align: center; background: repeating-linear-gradient(45deg, #1b1e2f, #1b1e2f 10px, #20243a 10px, #20243a 20px); }
.tile .failed small { display: block; color: #b195b4; font-weight: 500; font-size: .72rem; margin-top: .2rem; }
.tile-label { display: flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; margin-top: .4rem; line-height: 1.25; }
.cmp-ref .tile-label { margin: 0 0 .6rem; }
.tile-stats { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .35rem; }
.pill { font-size: .68rem; padding: 1px 7px; border-radius: 99px; background: #f0f1f7; color: var(--ink-2); font-weight: 600; }
.pill.good { background: #e6f6ea; color: #2b8a3e; }
.pill.bad { background: #fdecec; color: #c92a2a; }
.badge { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 3px 9px; border-radius: 99px; color: #fff; }
.badge.frontier { background: var(--frontier); }
.badge.closed { background: var(--closed); }
.badge.open { background: var(--open); }
.badge.gt { background: #1a1d2e; }

/* explorer */
.explorer-top { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; align-items: center; margin-bottom: 1.6rem; }
.donut-wrap { position: relative; width: 260px; height: 260px; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-center b { font-family: var(--display); font-size: 2.2rem; line-height: 1; }
.donut-center span { font-size: .78rem; color: var(--muted); max-width: 120px; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1rem; }
.chip { border: 1.5px solid var(--c, #e5d5dd); background: #fff; color: var(--ink); border-radius: 999px; padding: .38rem .85rem; font: 600 .85rem var(--sans); cursor: pointer; display: inline-flex; gap: .4rem; align-items: center; transition: all .15s; }
.chip .cnt { font-size: .72rem; font-weight: 700; color: var(--c); }
.chip:hover { background: color-mix(in srgb, var(--c) 10%, #fff); }
.chip.active { background: var(--c); color: #fff; }
.chip.active .cnt { color: rgba(255,255,255,.85); }
.filter-row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
#gallery-search { flex: 1; min-width: 220px; padding: .55rem .9rem; border-radius: 10px; border: 1px solid var(--line); font: 400 .92rem var(--sans); background: #fff; }
#gallery-search:focus { outline: 2px solid #e7d4de; border-color: var(--accent); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.1rem; }
.gcard { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: transform .2s, box-shadow .2s; border: 1px solid var(--line); animation: fade .35s ease both; }
.gcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.gmedia { position: relative; aspect-ratio: 4/3; background: var(--video-bg); }
.gmedia img, .gmedia video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.gmedia video { opacity: 0; transition: opacity .25s; }
.gcard.playing .gmedia video { opacity: 1; }
.gmedia .play { position: absolute; right: 10px; bottom: 10px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.9); display: grid; place-items: center; font-size: .7rem; color: var(--ink); transition: opacity .2s; }
.gcard.playing .play { opacity: 0; }
.eng { position: absolute; left: 10px; top: 10px; font-size: .66rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.92); color: var(--ink); letter-spacing: .04em; }
.gbody { padding: .75rem .9rem .9rem; }
.gtitle { font-weight: 700; font-size: .95rem; line-height: 1.3; margin-bottom: .3rem; }
.glaw { font-size: .8rem; color: var(--ink-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.24em; }
.gmeta { display: flex; gap: .35rem; margin-top: .55rem; flex-wrap: wrap; }
.dtag { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; color: #fff; background: var(--c); }
.more-wrap { text-align: center; margin-top: 1.6rem; }

/* construction */
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; position: relative; }
.pl-step { background: #fff; border-radius: var(--radius); padding: 1.2rem 1.1rem; border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; border-top: 4px solid var(--c); }
.pl-step:not(:last-child)::after { content: '→'; position: absolute; right: -16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; z-index: 1; }
.pl-num { width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; margin-bottom: .6rem; }
.pl-step p { font-size: .86rem; color: var(--ink-2); margin: 0; }
.sample-anatomy { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1.8rem 0 .5rem; }
.sa-item { background: linear-gradient(135deg, #faf5f7, #f6f4f9); border-radius: var(--radius); padding: 1rem 1.1rem; display: grid; grid-template-columns: 34px 1fr; column-gap: .6rem; align-items: center; border: 1px solid #ece1e7; }
.sa-item span { grid-row: span 2; font-size: 1.5rem; }
.sa-item small { color: var(--ink-2); font-size: .8rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.two-col .chart-box { height: 340px; }
.schema-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .7rem; }
.schema { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .75rem .9rem; font-size: .84rem; box-shadow: var(--shadow); }
.schema code { font-weight: 600; color: var(--accent); font-size: .8rem; }
.schema p { margin: .25rem 0 0; color: var(--ink-2); }
.schema .req { font-size: .66rem; font-weight: 700; color: #fff; background: #9a74ae; border-radius: 99px; padding: 1px 7px; margin-left: .3rem; }

/* analysis */
.analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.acard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); }
.acard p { font-size: .9rem; color: var(--ink-2); }
.acard .chart-box { box-shadow: none; border: 0; padding: 0; height: 300px; }
.sens { margin: 1.2rem .4rem .5rem; }
.sens-bar { position: relative; height: 18px; background: #f0f1f7; border-radius: 99px; }
.sens-range { position: absolute; top: 6px; height: 6px; background: #e5d6df; border-radius: 99px; }
.sens-iqr { position: absolute; top: 0; bottom: 0; left: calc((0.93 - 0.48) / 1.64 * 100%); width: calc((1.05 - 0.93) / 1.64 * 100%); background: var(--grad); border-radius: 6px; }
.sens-med { position: absolute; top: -4px; bottom: -4px; width: 3px; left: calc((0.98 - 0.48) / 1.64 * 100%); background: #1a1d2e; border-radius: 2px; }
.sens-ticks { position: relative; height: 20px; font-size: .72rem; color: var(--muted); font-family: var(--mono); }
.sens-ticks span { position: absolute; transform: translateX(-50%); top: 4px; }
.sens-ticks span:nth-child(1) { left: 0; transform: none; }
.sens-ticks span:nth-child(2) { left: calc((0.93 - 0.48) / 1.64 * 100% - 10px); }
.sens-ticks span:nth-child(3) { left: calc((0.98 - 0.48) / 1.64 * 100% + 6px); top: -38px; color: #1a1d2e; font-weight: 700; }
.sens-ticks span:nth-child(4) { left: calc((1.05 - 0.48) / 1.64 * 100% + 12px); }
.sens-ticks span:nth-child(5) { right: 0; transform: none; }
.limits { margin-top: 1.6rem; background: linear-gradient(135deg, #fbf7f9, #f6f3fa); border: 1px solid #f0e6ee; border-radius: var(--radius); padding: 1.3rem 1.5rem; }
.limits p { margin: 0; color: var(--ink-2); font-size: .93rem; }

/* bibtex */
.bib { position: relative; background: #221a25; border-radius: var(--radius); padding: 1.2rem 1.4rem; }
.bib pre { margin: 0; color: #fbe3f1; font-size: .86rem; overflow-x: auto; }
.copy { position: absolute; right: 12px; top: 12px; border: 0; background: #3d2442; color: #fff; padding: .35rem .8rem; border-radius: 8px; cursor: pointer; font: 600 .78rem var(--sans); }
.copy:hover { background: var(--accent); }

.footer { padding: 2.4rem 0; text-align: center; border-top: 1px solid var(--line); font-size: .9rem; color: var(--ink-2); }
.footer p { margin: .25rem 0; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(14, 16, 30, .55); backdrop-filter: blur(4px); animation: fade .2s; }
.modal-card { position: relative; margin: 3vh auto; width: min(1180px, 94vw); max-height: 94vh; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; animation: fade .25s; }
.modal-close { position: absolute; right: 12px; top: 10px; border: 0; background: #f0f1f7; width: 34px; height: 34px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; z-index: 2; }
.modal-close:hover { background: #e2e4f0; }
.modal-head { padding: 1rem 3.5rem 0.8rem 1.4rem; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0 0 .3rem; font-size: 1.3rem; }
.modal-head .gmeta { margin: 0; }
.modal-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 1.2rem; padding: 1.1rem 1.4rem 1.3rem; overflow: auto; min-height: 0; }
.modal-media video { width: 100%; border-radius: 12px; background: var(--video-bg); display: block; max-height: 60vh; object-fit: contain; }
.modal-media .mm-note { font-size: .8rem; color: var(--muted); margin-top: .5rem; }
.modal-info { min-width: 0; display: flex; flex-direction: column; }
.modal-panels { overflow: auto; max-height: 68vh; padding-right: .3rem; }
.mpanel { display: none; }
.mpanel.active { display: block; animation: fade .2s; }
.mpanel pre.code { margin: 0; border-radius: 10px; font-size: .76rem; line-height: 1.5; border: 1px solid var(--line); max-height: 64vh; overflow: auto; }
.mpanel pre.code code { padding: .9rem; display: block; }
.cot-sec { margin-bottom: 1rem; }
.cot-sec > .ck { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #9a74ae; margin-bottom: .25rem; }
.cot-sec p { margin: 0 0 .3rem; font-size: .9rem; }
.cot-sec ul, .cot-sec ol { margin: .2rem 0; padding-left: 1.2rem; font-size: .87rem; }
.cot-sec li { margin: .15rem 0; }
.cot-kv { display: grid; grid-template-columns: max-content 1fr; gap: .2rem .8rem; font-size: .86rem; }
.cot-kv > b { color: var(--ink-2); font-weight: 600; }
.math { display: block; overflow-x: auto; padding: .4rem .6rem; background: #f7f7fc; border-radius: 8px; margin: .25rem 0; font-size: .85rem; }
.mono { font-family: var(--mono); font-size: .8rem; background: #f4f5fa; border-radius: 6px; padding: .35rem .5rem; white-space: pre-wrap; word-break: break-word; display: block; }
.ptable { width: 100%; border-collapse: collapse; font-size: .84rem; }
.ptable th, .ptable td { padding: .4rem .55rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.ptable th { background: #f5f6fb; font-weight: 600; font-size: .78rem; }
.ptable td.num { font-family: var(--mono); font-size: .8rem; }
.ptable tr.ok td { background: #f0fbf2; }
.ptable tr.miss td { color: var(--muted); }
.code-wrap { position: relative; }
.copy-code { position: absolute; right: 10px; top: 8px; z-index: 1; padding: .25rem .6rem; font-size: .75rem; }
.summary-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .8rem; }

/* responsive */
@media (max-width: 1050px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); row-gap: 1.6rem; }
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .finding-grid { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .pl-step::after { display: none; }
  .frontier-charts { grid-template-columns: 1fr; }
  .cmp-body { grid-template-columns: 1fr; }
  .cmp-ref { position: static; max-width: 420px; }
  .sample-anatomy { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; padding: .6rem; border-bottom: 1px solid var(--line); }
  body.nav-open .nav-links { display: flex; }
  .two-col, .analysis-grid, .kappa-grid { grid-template-columns: 1fr; }
  .explorer-top { grid-template-columns: 1fr; justify-items: center; }
  .modal-body { grid-template-columns: 1fr; }
  .modal-panels { max-height: none; }
  .krow { grid-template-columns: 130px 1fr 48px; font-size: .76rem; }
  .section { padding: 3.4rem 0; }
  .chart-box.tall { height: 380px; }
}
@media (max-width: 520px) {
  .stats-grid, .finding-grid, .cap-grid, .pipeline, .sample-anatomy { grid-template-columns: 1fr 1fr; }
  .finding-grid, .cap-grid, .pipeline { grid-template-columns: 1fr; }
  .stat b { font-size: 1.6rem; }
  .gallery { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .gbody { padding: .55rem .6rem .7rem; }
  .glaw { display: none; }
  .logos { gap: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}

/* overflow guards */
.two-col > *, .analysis-grid > *, .kappa-grid > *, .frontier-charts > * { min-width: 0; }
.rtable.compact th, .rtable.compact td { white-space: normal; }
.logos { flex-wrap: wrap; }
@media (max-width: 520px) {
  .logos { gap: 1rem 1.6rem; }
  .logo-cmu { height: 18px; }
  .logo-amazon { height: 28px; }
  .rtable.compact { font-size: .8rem; }
}

/* ---------- TL;DR ---------- */
.tldr { position: relative; max-width: 920px; margin: 2.4rem auto 0; text-align: left; padding: 1.5rem 1.8rem 1.4rem 2rem; border-radius: 4px 22px 22px 4px;
  background: linear-gradient(120deg, #fbf6f8 0%, #f8f5fa 60%, #f5f4f9 100%); border-left: 6px solid transparent;
  border-image: linear-gradient(180deg, #d49ab1, #9b6fa6, #8079b0) 1; box-shadow: 0 10px 30px rgba(120, 80, 110, .06); }
.tldr-tag { display: inline-block; font: 800 .72rem/1 var(--sans); letter-spacing: .18em; color: #fff; padding: .4rem .65rem; border-radius: 6px;
  background: linear-gradient(100deg, #c27896, #9a74ae); margin-bottom: .7rem; }
.tldr-q { font-family: var(--display); font-size: clamp(1.3rem, 2.5vw, 1.8rem); line-height: 1.3; font-weight: 600; margin: 0 0 .9rem; letter-spacing: -.005em; }
.hl-in, .hl-mid, .hl-out { font-weight: 700; font-style: italic; }
.hl-in { color: #a8577c; } .hl-mid { color: #87598f; } .hl-out { color: #625e9c; }
.tagline { margin: 0; color: var(--ink-2); font-size: 1rem; padding-top: .9rem; border-top: 1px dashed #e5d5dd; }
.task-title { margin: 2.8rem 0 1.1rem; text-align: center; }
.io i { font-style: normal; position: absolute; top: -9px; left: -9px; width: 20px; height: 20px; border-radius: 50%; background: var(--c); color: #fff; font: 700 .7rem/20px var(--sans); text-align: center; }
.io { position: relative; }
.measure-title { margin-top: 0; }
.cap-grid + .note { margin-bottom: 2.2rem; }
.io-row { display: flex; justify-content: center; align-items: stretch; flex-wrap: wrap; gap: .5rem; max-width: 1000px; margin: 0 auto; }
.io { display: flex; flex-direction: column; text-align: left; padding: .55rem .9rem; border-radius: 12px; font-size: .85rem; color: var(--ink-2); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); border-left: 4px solid var(--c); }
.io b { color: var(--ink); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; }
.io-in { --c: #c27896; } .io-model { --c: #9a74ae; } .io-out { --c: #8079b0; } .io-run { --c: #c47483; }
.io-arr { align-self: center; color: var(--muted); font-weight: 700; }

/* ---------- demo ---------- */
.demo-sec { padding: 1.4rem 0 2.6rem; }
.demo { background: #221a25; border-radius: 22px; padding: 1.1rem 1.2rem 1.3rem; color: #f6e9f3; box-shadow: 0 20px 60px rgba(20, 24, 60, .25); position: relative; overflow: hidden; }
.demo::before { content: ''; position: absolute; inset: -40% -10% auto; height: 300px; background: radial-gradient(closest-side at 30% 50%, rgba(194,120,150,.25), transparent), radial-gradient(closest-side at 70% 50%, rgba(155,111,166,.2), transparent); filter: blur(30px); pointer-events: none; }
.demo-top { display: flex; align-items: center; gap: 1rem; position: relative; }
.demo-steps { display: flex; gap: 5px; flex: 1; }
.dstep { flex: var(--w, 1); height: 6px; border-radius: 99px; background: #3d2442; cursor: pointer; position: relative; overflow: hidden; border: 0; padding: 0; }
.dstep span { position: absolute; inset: 0; width: 0; background: linear-gradient(90deg, #c27896, #9a74ae, #c47483); }
.dstep:hover { background: #563460; }
.demo-ctl { display: flex; gap: .4rem; }
.demo .ctl { background: #2c1830; color: #f6e9f3; border-color: #47294d; min-width: 36px; }
.demo .ctl:hover { color: #fff; border-color: #9a74ae; }
.demo-caption { position: relative; min-height: 2.2em; margin: .8rem 0 .9rem; font-family: var(--display); font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 600; color: #fff; }
.demo-caption .num { display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: linear-gradient(135deg, #c27896, #9a74ae); font-size: .75em; margin-right: .5em; vertical-align: .1em; }
.demo-caption .sub { color: #c3a6c5; font-weight: 500; font-size: .78em; margin-left: .4em; }
.demo-caption.swap { animation: capin .45s ease; }
@keyframes capin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.demo-stage { position: relative; display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 1rem; min-height: 420px; }
.dp { background: #2c2230; border: 1px solid #40324a; border-radius: 14px; padding: .8rem; transition: opacity .6s, transform .6s, box-shadow .6s, border-color .6s; min-width: 0; }
.dp.dim { opacity: .28; }
.dp.focus { border-color: #9a74ae; box-shadow: 0 0 0 3px rgba(154, 116, 174, .25); }
.dp-label { font-size: .82rem; font-weight: 600; margin-bottom: .55rem; display: flex; align-items: center; gap: .45rem; color: #fff; }
.dp-label small { color: #b195b4; font-weight: 500; }
.dp video { width: 100%; border-radius: 9px; background: #000; display: block; aspect-ratio: 2/1; object-fit: contain; }
.gen-wrap { position: relative; }
.gen-wrap video { opacity: 0; transition: opacity .7s; }
.gen-wrap.on video { opacity: 1; }
.gen-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #9a7a9e; font-size: .85rem; border: 1.5px dashed #47294d; border-radius: 9px; transition: opacity .4s; }
.gen-wrap.on .gen-empty { opacity: 0; }
.mllm { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .9rem; border-radius: 99px; background: linear-gradient(135deg, #3e2b44, #43293d); border: 1px solid #8d6a8f; font-weight: 700; font-size: .9rem; margin-bottom: .7rem; }
.mllm small { color: #d7c4d3; font-weight: 500; }
.mllm-dot { width: 10px; height: 10px; border-radius: 50%; background: #9a74ae; box-shadow: 0 0 0 0 rgba(154,116,174,.7); }
.mllm.busy .mllm-dot { animation: pulse 1s infinite; background: #dfc6d3; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(154,116,174,.7); } 100% { box-shadow: 0 0 0 12px rgba(154,116,174,0); } }
.editor { background: #1b141e; border: 1px solid #40324a; border-radius: 10px; overflow: hidden; }
.ed-tabs { display: flex; background: #271e2b; border-bottom: 1px solid #40324a; }
.ed-tab { font: 500 .74rem var(--mono); color: #9a7a9e; padding: .4rem .8rem; border-right: 1px solid #40324a; }
.ed-tab.on { color: #fff; background: #1b141e; box-shadow: inset 0 2px 0 #9a74ae; }
.ed-body { display: none; margin: 0; height: 300px; overflow: auto; padding: .7rem .8rem; font: .72rem/1.55 var(--mono); color: #f1dbea; white-space: pre; scrollbar-width: thin; scrollbar-color: #47294d transparent; }
.ed-body.on { display: block; }
.ed-body code { background: none; padding: 0; color: inherit; }
.ed-term { color: #9fe3b0; white-space: pre-wrap; }
.ed-body .hljs-attr, .ed-body .hljs-keyword { color: #dfc6d3; }
.ed-body .hljs-string { color: #9fe3b0; }
.ed-body .hljs-number, .ed-body .hljs-literal { color: #ffb38a; }
.ed-body .hljs-comment { color: #9a7a9e; }
.ed-body .hljs-title, .ed-body .hljs-built_in { color: #e2bccb; }
.caret::after { content: '▌'; color: #9a74ae; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.scorecard { margin-top: .8rem; display: grid; gap: .45rem; }
.sc { background: #271e2b; border: 1px solid #40324a; border-radius: 10px; padding: .5rem .7rem; font-size: .8rem; opacity: 0; transform: translateY(8px); transition: opacity .45s, transform .45s; }
.sc.on { opacity: 1; transform: none; }
.sc-h { display: flex; justify-content: space-between; align-items: baseline; color: #c3a6c5; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.sc-h b { color: #fff; font-size: 1rem; letter-spacing: 0; font-family: var(--display); text-transform: none; }
.sc-bar { height: 6px; background: #40324a; border-radius: 99px; margin-top: .35rem; overflow: hidden; }
.sc-bar span { display: block; height: 100%; width: 0; border-radius: 99px; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.sc-params { display: flex; flex-wrap: wrap; gap: 3px; margin-top: .4rem; }
.sc-params i { font-style: normal; font: .66rem var(--mono); padding: 1px 6px; border-radius: 99px; background: #2a1d2a; color: #ff9aa2; }
.sc-params i.ok { background: #183223; color: #8be3a4; }
.sc-note { color: #b195b4; font-size: .72rem; margin-top: .3rem; }
.flyer-layer { position: absolute; inset: 0; pointer-events: none; }
.flyer { position: absolute; width: 96px; border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.5); transition: transform 1.1s cubic-bezier(.5,0,.2,1), opacity 1.1s; }
.demo-finale { position: absolute; inset: 0; background: #221a25; border-radius: 14px; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; gap: .7rem; padding: .3rem; opacity: 0; pointer-events: none; transition: opacity .6s; }
.demo-finale.on { opacity: 1; pointer-events: auto; }
.fin-item { position: relative; border-radius: 10px; overflow: hidden; background: #000; opacity: 0; transform: scale(.92); transition: opacity .5s, transform .5s; cursor: pointer; }
.demo-finale.on .fin-item { opacity: 1; transform: none; }
.fin-item video { width: 100%; height: 100%; object-fit: contain; display: block; }
.fin-item span { position: absolute; left: 8px; top: 8px; font-size: .66rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.92); color: #1a1d2e; }
.fin-item span.k3 { background: #e2deef; } .fin-item span.k2 { background: #efdbe4; }

@media (max-width: 900px) {
  .demo-stage { grid-template-columns: 1fr 1fr; grid-template-areas: "in out" "mid mid"; }
  .dp-in { grid-area: in; } .dp-out { grid-area: out; } .dp-mid { grid-area: mid; }
  .ed-body { height: 220px; }
  .demo-finale { grid-template-columns: repeat(2, 1fr); }
  .io-arr { display: none; }
}
@media (max-width: 520px) {
  .demo { padding: .9rem .7rem 1rem; border-radius: 16px; }
  .demo-stage { gap: .5rem; }
  .dp { padding: .5rem; }
  .dp-label small { display: none; }
  .scorecard { grid-template-columns: 1fr; }
  .io { flex: 1 1 45%; }
}

.demo-stage { height: 600px; align-items: stretch; }
.dp { overflow: hidden; display: flex; flex-direction: column; }
.dp-mid .editor { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.dp-mid .ed-body { flex: 1; height: auto; min-height: 0; }
.frames-label { font-size: .72rem; color: #b195b4; margin: .7rem 0 .35rem; }
.frames-label code { color: #dfc6d3; background: #2c1830; padding: 1px 6px; border-radius: 4px; }
.frames { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.frames img { width: 100%; border-radius: 4px; display: block; opacity: .85; }
.io-row { flex-wrap: nowrap; max-width: 1120px; }
.io { padding: .45rem .75rem; font-size: .8rem; }
@media (max-width: 1000px) { .io-row { flex-wrap: wrap; } }
@media (max-width: 900px) {
  .demo-stage { height: auto; }
  .dp-mid .ed-body { height: 240px; flex: none; }
  .frames { grid-template-columns: repeat(6, 1fr); }
  .frames-label:last-child { display: none; }
}
@media (max-width: 520px) { .frames, .frames-label { display: none; } }
.mllm { align-self: flex-start; }
@media (max-width: 600px) {
  .demo-stage { grid-template-columns: 1fr; grid-template-areas: "in" "mid" "out"; }
  .dp-mid .ed-body { height: 200px; }
  .demo-finale { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; overflow: auto; }
  .demo-caption .sub { display: block; margin: .2rem 0 0; }
}
body { word-spacing: .07em; letter-spacing: .003em; }
.sec-title, .title, .tldr-q, .demo-caption, h3, h4 { word-spacing: normal; }
.measure-title { margin-bottom: .9rem; }
.measure-title + .cap-grid { margin-top: 0; }
.dp.hide { opacity: 0; visibility: hidden; }
.demo-stage { height: 540px; }
.dp-in { justify-content: center; }
@media (max-width: 900px) { .demo-stage { height: auto; } }
.dp-in { align-self: center; }
.mlogo { width: 16px; height: 16px; object-fit: contain; vertical-align: -3px; margin-right: .45rem; flex: none; }
.mlogo.lg { width: 22px; height: 22px; vertical-align: -4px; margin-right: .5rem; }
.tile-label .mlogo { margin-right: .1rem; }

.stat-word b { font-size: 1.55rem; line-height: 1.45; }
.mail-sup { color: inherit; }
.corr a { color: var(--accent); }
@media (max-width: 1050px) { .stat-word { grid-column: span 2; } } @media (max-width: 520px) { .stat-word { grid-column: 1 / -1; } }

/* code pipeline: ranked bars */
.code-bars { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.2rem .6rem; }
.cb-row { display: grid; grid-template-columns: 22px 230px 1fr 120px; align-items: center; gap: .8rem; padding: .42rem 0; border-bottom: 1px solid #f1f2f7; --c: #6f78b4; }
.cb-row.open { --c: #5f9a86; }
.cb-row:last-of-type { border-bottom: 0; }
.cb-rank { font: 600 .78rem var(--mono); color: var(--muted); text-align: right; }
.cb-name { font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-track { position: relative; height: 16px; border-radius: 99px; background: repeating-linear-gradient(90deg, #f3f4f8 0 calc(25% - 1px), #e6e8f0 calc(25% - 1px) 25%); overflow: hidden; }
.cb-light, .cb-dark { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; }
.cb-light { background: color-mix(in srgb, var(--c) 28%, #fff); }
.cb-dark { background: var(--c); }
.cb-val { display: flex; flex-direction: column; line-height: 1.15; }
.cb-val b { font-size: 1rem; font-family: var(--display); }
.cb-val small { font-size: .72rem; color: var(--muted); }
.cb-axis { display: grid; grid-template-columns: 22px 230px 1fr 120px; gap: .8rem; padding-top: .2rem; }
.cb-ticks { position: relative; height: 1.1rem; font: .7rem var(--mono); color: var(--muted); }
.cb-ticks i { position: absolute; font-style: normal; transform: translateX(-50%); }
.cb-ticks i:nth-child(1) { left: 0; transform: none; } .cb-ticks i:nth-child(2) { left: 25%; } .cb-ticks i:nth-child(3) { left: 50%; } .cb-ticks i:nth-child(4) { left: 75%; } .cb-ticks i:nth-child(5) { right: 0; transform: none; }
.cb-legend { display: flex; flex-direction: column; gap: .3rem; font-size: .82rem; color: var(--ink-2); }
.cb-legend span { display: flex; align-items: center; gap: .45rem; }
.cb-key { display: inline-block; width: 26px; height: 10px; border-radius: 99px; background: #6f78b4; }
.cb-key.light { background: color-mix(in srgb, #6f78b4 28%, #fff); }
.cb-legend::after { content: 'blue = closed-source · green = open-source'; font-size: .74rem; color: var(--muted); }
@media (max-width: 700px) {
  .cb-row, .cb-axis { grid-template-columns: 16px 1fr 84px; }
  .cb-row .cb-track { grid-column: 2 / 4; grid-row: 2; }
  .cb-axis { display: none; }
  .cb-name { font-size: .82rem; }
}
.hf-ico { width: 20px; height: 20px; }
