/* Shared look (after psi-lab.ai/Psi0): serif headings, mono kickers, cream panels holding white cards, quiet tables. */
:root{--serif:"Iowan Old Style","Palatino Linotype","Book Antiqua",Palatino,"Nimbus Roman No9 L","Times New Roman",serif;--mono:"IBM Plex Mono","SF Mono",Menlo,"Courier New",monospace;--panel:#fcf9f5;--hair:#4c4f6914;--ink:#4c4f69;--muted:#8c8fa1}
.research-title,.section h2,.prose h3,.prose h4,.evidence h3{font-family:var(--serif);font-weight:600;letter-spacing:-.02em}
.section{background:#fff}
.evidence{background:#fff}

/* Panel + card */
.panel{margin-top:30px;border-radius:20px;border:1px solid var(--hair);background:var(--panel);padding:22px;display:grid;gap:16px}
.kicker{margin:0 0 2px 4px;text-transform:uppercase;letter-spacing:.24em;font-size:12px;color:var(--muted);font-family:var(--mono)}
.panel-card,.evidence .panel-card{padding:26px 28px;border-radius:16px;border:1px solid var(--hair);background:#ffffffb3;box-shadow:none;min-width:0}
.panel-card>:first-child{margin-top:0}
.panel-card p,.evidence .panel-card p{color:var(--ink)}
.prose .panel-card h3{font-size:26px;margin:0 0 10px}
.prose .panel-card h4{font-size:26px;line-height:1.15;margin:0}
.evidence .panel-card h3{margin-top:22px}
.abl-head{display:grid;gap:8px;margin-bottom:6px}
.abl-head p,.evidence .panel-card p{margin:0;line-height:1.6}
.panel .architecture-figure{margin:0}
.panel .architecture-figure .figure-panel{background:none;padding:0}
.panel .note{margin:0 4px}
.evidence-grid.abl-grid{margin-top:0;gap:16px}

/* Method card joins the same family */
.method-card.panel-like{background:var(--panel);border-color:var(--hair);border-radius:20px;box-shadow:none}
.method-card .method-foot{background:#ffffffb3;border-top-color:var(--hair)}
.method-tabs button span{font-family:var(--mono);letter-spacing:.08em}
.col-kicker{font-family:var(--mono);text-transform:uppercase;letter-spacing:.16em;font-size:11px}
.method-tabs button.active{box-shadow:0 0 0 1px var(--hair)}

/* Tables */
.section table th,.section table td{padding:12px 10px;border-bottom:1px solid var(--hair);background:none}
.section table thead th{font-family:var(--mono);font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:500}
.abl-table th,.abl-table td{text-align:center}
.abl-table th:first-child,.abl-table td:first-child{text-align:left}
.abl-table .yes{color:#40a02b;font-weight:700}.abl-table .no{color:#bcc0cc}
.section table tr.ours td{color:#a23d62;font-weight:600;background:#fbeef380}
.sim-table caption{font-family:var(--mono);text-transform:uppercase;letter-spacing:.12em;font-size:12px;color:var(--muted)}

/* Simulation display inside its card */
.panel .settings{background:#f3efe9}
.panel .sim-video{background:#f7f4ef}
.sim-score .mini-label{font-family:var(--mono);text-transform:uppercase;letter-spacing:.14em;font-size:12px}
.panel .bar-chart{border-bottom-color:var(--hair)}
.panel .bars{background:linear-gradient(var(--hair),var(--hair)) bottom 34px left/100% 1px no-repeat}

@media(max-width:650px){.panel{padding:12px}.panel-card,.evidence .panel-card{padding:18px}.prose .panel-card h3,.prose .panel-card h4{font-size:22px}}

.research-title{font-family:var(--serif);font-weight:600;letter-spacing:-.02em}
@media(min-width:651px){.panel-card p,.evidence .panel-card p{font-size:18px;line-height:1.65}}

/* Overview: a quieter, smaller block */
@media(min-width:651px){#abstract>p,#abstract .contributions{font-size:17px;line-height:1.75}#abstract h2{font-size:clamp(30px,3vw,40px)}#abstract h3{font-size:23px;margin-top:30px}}

/* Method diagram: slow ambient motion */
.mask i.on{animation:cell 6s ease-in-out infinite}
.mask i:nth-child(n+5).on{animation-delay:.6s}.mask i:nth-child(n+9).on{animation-delay:1.2s}.mask i:nth-child(n+13).on{animation-delay:1.8s}
@keyframes cell{0%,100%{opacity:.35}12%,55%{opacity:1}}
.flow-col .out{animation:breathe 5s ease-in-out infinite}
.flow-col .act-out{animation-delay:1.2s}
@keyframes breathe{0%,100%{box-shadow:0 0 0 0 #d45c8000}50%{box-shadow:0 0 0 5px #d45c8014}}
.pill:first-child{animation:breathe 5s ease-in-out infinite .6s}
@media(prefers-reduced-motion:reduce){.mask i.on,.flow-col .out,.pill:first-child{animation:none}}
.flow-link span{background:var(--panel)}
/* stronger motion so it reads at a glance */
@keyframes cell{0%,100%{opacity:.3}12%,55%{opacity:1}}
@keyframes breathe{0%,100%{box-shadow:0 0 0 0 #d45c8000}50%{box-shadow:0 0 0 8px #d45c802e}}

/* Slow stage switching */
.flow-col{transition:opacity .9s ease,filter .9s ease}
#method-copy{transition:opacity .35s ease}#method-copy.fading{opacity:0}
.method-tabs button{transition:background .6s,color .6s,box-shadow .6s}

/* Connectors: a soft light streak runs along each line instead of a dot */
.down{width:2px;border-radius:2px;background:linear-gradient(#c3c3cc 0 30%,#e48aa6 45%,#d45c80 50%,#e48aa6 55%,#c3c3cc 70% 100%) 0 100%/100% 340%;animation:streak-v 3.2s ease-in-out infinite}
.down:after{left:-3.5px}
.flow-link:before{height:2px;top:calc(50% - .5px);border-radius:2px;background:linear-gradient(90deg,#bdbdc7 0 30%,#e48aa6 45%,#d45c80 50%,#e48aa6 55%,#bdbdc7 70% 100%) 100% 0/340% 100%;animation:streak-h 4s ease-in-out infinite}
@keyframes streak-v{to{background-position:0 0}}
@keyframes streak-h{to{background-position:0 0}}
@media(max-width:980px){.flow-link:before{width:2px;height:auto;left:calc(50% - .5px);background:linear-gradient(#bdbdc7 0 30%,#e48aa6 45%,#d45c80 50%,#e48aa6 55%,#bdbdc7 70% 100%) 0 100%/100% 340%;animation-name:streak-v}}
@media(prefers-reduced-motion:reduce){.down,.flow-link:before{animation:none;background:#c3c3cc}}

/* Block-causal attention matrix: rows = queries, columns = keys, grouped into time-aligned blocks */
.bmask{display:grid;grid-template-columns:8px repeat(var(--n),15px);gap:3px;justify-content:center;margin:18px auto 8px}
.bmask i{width:15px;height:15px;border-radius:3px;background:#f0f1f4}
.bmask i.k{border-radius:2px;opacity:.9}
.bmask>i.k:nth-child(-n+9){height:8px;align-self:end}
.bmask i.k:not(:nth-child(-n+9)){width:8px}
.bmask .rgb{background:#bcd8f0}.bmask .dep{background:#f3d98c}.bmask .his{background:#9fd6c4}.bmask .sta{background:#c6e6b3}.bmask .act{background:#efb8cf}
.bmask i.on{animation:blk 8s ease-in-out infinite;animation-delay:calc(var(--b) * .9s)}
@keyframes blk{0%,100%{opacity:.4}10%,60%{opacity:1}}
.core .mask-cap{line-height:1.5}
@media(max-width:650px){.bmask{grid-template-columns:6px repeat(var(--n),12px);gap:2px}.bmask i{width:12px;height:12px}.bmask i.k:not(:nth-child(-n+9)){width:6px}.bmask>i.k:nth-child(-n+9){height:6px}}
@media(prefers-reduced-motion:reduce){.bmask i.on{animation:none}}

/* Stage columns drawn like the paper figure: outputs on top, shared transformer, encoded inputs below; data flows upward */
@media(min-width:981px){.method-flow{grid-template-columns:.8fr 34px 1fr 34px 1.45fr}}
.down.up{transform:scaleY(-1);height:16px;margin:4px auto}
.io-row{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:6px;align-items:end}
.io-row.outs-row{align-items:start;grid-auto-columns:auto;justify-content:center;gap:18px}
.io{display:flex;flex-direction:column;align-items:center;min-width:0}
.io .down.up{margin:3px auto}
.io-label{font-size:14px;color:#33333b;text-align:center;line-height:1.25}
.outs-row .io-label{font-family:var(--serif);font-size:17px;font-weight:600}
.enc{font-size:12.5px;line-height:1.2;text-align:center;padding:6px 8px;border-radius:8px;border:1px solid;min-width:0}
.e-vae{background:#e3eef8;border-color:#bcd5ea;color:#2f5f86}.e-txt{background:#eee8f8;border-color:#d4c8ee;color:#5a4a86}
.e-sta{background:#e6f3df;border-color:#c6e2b6;color:#3f6b2e}.e-act{background:#fae6ef;border-color:#efc3d6;color:#a23d62}
.strip{display:inline-flex;gap:2px;padding:3px;border-radius:5px;border:1px solid #d8dae2;background:#fff}
.strip i{width:8px;height:8px;border-radius:2px}
.strip .rgb{background:#bcd8f0}.strip .dep{background:#f3d98c}.strip .txt{background:#d8ccf0}.strip .his{background:#6fbfa6}.strip .sta{background:#b9df9f}.strip .act{background:#efb8cf}
.io-img{width:100%;max-width:64px;margin-bottom:4px}
.loss{align-self:center;font-family:var(--serif);font-style:italic;font-size:17px;color:#4c4f69;white-space:nowrap}
.loss sub{font-size:.62em}
.core{flex:0 0 auto;padding:14px}
.core .mask-cap{margin:2px 0 0;font-size:13px}
.core .bmask{margin:10px auto 0}
@media(max-width:650px){.io-row.five{grid-auto-flow:row;grid-template-columns:repeat(3,1fr);row-gap:14px}.outs-row{flex-wrap:wrap}.loss{font-size:15px}}
.io-row:not(.outs-row){align-items:start}
.io-row:not(.outs-row) .enc{min-height:42px;display:flex;align-items:center;justify-content:center;width:100%;max-width:92px}
.io-row:not(.outs-row) .io-label{white-space:nowrap;font-size:13.5px}
.io-img{margin:4px 0 0}
/* Simplified stage columns: token strips with one short label, no encoder boxes */
.io-row,.io-row:not(.outs-row){align-items:start;gap:4px}
.io{gap:7px}
.io .strip{padding:4px;border-radius:6px}
.io .strip i{width:10px;height:10px;border-radius:2.5px}
.io-row:not(.outs-row) .io-label{font-size:13px;color:#6b6b75;white-space:nowrap}
.outs-row{gap:22px}
.outs-row .io-label{font-family:var(--serif);font-size:16px;font-weight:600;color:#33333b}
.core strong{margin-bottom:2px}
.core .bmask{margin:12px auto 2px}
.flow-col .core{flex:1 1 auto;justify-content:center}

/* Method = the paper figure; hovering a stage half veils the other half */
.method-figure{position:relative;margin:8px 22px 22px;padding:18px;border-radius:16px;background:#fff;border:1px solid var(--hair)}
.method-figure img{display:block;width:100%;height:auto}
.method-figure .half{position:absolute;top:0;bottom:0;transition:background .7s ease}
.method-figure .h-world{left:0;width:calc(18px + (100% - 36px) * .4397)}
.method-figure .h-joint{right:0;left:calc(18px + (100% - 36px) * .4397)}
.method-figure .h-world{border-radius:16px 0 0 16px}.method-figure .h-joint{border-radius:0 16px 16px 0}
.method-card[data-step="world"] .h-joint,.method-card[data-step="joint"] .h-world{background:#ffffff8c}
.method-card[data-step="world"] .h-world,.method-card[data-step="joint"] .h-joint{box-shadow:inset 0 0 0 2px #d45c8033}
@media(max-width:650px){.method-figure{margin:6px 10px 12px;padding:8px;overflow-x:auto}.method-figure .h-world{width:calc(8px + (100% - 16px) * .4397)}.method-figure .h-joint{left:calc(8px + (100% - 16px) * .4397)}}

/* Native re-drawing of the paper method figure */
.method-figure{overflow-x:auto}
.mf{--b-r:#4a90c8;--f-r:#bfdcf1;--b-s:#c9a23a;--f-s:#f4d47e;--b-t:#9b7fc8;--f-t:#ddd2ef;--b-h:#2d8a7a;--f-h:#5fbfae;--b-st:#8cbf73;--f-st:#d0e8c2;--b-a:#c062a8;--f-a:#efc6e4;
  min-width:1040px;display:grid;grid-template-columns:1fr 86px 1.3fr;grid-template-rows:auto auto auto auto;font-family:var(--serif);color:#1f2328;font-size:15px}
.mf-stage{grid-row:1/5;display:grid;grid-template-rows:subgrid;transition:opacity .6s ease}
.mf-mid{grid-row:1/5;display:grid;grid-template-rows:subgrid;background:linear-gradient(#a9adb8 50%,transparent 0) center/1.5px 9px repeat-y}
.method-card[data-step="world"] .mf-stage[data-col="joint"],.method-card[data-step="joint"] .mf-stage[data-col="world"]{opacity:.45}
.mf-top{display:flex;align-items:flex-end;justify-content:space-around;gap:16px;padding:6px 8px 14px}
.mf-bottom{display:flex;align-items:flex-start;justify-content:space-around;gap:10px;padding:12px 6px 6px}
.mf h5{margin:6px 0 0;text-align:center;font-family:var(--serif);font-size:23px;font-weight:700;letter-spacing:-.01em}
/* legend */
.mf-legend{list-style:none;margin:0;padding:0;align-self:flex-start;display:grid;gap:3px;font-size:14.5px}
.mf-legend li{display:flex;align-items:center;gap:8px}
.mf-legend i,.mf-strip i{display:inline-block;width:14px;height:14px;border-radius:3px;border:1px solid}
.mf .r{background:var(--f-r);border-color:var(--b-r)}.mf .s{background:var(--f-s);border-color:var(--b-s)}.mf .t{background:var(--f-t);border-color:var(--b-t)}
.mf .h{background:var(--f-h);border-color:var(--b-h)}.mf .st{background:var(--f-st);border-color:var(--b-st)}.mf .a{background:var(--f-a);border-color:var(--b-a)}
/* token strips */
.mf-strip{display:inline-flex;gap:4px;padding:4px 5px;border-radius:6px;border:1.5px solid;background:#fff!important}
.mf-strip.rs{border-color:var(--b-r);border-right-color:var(--b-s);border-image:linear-gradient(90deg,var(--b-r),var(--b-s)) 1;border-radius:0}
.mf-strip.t{border-color:var(--b-t)}.mf-strip.h{border-color:var(--b-h)}.mf-strip.st{border-color:var(--b-st)}.mf-strip.a{border-color:var(--b-a)}
/* encoders, arrows, labels */
.mf-enc{display:inline-block;padding:6px 16px;border-radius:8px;border:1.5px solid;font-size:15.5px;white-space:nowrap}
.e-v{background:linear-gradient(#dff1fa,#c9e6f4);border-color:#7fb7da}.e-t{background:#eee6f6;border-color:#a88fd0}.e-s{background:#e1f0d7;border-color:#93c07a}.e-a{background:#f7e0f0;border-color:#d27ab9}
.mf-up{display:block;position:relative;width:1.5px;height:16px;background:#2b2f36;margin:0 auto}
.mf-up:after{content:'';position:absolute;left:-3.5px;top:-4px;border:4.25px solid transparent;border-bottom:6px solid #2b2f36;border-top:0}
.mf-up.long{height:34px}
.mf-out,.mf-in{display:flex;flex-direction:column;align-items:center;gap:0}
.mf-out .mf-up,.mf-in .mf-up{margin:2px auto 3px}
.mf-out b{font-weight:500;font-size:22px;margin-bottom:2px}
.mf-label{margin-top:6px;font-size:16px;white-space:nowrap}
.mf-xattn{color:#7b3fc4;font-size:13.5px;margin-bottom:3px}
.mf-lang{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border-radius:8px;border:1.5px solid #a88fd0;background:#eee6f6;font-size:15.5px}
.mf-lang svg{width:20px;height:20px}
.mf-loss{align-self:center;font-style:italic;font-size:19px;white-space:nowrap}
.mf-loss sub{font-size:.6em;font-style:normal}
/* image pairs */
.mf-pair{display:grid;grid-template-columns:auto 58px 58px;gap:3px;align-items:center;text-align:center}
.mf-pair img{width:100%;aspect-ratio:4/3;object-fit:cover;display:block}
.mf-pair .g{font-size:13px;line-height:1.15;padding-right:5px}
.mf-pair em{font-style:normal;font-size:14.5px}
.mf-pair.sm{grid-template-columns:auto 48px 48px}
.c-rgb{color:#3b88c4}.c-sp{color:#b8902a}
.mf-hist{width:96px;display:block;margin-top:2px}
.mf-state{width:104px;border:1.5px solid #b9dba7;border-radius:6px;padding:4px;background:#f4faf0;display:block}
.mf-arm{width:30px;margin:2px auto 3px;display:block}.mf-arm.in{width:44px;margin-top:6px}
/* transformer bar + initialize arrow */
.mf-bar{border:1.5px solid #5aa5d6;background:#cfe8f4;border-radius:14px;padding:16px 10px;text-align:center;display:flex;flex-direction:column;justify-content:center;gap:4px}
.mf-bar strong{font-size:22px;font-weight:700;color:#1f3445}
.mf-bar span{font-size:16px;color:#2a3a46}
.mf-mid{position:relative}
.mf-init{grid-row:2;align-self:center;justify-self:stretch;position:relative;margin:0 14px 0 0;padding:7px 4px;background:#f1f3f6;border:1.5px solid #8a8f99;border-right:0;font-weight:700;font-size:13.5px;text-align:center}
.mf-init:after{content:'';position:absolute;right:-14px;top:-9px;border:solid transparent;border-width:17px 0 17px 14px;border-left-color:#8a8f99}
@media(max-width:650px){.method-figure{padding:10px}}
.method-figure .mf img{height:auto}
.method-figure .mf .mf-arm{width:30px}.method-figure .mf .mf-arm.in{width:42px}
.method-figure .mf .mf-hist{width:92px}.method-figure .mf .mf-state{width:100px}
.method-figure .mf .mf-pair img{width:100%;height:auto}
.mf-legend li{white-space:nowrap;font-size:14px}
.mf-legend i{width:13px;height:13px}
.mf{grid-template-columns:.95fr 80px 1.35fr;min-width:1060px}
.mf-bottom{gap:6px;padding-left:2px;padding-right:2px}
.mf-enc{padding:6px 12px;font-size:15px}
/* the figure keeps its drawn proportions and is scaled to fit its card (see fitMethodFigure in app.js) */
.method-figure{overflow:hidden}
.mf{width:max-content;min-width:0;grid-template-columns:auto 80px auto;transform-origin:0 0}
/* fixes: hollow block arrow like the paper, upright script L, rounded two-tone RGB-D strip */
.mf-init{margin:0 2px;padding:0;background:none;border:0;height:46px;display:flex;align-items:center;justify-content:center}
.mf-init:after{content:none}
.mf-init svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.mf-init b{position:relative;font-size:13.5px;font-weight:700;margin-right:12px}
.mf-loss{font-style:normal}
.mf-strip.rs{border:1.5px solid transparent;border-radius:6px;border-image:none;background:linear-gradient(#fff,#fff) padding-box,linear-gradient(90deg,var(--b-r) 50%,var(--b-s) 50%) border-box!important}
.mf-loss i.L{font-family:"STIX Two Math","Cambria Math","Latin Modern Math",serif;font-style:normal;font-size:1.15em}.mf-loss sub{font-size:.62em}
/* Method footer: the two stages, plainly */
.method-foot{grid-template-columns:1fr 1fr;gap:40px}
.mstep{transition:opacity .6s ease}
.mstep>span{font-family:var(--mono);font-size:13px;letter-spacing:.12em;color:var(--muted)}
.prose .method-foot .mstep h4{font-size:24px;margin:4px 0 8px}
.prose .method-foot .mstep p{font-size:18px;line-height:1.65}
.method-card[data-step="world"] .mstep[data-col="joint"],.method-card[data-step="joint"] .mstep[data-col="world"]{opacity:.4}
@media(max-width:980px){.method-foot{grid-template-columns:1fr;gap:20px}}
/* Method footer v2: two stage cards with a big numeral and an input -> output line */
.method-foot{display:grid;grid-template-columns:1fr 40px 1.35fr;gap:0;align-items:stretch;padding:22px;background:none;border-top:0}
.mstep{display:flex;gap:18px;padding:22px 24px;border-radius:16px;border:1px solid var(--hair);background:#ffffffb3;transition:opacity .6s ease,box-shadow .6s ease,background .6s ease}
.mstep.s1{border-top:3px solid #5aa5d6}.mstep.s2{border-top:3px solid #d27ab9}
.mnum{font-family:var(--serif);font-size:56px;line-height:.9;font-weight:600}
.s1 .mnum{color:#4a90c8}.s2 .mnum{color:#c062a8}
.prose .method-foot .mstep h4{font-size:23px;margin:2px 0 6px}
.prose .method-foot .mstep p{font-size:17px;line-height:1.55;margin:0 0 14px;color:var(--ink)}
.mio{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.mc{font-size:13px;padding:4px 10px;border-radius:7px;border:1px solid;white-space:nowrap}
.mc.r{background:#e6f2fa;border-color:#a9cfe9;color:#2f5f86}.mc.t{background:#f1ebf8;border-color:#cdbbe8;color:#5a4a86}.mc.h{background:#dcf1ea;border-color:#8fcfbb;color:#22695c}
.mc.st{background:#e8f4e0;border-color:#b9dba7;color:#3f6b2e}.mc.a{background:#fae8f3;border-color:#e6b3d4;color:#a23d62}
.mto{color:#8c8fa1;font-weight:400;margin:0 2px}
.minit{align-self:center;justify-self:center;color:#a9adb8;font-size:22px}
.method-card[data-step="world"] .mstep.s1,.method-card[data-step="joint"] .mstep.s2{background:#fff;box-shadow:0 10px 30px -18px #2a2a4055}
@media(max-width:980px){.method-foot{grid-template-columns:1fr;gap:12px}.minit{transform:rotate(90deg)}}
@media(max-width:650px){.method-foot{padding:12px}.mstep{padding:18px;gap:12px}.mnum{font-size:42px}}
.method-card .method-foot{background:none;border-top:0;padding-top:0}
.mstep>span.mnum{font-family:var(--serif);font-size:56px;line-height:.9;font-weight:600;letter-spacing:0}
.s1>span.mnum{color:#4a90c8}.s2>span.mnum{color:#c062a8}
@media(max-width:650px){.mstep>span.mnum{font-size:42px}}
@media(min-width:981px){.method-foot{grid-template-columns:.9fr 36px 1.55fr}}.mc{padding:4px 8px}.mio{gap:5px}

/* Type scale (desktop): 20px body, ~1.2 steps; small text floors at 15px so nothing reads as fine print */
@media(min-width:651px){
  nav{font-size:16px}
  .prose>p,.section-copy,.contributions,#abstract>p,#abstract .contributions{font-size:20px;line-height:1.75}
  #abstract h2{font-size:clamp(34px,3.6vw,50px)}#abstract h3{font-size:29px}
  .panel-card p,.evidence .panel-card p,.prose .method-foot .mstep p,.abl-head p{font-size:19px;line-height:1.65}
  .prose .panel-card h3,.prose .panel-card h4,.evidence .panel-card h3{font-size:28px}
  .prose .method-foot .mstep h4{font-size:27px}
  .kicker{font-size:13.5px}
  .method-tabs button{font-size:17px;padding:13px 20px}.method-tabs button span{font-size:13px}
  .settings button{font-size:16px}
  .section table{font-size:17px}.section table thead th{font-size:13.5px}
  .sim-table caption,.sim-score .mini-label{font-size:13.5px}
  .sim-score p{font-size:19px}.comparison>div:not(.track){font-size:16px}
  .video-label{font-size:15px}
  .note,.panel .note,.architecture-figure figcaption{font-size:16px;line-height:1.6}
  .mc{font-size:15px;padding:5px 10px}
  .bar b{font-size:20px}.bar small{font-size:16px;bottom:-28px}.evidence .gain{font-size:16px}
  .mstep>span.mnum{font-size:64px}
}
/* stage cards: numeral sits beside the title only, so the chip row gets the full card width */
.mstep{display:grid;grid-template-columns:auto 1fr;column-gap:16px;align-items:center}
.mstep>div{display:contents}
.mstep>span.mnum{grid-row:1}
.mstep h4{grid-column:2;grid-row:1}
.mstep p,.mstep .mio{grid-column:1/-1}
.prose .method-foot .mstep p{margin-top:10px}
@media(min-width:651px){
  .affiliations{font-size:17px}
  footer>span,footer>a:last-child{font-size:15px}
}
.mstep{align-content:start}
@media(min-width:651px){.contribution-note{font-size:14px}}
.mstep{row-gap:0}.prose .method-foot .mstep h4{margin:0}.prose .method-foot .mstep p{margin:10px 0 14px}

/* Experiments: Real world / Simulation switch */
.exp-view[hidden]{display:none}
.exp-switch{display:inline-flex;gap:4px;margin-top:26px;padding:5px;border-radius:16px;background:var(--panel);border:1px solid var(--hair)}
.exp-switch button{background:none;color:#6b6b75;font-size:17px;padding:11px 22px;border-radius:12px;transition:background .3s,color .3s}
.exp-switch button.active{background:#fff;color:#1f1f25;box-shadow:0 0 0 1px var(--hair),0 2px 10px #0000000d}
.exp-switch+.panel{margin-top:14px}
.sim-table[data-active="4"] [data-c="4"],.sim-table[data-active="5"] [data-c="5"]{box-shadow:inset 0 0 0 9999px #20202408;font-weight:650;color:#1f1f25}
.sim-table[data-active="4"] tr.ours [data-c="4"],.sim-table[data-active="5"] tr.ours [data-c="5"]{color:#a23d62;background:#f6dfe9}
.real-table td,.real-table th{padding-left:8px;padding-right:8px}
#real-tasks{flex-wrap:wrap}
@media(max-width:650px){.exp-switch button{font-size:15px;padding:9px 16px}}
@media(min-width:651px){.section .real-table{font-size:15.5px}.section .real-table thead th{font-size:12px;letter-spacing:.04em}.real-table td,.real-table th{padding:12px 7px}}

/* BibTeX */
.cite-head{display:flex;align-items:center;justify-content:space-between;gap:16px}
.cite-head h2{margin-bottom:0}
.cite-copy{font-size:16px;padding:10px 20px;border-radius:12px;background:#fff;color:#1f1f25;border:1px solid var(--hair);box-shadow:0 2px 10px #0000000d}
.cite-copy:hover{background:#f6f3ee}
.cite-copy:focus-visible{outline:2px solid #d45c80;outline-offset:2px}
.cite-panel{margin-top:22px;padding:0}
.cite-panel pre{margin:0;padding:24px 26px;overflow-x:auto;font-family:var(--mono);font-size:15px;line-height:1.65;color:#3a3d4a;white-space:pre}
@media(max-width:650px){.cite-panel pre{font-size:13px;padding:16px}}
.panel.exp-view{margin-top:14px}
/* Both result views share one grid cell, so the section keeps the same size and position when switching */
.exp-views{display:grid;margin-top:14px}
.exp-views>.panel.exp-view{grid-area:1/1;margin-top:0;align-self:start}
.exp-views>.exp-view[hidden]{display:grid;visibility:hidden;pointer-events:none}
.sim-video video{width:100%;aspect-ratio:16/10;object-fit:cover;display:block}
.sim-table td,.sim-table th{height:50px;box-sizing:border-box}

/* Resource buttons: consistent 1.6px line icons, solid GitHub mark */
.resource-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:none}
.resource-button svg.fill{fill:currentColor;stroke:none;width:17px;height:17px}
.resource-button svg .solid{fill:currentColor;stroke:none}
.resource-button{gap:10px}
