/* ── INUS LABS — paper register (article pages) ──
   The half-life-of-an-ai-claim design generalized to every article:
   white paper, Charter serif, fixed left TOC with active tracking,
   crimson progress bar and accents, blue links, sans meta and captions,
   light bordered boxes for code and notes. */

:root{
  --paper:#ffffff; --ink:#1b1b1d; --muted:#71717a; --crimson:#a3241c;
  --crimson-soft:#f6e9e8; --link:#2244aa; --rule:#e8e8ea; --toc-w:250px;
  --sans:ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;
  --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --serif:Charter,'Bitstream Charter','Sitka Text',Cambria,Georgia,serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
@media (prefers-reduced-motion: reduce){ html{scroll-behavior:auto} }
body{
  margin:0; background:var(--paper); color:var(--ink);
  font-family:var(--serif); font-size:17px; line-height:1.62;
}
a{color:var(--link); text-decoration:none}
a:hover{text-decoration:underline}
a:focus-visible, button:focus-visible{outline:2px solid var(--crimson); outline-offset:2px}
.skip-link{position:absolute; left:-9999px; top:0; background:var(--ink); color:#fff;
  padding:.5rem .9rem; z-index:80; font-family:var(--sans); font-size:.85rem}
.skip-link:focus{left:0}

/* progress bar (site.js drives #progress > span width) */
#progress{position:fixed; top:0; left:0; right:0; height:3px; z-index:60; pointer-events:none}
#progress span{display:block; height:100%; width:0; background:var(--crimson)}

/* the old top nav is replaced by the TOC sidebar (paper.js) */
.nav{display:none}

/* layout — content column beside the fixed TOC */
main{width:min(700px, calc(100% - var(--toc-w)));
  padding:3.2rem 1.4rem 5rem;
  margin-left:max(var(--toc-w), calc((100vw - 700px)/2)); margin-right:0}

/* sidebar TOC (generated by paper.js) */
nav.toc{
  position:fixed; top:0; left:0; width:var(--toc-w); height:100vh; height:100dvh; overflow-y:auto;
  padding:2.2rem 1.4rem 2rem 1.6rem; border-right:1px solid var(--rule);
  font-family:var(--sans); font-size:.82rem; background:var(--paper); z-index:50;
}
.toc .toc-title{display:block; margin:0 0 .9rem; font-size:.8rem; line-height:1.35;
  letter-spacing:.025em; color:var(--ink); font-weight:650}
.toc ol{list-style:none; margin:0 0 1.4rem; padding:0}
.toc li{margin:0}
.toc a.sec{display:block; padding:.28rem .5rem; border-left:2px solid transparent;
  color:var(--ink); border-radius:0 4px 4px 0}
.toc a.sec small{color:var(--muted); font-variant-numeric:tabular-nums; margin-right:.35em}
.toc a.sec.sub{padding-left:1.35rem; color:var(--muted); font-size:.76rem}
.toc a.sec:hover{background:#f6f6f7; text-decoration:none}
.toc a.sec.active{border-left-color:var(--crimson); background:var(--crimson-soft);
  color:var(--crimson); font-weight:600}
.toc .toc-foot{border-top:1px solid var(--rule); padding-top:1rem; margin-top:.4rem}
.toc .toc-foot a{color:var(--muted); display:block; margin-bottom:.4rem}
#tocbtn{
  display:none; position:fixed; bottom:1.1rem; left:1.1rem; z-index:70; align-items:center; gap:.45rem;
  background:var(--ink); color:#fff; border:0; border-radius:999px; padding:.6rem 1rem;
  font-family:var(--sans); font-size:.85rem; cursor:pointer;
}
@media (max-width:900px){
  nav.toc{transform:translateX(-102%); transition:transform .25s ease;
    box-shadow:8px 0 30px rgba(0,0,0,.06); visibility:hidden}
  nav.toc.open{transform:none; visibility:visible}
  main{margin-left:auto; margin-right:auto; width:100%}
  #tocbtn{display:flex}
}

/* article header — LaTeX titleblock */
.article-header{text-align:center; margin:1rem 0 2.6rem}
.article-back{display:inline-flex; align-items:center; gap:.35rem; float:left;
  font-family:var(--sans); font-size:.82rem; color:var(--muted)}
.article-back svg{width:14px; height:14px}
.article-title{font-family:var(--serif); font-weight:400; font-size:1.9rem; line-height:1.3;
  margin:2rem 0 1.1rem; clear:both}
.article-date{font-family:var(--serif); font-size:1rem; color:var(--ink); margin:.2rem 0 0}
.article-authors{font-family:var(--serif); font-size:1.05rem; margin:.4rem 0 0}
.article-authors a{color:var(--ink)}
.article-authors a:hover{color:var(--link)}
.article-correspondence{font-family:var(--sans); font-size:.82rem; color:var(--muted); margin:.6rem 0 0}

/* TL;DR — abstract block */
.box.tldr{margin:2.2rem auto 2.6rem; max-width:560px; font-size:.92rem; line-height:1.6;
  background:none; border:0; padding:0}
.box.tldr .label, .box.tldr > .label{display:block; text-align:center; font-family:var(--serif);
  font-size:.95rem; margin-bottom:.5rem; font-weight:700; letter-spacing:0; color:var(--ink);
  text-transform:none}
.box.tldr ul{margin:.4rem 0 0; padding-left:1.3em}
.box.tldr li{margin-bottom:.45em}

/* outline box replaced by the sidebar TOC */
.box.outline{display:none}

/* other boxes (authorship notes, callouts) — quiet bordered plates */
.box{background:#fafafa; border:1px solid var(--rule); border-radius:8px;
  padding:.9rem 1.1rem; margin:1.6rem 0; font-size:.95rem}
.box .label{font-family:var(--sans); font-size:.72rem; font-weight:700; letter-spacing:.08em;
  text-transform:uppercase; color:var(--crimson); margin-bottom:.35rem}

/* headings — numbered-section look */
main h2{font-family:var(--serif); font-weight:700; font-size:1.35rem; margin:3rem 0 1rem;
  scroll-margin-top:2.5rem; line-height:1.35}
main h3{font-family:var(--serif); font-weight:700; font-size:1.12rem; margin:2.2rem 0 .8rem;
  scroll-margin-top:2.5rem}
main h4{font-family:var(--serif); font-weight:700; font-size:1rem; margin:1.8rem 0 .6rem}
main p{margin:0 0 1.05em}
main ul, main ol{margin:0 0 1.05em; padding-left:1.6em}
main li{margin-bottom:.35em}
main blockquote{margin:1.2em 2em; font-style:italic}
main hr{border:0; border-top:1px solid var(--rule); margin:2.2em 0}
main strong{font-weight:700}

/* code — light printed listings */
main pre{background:#fafafa; border:1px solid var(--rule); border-radius:8px;
  padding:.9rem 1.1rem; overflow-x:auto; margin:1.4em 0; line-height:1.5}
main pre code{background:none; border:0; padding:0; font-family:var(--mono);
  font-size:.78rem; color:var(--ink)}
main code{font-family:var(--mono); font-size:.82em; background:#f2f1ef;
  border-radius:4px; padding:.08em .32em; color:var(--ink)}

/* tables */
main table{border-collapse:collapse; width:100%; margin:1.4em 0; font-size:.9rem;
  font-family:var(--sans)}
main th, main td{border-bottom:1px solid var(--rule); padding:.5rem .6rem;
  text-align:left; vertical-align:top}
main th{font-weight:650; border-bottom:1px solid #c9c9cd}
.tablewrap{overflow-x:auto; margin:1.4em 0; -webkit-overflow-scrolling:touch}
.tablewrap table{margin:0}

/* figures */
main figure{margin:2.1em 0; padding:0}
main figure img, main .fig img{display:block; width:100%; max-width:660px; height:auto; margin:0 auto}
main figure figcaption, main .fig-caption, main figcaption{font-family:var(--sans);
  font-size:.8rem; line-height:1.55; color:var(--muted); margin:.7rem auto 0; max-width:640px}
main figure figcaption b{color:var(--ink); font-weight:650}
main img{max-width:100%; height:auto}

/* footer — quiet paper colophon (was the dark panel) */
.footer{background:var(--paper); color:var(--muted); border-top:1px solid var(--rule);
  margin-top:3.5rem; font-family:var(--sans); font-size:.85rem}
.footer a{color:var(--muted)}
.footer a:hover{color:var(--ink)}
.footer-cta{display:none}
.footer-inner{max-width:700px; margin:0 auto; padding:1.6rem 1.4rem 2.2rem;
  display:flex; flex-wrap:wrap; align-items:center; gap:.9rem 1.4rem}
.footer-logo img{height:16px; width:auto; display:block; filter:brightness(0); opacity:.75}
.footer-socials{display:flex; gap:.9rem}
.footer-socials a{font-size:.95rem}
.footer-links{display:flex; gap:.9rem}
.footer-copy{margin-left:auto; font-size:.78rem}
@media (max-width:900px){ .footer-inner{max-width:100%} .footer-copy{margin-left:0} }

/* back-to-top (site.js) */
#scrollToTop{position:fixed; bottom:1.1rem; right:1.1rem; z-index:70; background:var(--paper);
  color:var(--muted); border:1px solid var(--rule); border-radius:8px; width:38px; height:38px;
  cursor:pointer; font-size:1rem}
#scrollToTop:hover{color:var(--ink)}
