/* Last-layer SAE figure, compact. Scoped under #convnext-sae-residual.sll so it wins over the retired
   dist/convnext-sae-residual.css rules that still target the same id. */
#convnext-sae-residual.sll{max-width:none;width:100%;margin:26px 0 30px;padding:0;color:#222629;font:12px/1.45 var(--sans,Arial,sans-serif)}
#convnext-sae-residual.sll *{box-sizing:border-box}
.sll button{font-family:var(--sans,Arial,sans-serif);cursor:pointer;margin:0}
.sll button:focus-visible,.sll .sll-view:focus-visible{outline:2px solid #28627b;outline-offset:2px}
.sll .sll-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 12px;margin:0 0 10px}
.sll .sll-switch{display:inline-flex;border:1px solid #c9d1d4;border-radius:3px;overflow:hidden}
.sll .sll-switch button{font-size:11.5px;line-height:1.3;padding:3px 9px;border:0;background:#fff;color:#4c5b5d}
.sll .sll-switch button+button{border-left:1px solid #c9d1d4}
.sll .sll-switch button:hover{background:#f2f5f6}
.sll .sll-switch button[aria-pressed="true"]{background:#222629;color:#fff}
.sll .sll-nav{display:inline-flex;align-items:center;gap:6px}
.sll .sll-nav button{width:24px;height:22px;padding:0;border:1px solid #c9d1d4;border-radius:3px;background:#fff;color:#222629;font-size:15px;line-height:19px}
.sll .sll-nav button:hover{border-color:#222629}
.sll .sll-count{min-width:52px;text-align:center;font-size:11.5px;color:#677179;font-variant-numeric:tabular-nums}
.sll .sll-view{outline:none;min-height:124px}
.sll .sll-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 8px;margin:0 0 6px;cursor:help}
.sll .sll-head b{font:600 13px/1.35 var(--sans,Arial,sans-serif);color:#222629}
.sll .sll-head span{font-size:11px;color:#8a9792}
.sll .sll-row{display:flex;align-items:flex-start;gap:18px}
.sll .sll-photos{display:grid;grid-template-columns:repeat(4,92px);gap:3px;flex:none}
.sll .sll-ph{position:relative;display:block;aspect-ratio:1;overflow:hidden;background:#eef1f2}
.sll .sll-ph img{display:block;width:100%;height:100%;object-fit:cover;margin:0;max-width:none;border:0;border-radius:0;box-shadow:none}
.sll .sll-ph i{position:absolute;width:14.2857%;height:14.2857%;border:1.5px solid rgba(226,48,34,.95);pointer-events:none}
.sll .sll-ph em{position:absolute;left:2px;bottom:2px;padding:0 3px;border-radius:2px;background:rgba(24,28,30,.72);color:#fff;font:9px/1.55 var(--sans,Arial,sans-serif);font-style:normal;white-space:nowrap}
.sll .sll-side{min-width:0}
.sll .sll-side-lab{font-size:10px;line-height:1.3;color:#8a9792;margin:0 0 4px;white-space:nowrap}
.sll .sll-parts{display:grid;grid-template-columns:repeat(4,56px) 12px;gap:3px;align-items:start}
.sll .sll-part{min-width:0}
.sll .sll-lab{display:block;height:14px;margin-top:2px;font-size:9.5px;line-height:14px;color:#8a9792;white-space:nowrap;font-variant-numeric:tabular-nums}
.sll .sll-lab b{font-weight:400}
.sll .pos{color:#277f79}.sll .neg{color:#a75e46}
.sll .sll-none{grid-column:1/-1;font-size:11px;line-height:1.4;color:#8a9792;padding-top:18px}
.sll .sll-more{align-self:start;margin-top:22px;font-size:11px;color:#8a9792;cursor:help}
#convnext-sae-residual.sll figcaption{font:12px/1.5 var(--sans,Arial,sans-serif);margin:12px 0 5px;color:#5e7069;max-width:none}
.sll .sll-stat{display:block;color:#3c4a4e}
#convnext-sae-residual.sll .sll-methods{font:11px/1.5 var(--sans,Arial,sans-serif)}
#convnext-sae-residual.sll summary{cursor:pointer;color:#537079}
#convnext-sae-residual.sll .sll-methods p{font:inherit;margin:10px 0;color:#657579}
#convnext-sae-residual.sll .sll-methods code{font:10.5px ui-monospace,SFMono-Regular,Menlo,monospace}
@media(max-width:650px){
  #convnext-sae-residual.sll{max-width:none;margin:22px 0 26px}
  .sll .sll-bar{gap:6px 6px}
  .sll .sll-switch button{font-size:11px;padding:3px 6px}
  .sll .sll-nav{gap:2px}
  .sll .sll-nav button{width:22px}
  .sll .sll-nav .sll-expand{margin-left:2px}
  .sll .sll-count{min-width:40px;font-size:11px}
  .sll .sll-view{min-height:240px}
  .sll .sll-row{flex-direction:column;gap:8px}
  .sll .sll-photos{grid-template-columns:repeat(4,minmax(0,1fr));width:100%}
  .sll .sll-parts{grid-template-columns:repeat(4,60px) 12px}
}
/* expand control + expanded view (dialog). The inline figure above is unchanged. */
.sll .sll-nav .sll-expand{margin-left:4px;border-color:transparent;color:#677179;display:inline-flex;align-items:center;justify-content:center}
.sll .sll-nav .sll-expand:hover{border-color:#c9d1d4;color:#222629}
.sll .sll-expand svg{display:block;width:12px;height:12px}
html.sll-lock{overflow:hidden}
.sll .sll-dlg{padding:0;border:0;border-radius:6px;width:min(1200px,calc(100vw - 48px));max-width:none;max-height:calc(100vh - 48px);overflow:auto;overscroll-behavior:contain;background:#fff;color:#222629;font:13px/1.5 var(--sans,Arial,sans-serif);box-shadow:0 18px 60px rgba(20,30,35,.28)}
.sll .sll-dlg::backdrop{background:rgba(22,28,31,.58)}
.sll .sll-dlg-in{padding:0 28px 28px}
.sll .sll-dlg-bar{position:sticky;top:0;z-index:2;display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;padding:18px 0 14px;background:#fff}
.sll .sll-dlg-bar .sll-nav{margin-left:auto}
.sll .sll-dlg .sll-switch button{font-size:12.5px;padding:4px 11px}
.sll .sll-dlg .sll-nav{gap:6px}
.sll .sll-dlg .sll-nav button{width:30px;height:28px;font-size:18px;line-height:25px}
.sll .sll-dlg .sll-count{min-width:62px;font-size:12.5px}
.sll .sll-dlg-close{width:30px;height:28px;padding:0;border:1px solid #c9d1d4;border-radius:3px;background:#fff;color:#222629;font-size:18px;line-height:25px}
.sll .sll-dlg-close:hover{border-color:#222629}
.sll .sll-big-top{display:flex;align-items:flex-start;gap:26px}
.sll .sll-big-photos{display:grid;grid-template-columns:repeat(4,minmax(0,200px));gap:8px 6px;flex:0 1 auto;min-width:0}
.sll .sll-bph{margin:0;min-width:0}
.sll .sll-bcap{display:block;margin:3px 0 0;font:11px/1.35 var(--sans,Arial,sans-serif);color:#677179;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.sll .sll-dlg .sll-ph i{border-width:2px}
.sll .sll-big-info{flex:1 1 240px;min-width:0}
.sll .sll-big-info h3{margin:0 0 3px;font:600 19px/1.3 var(--sans,Arial,sans-serif);color:#222629}
.sll .sll-dlg .sll-big-info .sll-big-sub{margin:0 0 12px;color:#677179;font:13px/1.45 var(--sans,Arial,sans-serif)}
.sll .sll-dlg .sll-big-info p{margin:0 0 10px;color:#3c4a4e;font:13px/1.55 var(--sans,Arial,sans-serif);max-width:none}
.sll .sll-big-lab{margin:18px 0 10px;padding-top:12px;border-top:1px solid #e3e8ea;font-size:12px;color:#677179}
.sll .sll-big-parts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px 22px}
.sll .sll-big-parts.one{grid-template-columns:minmax(0,600px)}
.sll .sll-bpart{min-width:0}
.sll .sll-bpart-h{margin:0 0 6px;font-size:13px;color:#222629}
.sll .sll-bpart-h b{font-weight:600}
.sll .sll-bpart-h .pos{margin-left:4px;font-variant-numeric:tabular-nums}
.sll .sll-side-w{color:#677179}
.sll .sll-bpart-g{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 4px}
.sll .sll-big-parts.one .sll-bpart-g{grid-template-columns:repeat(4,minmax(0,1fr))}
.sll .sll-bpart-d{margin-top:6px;font-size:11.5px;line-height:1.4;color:#677179}
.sll .sll-dlg .sll-big-note{color:#677179;margin:0;font:13px/1.5 var(--sans,Arial,sans-serif)}
/* the other side (expanded view only): a feature's opposite direction, a neuron's opposite pole; half-size thumbnails */
.sll .sll-big-left{flex:0 1 auto;min-width:0}
.sll .sll-big-opp{margin-top:14px}
.sll .sll-big-opp-h,.sll .sll-bneg-h{margin:0 0 4px;font-size:11.5px;line-height:1.35;color:#677179}
.sll .sll-opp-g{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px;width:0;min-width:100%}
.sll .sll-opp-g .sll-bcap,.sll .sll-bneg-g .sll-bcap{font-size:10px;line-height:1.3;white-space:normal;overflow-wrap:anywhere}
.sll .sll-bneg{margin-top:9px}
.sll .sll-bneg-g{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px 4px}
.sll .sll-big-parts.one .sll-bneg-g{grid-template-columns:repeat(8,minmax(0,1fr))}
@keyframes sll-in{from{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:none}}
@keyframes sll-out{from{opacity:1;transform:none}to{opacity:0;transform:translateY(6px) scale(.99)}}
@keyframes sll-fade-in{from{opacity:0}to{opacity:1}}
@keyframes sll-fade-out{from{opacity:1}to{opacity:0}}
.sll .sll-dlg[open]{animation:sll-in .17s ease-out}
.sll .sll-dlg[open]::backdrop{animation:sll-fade-in .17s ease-out}
.sll .sll-dlg.closing{animation:sll-out .12s ease-in forwards}
.sll .sll-dlg.closing::backdrop{animation:sll-fade-out .12s ease-in forwards}
@media(prefers-reduced-motion:reduce){.sll .sll-dlg,.sll .sll-dlg::backdrop,.sll .sll-dlg.closing,.sll .sll-dlg.closing::backdrop{animation:none!important}}
@media(max-width:900px){
  .sll .sll-big-top{flex-direction:column;gap:14px}
  .sll .sll-big-left{width:100%}
  .sll .sll-big-info{order:-1;flex:none}
  .sll .sll-big-photos{grid-template-columns:repeat(4,minmax(0,1fr));width:100%}
  .sll .sll-big-parts{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:650px){
  .sll .sll-dlg{width:100vw;height:100vh;height:100dvh;max-height:none;margin:0;inset:0;border-radius:0;box-shadow:none}
  .sll .sll-dlg-in{padding:0 16px 28px}
  .sll .sll-dlg-bar{padding:12px 0 10px;gap:8px;border-bottom:1px solid #e3e8ea;margin-bottom:14px}
  .sll .sll-dlg-bar .sll-switch{order:1}
  .sll .sll-dlg-close{order:2;margin-left:auto}
  .sll .sll-dlg-bar .sll-nav{order:3;margin-left:0;width:100%;justify-content:space-between}
  .sll .sll-dlg .sll-switch button{font-size:12px;padding:4px 9px}
  .sll .sll-big-photos{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sll .sll-big-info h3{font-size:17px}
  .sll .sll-big-parts,.sll .sll-big-parts.one{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 14px}
  .sll .sll-big-parts.one .sll-bpart{grid-column:1/-1}
  .sll .sll-big-parts.one .sll-bpart-g{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sll .sll-opp-g{grid-template-columns:repeat(4,minmax(0,1fr))}
  .sll .sll-bneg-g,.sll .sll-big-parts.one .sll-bneg-g{grid-template-columns:repeat(2,minmax(0,1fr))}
}
