/* Reading page framing: site-dark chrome + light "paper surface" for the article. */
.paper-hero h1{line-height:1.15}
.paper-authors{color:#dce7f7;font-weight:600;margin-top:.6rem;font-size:1.05rem}
.paper-authors sup{color:#8fc0ff;font-weight:700;font-size:.66em}
.paper-note{color:var(--muted);font-size:.88rem;margin-top:.4rem}
.paper-venue{color:var(--muted);margin-top:.5rem}
.paper-venue .badge{margin-right:.5rem}
.paper-actions{margin-top:1.15rem;gap:.6rem;flex-wrap:wrap}
.pill-primary{background:linear-gradient(135deg,rgba(112,180,255,.30),rgba(34,197,94,.20))!important;border-color:rgba(112,180,255,.45)!important;color:#fff!important;font-weight:800}
.paper-actions .pill i{margin-right:.4rem}

/* Wide 3-zone reading layout: [ left footnotes ] [ paper ] [ right TOC ] (arXiv-like). */
.reading-section{padding-top:1rem}
/* hero/cite/related share the paper's outer width so left edges align down the page */
.reading-container{width:min(calc(100% - 2rem),62rem);margin-inline:auto}

/* Light/dark reading theme: the paper surface follows the site theme. */
html[data-theme="dark"] .paper-surface{background:#0f1319;color:#dbe3ee;border-color:rgba(255,255,255,.10);--background-color:#0f1319;--text-color:#dbe3ee;--image-background-color:#fff}
html[data-theme="dark"] .paper-surface a{color:#8fc0ff}
html[data-theme="dark"] .paper-surface .ltx_title,html[data-theme="dark"] .paper-surface .ltx_title_section,html[data-theme="dark"] .paper-surface h1,html[data-theme="dark"] .paper-surface h2,html[data-theme="dark"] .paper-surface h3,html[data-theme="dark"] .paper-surface h4{color:#eef4ff}
html[data-theme="dark"] .paper-surface img{background:#fff;padding:3px;border-radius:5px}
.reading-shell{
  display:grid;
  grid-template-columns:minmax(0,13rem) minmax(0,60rem) minmax(0,14rem);
  justify-content:center;
  gap:1.7rem;
  width:min(calc(100% - 2rem),1720px);
  margin:0 auto;
  align-items:start;
}
.paper-col{min-width:0}
.paper-margin{position:relative}

/* right-hand table of contents */
.paper-toc{position:sticky;top:5.2rem;max-height:calc(100vh - 6.5rem);overflow-y:auto;align-self:start}
.toc-inner{border-left:2px solid rgba(255,255,255,.12);padding-left:1rem}
.toc-head{margin:0 0 .55rem;font-weight:800;letter-spacing:.07em;text-transform:uppercase;font-size:.72rem;color:var(--muted)}
#toc-nav{display:flex;flex-direction:column;gap:.1rem}
.toc-link{color:#a9b8cf;text-decoration:none;font-size:.88rem;line-height:1.3;padding:.28rem .5rem;border-radius:8px;border-left:2px solid transparent;margin-left:-1rem;padding-left:calc(1rem - 2px);transition:color .15s,background .15s,border-color .15s}
.toc-link:hover{color:#eaf1ff;background:rgba(255,255,255,.05);text-decoration:none}
.toc-link.active{color:#8fc0ff;border-left-color:#8fc0ff;background:rgba(112,180,255,.08)}
.toc-link.toc-l2{padding-left:calc(1rem - 2px + .95rem);font-size:.82rem;color:#93a4bd}
.toc-link.toc-l3{padding-left:calc(1rem - 2px + 1.9rem);font-size:.8rem;color:#8496af}
.toc-link.toc-app{color:#8fa0ba}
.toc-link.toc-abs{font-style:italic}

/* left-margin footnotes (sidenotes) */
.paper-margin .sidenote{position:absolute;left:0;width:100%;font-size:.78rem;line-height:1.45;color:#cdd7e6;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.10);border-radius:10px;padding:.5rem .7rem}
.paper-margin .sidenote-num{color:#8fc0ff;font-weight:700;margin-right:.35rem}

@media (max-width:1180px){
  .reading-shell{grid-template-columns:minmax(0,1fr);width:min(calc(100% - 2rem),1000px)}
  .paper-toc,.paper-margin{display:none}
}

/* The paper itself: a light, high-legibility reading surface inside the dark site. */
.paper-surface{
  height:auto!important;width:auto!important;margin:0;
  background:#fdfdfb;color:#14181f;
  border:1px solid rgba(0,0,0,.08);border-radius:16px;
  box-shadow:0 24px 60px rgba(0,0,0,.35);
  padding:clamp(1.2rem,3.5vw,3.2rem);
  overflow-x:auto;
}
.paper-surface .ltx_document{max-width:100%;margin:0 auto;font-size:1.02rem}
.paper-surface a{color:#0b5cad}
.paper-surface .ltx_title_section{color:#0e1420}
.paper-surface img{max-width:100%;height:auto;background:#fff}
.paper-surface .ltx_graphics,.paper-surface svg.ltx_picture{max-width:100%}
/* footnotes are relocated to the left margin; hide ar5iv's native margin/float rendering (keep inline marker) */
.paper-surface .ltx_note.ltx_role_footnote>.ltx_note_outer{display:none!important}
.paper-surface .ltx_tabular{max-width:100%}
.paper-surface table,.paper-surface .ltx_tabular{overflow-x:auto;display:block}
/* keep very wide math from breaking the layout */
.paper-surface mjx-container{max-width:100%}
.paper-surface mjx-container[display="true"]{overflow-x:auto;overflow-y:hidden}

/* Cite box */
.cite-box{background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.12);border-radius:16px;padding:1.4rem 1.5rem;max-width:60rem}
.cite-box h2{margin-top:0}
.cite-published{color:var(--muted);line-height:1.6}
.cite-published a{color:#8fc0ff}
.bibtex-head{display:flex;justify-content:space-between;align-items:center;margin:1rem 0 .5rem}
.bibtex-head span{font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;font-size:.82rem}
#bibtex{background:#0b1220;border:1px solid rgba(255,255,255,.10);border-radius:12px;padding:1rem;overflow-x:auto;margin:0}
#bibtex code{color:#d7e6ff;font-size:.86rem;line-height:1.55;white-space:pre}

/* Related work */
.related-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,360px));gap:1rem;margin-top:1.1rem}
.related-card{display:flex;flex-direction:column;gap:.4rem;padding:1.1rem;border-radius:16px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.12);text-decoration:none;transition:transform .18s ease,border-color .18s ease}
.related-card:hover{transform:translateY(-3px);border-color:rgba(112,180,255,.4);text-decoration:none}
.related-title{color:#f2f7ff;font-weight:700;line-height:1.3}
.related-meta{color:var(--muted);font-size:.9rem}

@media (max-width:720px){ .paper-surface{padding:1rem;border-radius:12px} }
