.chapter-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,680px);gap:24px;align-items:start}
.chapter-toc{position:sticky;top:16px;padding:17px 19px;border:1px solid var(--edge);border-radius:12px;background:var(--paper)}
.chapter-toc h2{font-size:1rem}.chapter-toc ol{margin:0;padding-left:1.15em;font-size:.91rem}
.chapter-content{min-width:0}.chapter-content section:first-child{margin-top:0}
.chapter-content section[id]{scroll-margin-top:14px}
.chapter-formula{margin:1em 0;padding:.95em 1.1em;border-left:4px solid var(--green);background:#e8efe6;border-radius:0 8px 8px 0}
.chapter-formula p{margin:.3em 0}.chapter-formula strong{display:block}
.chapter-content figure img{margin:0 auto}.chapter-answer{margin:.8rem 0 1.25rem;padding:.65rem .85rem;border:1px solid var(--edge);border-radius:8px;background:#edf2e9}
.chapter-answer summary{font-weight:700;cursor:pointer;color:var(--green)}
.chapter-answer summary:focus-visible{outline:2px solid #946522;outline-offset:4px}
.chapter-answer[open] summary{margin-bottom:.55rem}.chapter-answer p:last-child{margin-bottom:0}
@media(max-width:760px){.chapter-layout{grid-template-columns:minmax(0,1fr);gap:15px}.chapter-toc{position:static}.chapter-toc ol{columns:2;column-gap:25px}}
@media(max-width:460px){.chapter-toc ol{columns:1}}
@media print{.chapter-layout{display:block}.chapter-toc{position:static}.chapter-answer{break-inside:avoid}}

.library-article .chapter-toc{width:100%;margin:0;align-self:start}
.chapter-pager{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;margin-top:20px;padding:14px 0;border-top:1px solid var(--edge)}
.chapter-pager a{max-width:45%;font-weight:650}
.chapter-pager a:last-child:not(:first-child){margin-left:auto;text-align:right}
@media(max-width:540px){.chapter-pager{display:grid}.chapter-pager a{max-width:none}.chapter-pager a:last-child:not(:first-child){margin-left:0;text-align:left}}
@media print{.chapter-pager{display:none}}

.chapter-interval{margin:15px 9px 8px}
.chapter-interval-track{height:22px;position:relative;border-bottom:2px solid #64796d}
.chapter-interval-range,.chapter-interval-zero,.chapter-interval-estimate{position:absolute;display:block}
.chapter-interval-range{left:17.667%;width:64.667%;top:5px;height:9px;border-radius:8px;background:#80aa86}
.chapter-interval-zero{left:33.333%;top:0;height:21px;border-left:2px dashed #2b463a}
.chapter-interval-estimate{left:50%;top:2px;width:15px;height:15px;transform:translateX(-50%);border-radius:50%;background:#1a4336;border:2px solid #fcfbf7}
.chapter-interval-axis{display:flex;justify-content:space-between;font-variant-numeric:tabular-nums}
