/* Lean proofs page: numbered code that scrolls inside its own box, so long lines never widen the page. */
.lcode{background:#14263b;color:#e2edf6;border-radius:8px;padding:8px 0;overflow-x:auto;max-width:100%;font-size:.8rem;line-height:1.55;max-height:70vh;overflow-y:auto}
.lcode:focus-visible{outline:3px solid #7fd1d1;outline-offset:2px}
.ll{display:flex;min-width:max-content}.ln{flex:0 0 3.2em;text-align:right;padding-right:1em;color:#7f93a8;user-select:none}.ll code{background:none;color:inherit;white-space:pre;overflow-wrap:normal;padding:0;font-size:inherit}
.proofeq{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:12px;margin:10px 0}.proofeq .eq-math{overflow-x:auto;max-width:100%}
.prooffigure{margin:16px 0}.prooffigure img{display:block;width:100%;max-width:980px;height:auto;margin:auto;border:1px solid var(--line);border-radius:8px}.prooffigure figcaption{margin-top:6px}.proofcontexts{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:10px}.proofcontexts>.panel{margin:0;min-width:0}.proofcontexts h4{margin-top:0}.proofcontexts code{overflow-wrap:anywhere}.proofchecks{overflow-wrap:anywhere}
.proofthms details,.proofneg details,.proofsrc{margin:6px 0}.proofthms summary,.proofneg summary,.proofsrc summary{cursor:pointer}
.proofneg{list-style:none;padding:0;margin:0}.proofindex{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:6px}
.prooffiles li{margin:.3em 0}
.pillrow{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:6px}.pillrow .pill{white-space:normal}
.proofeq>.eqcard{min-width:0}.proofeq .eq-math{display:block;min-width:0;overflow-x:auto}
.proofeq .eq-math{position:relative}
.proofthms summary,.proofneg summary,.proofsrc summary{overflow-wrap:anywhere}
/* Readability: plain-language intro, folded detail, card index. */
.proofs-head .lede{max-width:72ch}
.proof-how{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:12px;margin:0 0 16px}.proof-how>div{background:var(--paper);border:1px solid var(--line);border-radius:10px;padding:14px 16px}.proof-how p{margin:6px 0 0;color:var(--dim)}
.proof-scope{margin-bottom:16px}.proof-scope p{max-width:80ch}
.proofindex-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:12px;margin:0 0 24px}
.proofindex-cards a{display:flex;flex-direction:column;gap:8px;padding:14px 16px;background:var(--paper);border:1px solid var(--line);border-radius:10px;text-decoration:none;color:var(--ink);align-items:flex-start}.proofindex-cards a:hover{border-color:var(--teal)}.proofindex-cards .small{color:var(--dim);line-height:1.5}
.proof{scroll-margin-top:16px}.proof-sum{font-size:1.04rem;max-width:80ch}.proof-plain{background:#eef4ea;border-left:3px solid var(--teal);padding:10px 14px;border-radius:0 8px 8px 0;max-width:80ch;line-height:1.6}.proof-plain .eyebrow{display:block;margin-bottom:2px}
.proof-badges{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}
.proof-cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:4px 28px}
.pfold{border-top:1px solid var(--line);margin:0}.pfold>summary{cursor:pointer;padding:12px 2px;list-style:none;display:flex;gap:10px;align-items:baseline}.pfold>summary::before{content:"▸";color:var(--teal-d);transition:transform .15s}.pfold[open]>summary::before{transform:rotate(90deg)}.pfold>summary::-webkit-details-marker{display:none}
.pfold>summary:focus-visible{outline:3px solid #7fd1d1;outline-offset:2px}.pfold-body{padding:2px 0 16px}
@media (prefers-reduced-motion:reduce){.pfold>summary::before{transition:none}}
