/* Book-specific structure; shared reader typography remains authoritative. */
.room-content,.cnx-section{min-width:0}
.room-content .en .term{display:inline;margin:0}
.room-content .en .term::before{content:none}
.room-content>h2:first-child{margin-top:0}
.section-anchor{display:block;scroll-margin-top:76px}
.cnx-definition,.cnx-rule,.cnx-theorem,.cnx-example,.cnx-note{border:1px solid var(--rule);padding:1.05em;margin:1.5em 0;min-width:0}
.cnx-definition>h3:first-child,.cnx-theorem>h3:first-child,.cnx-example>h3:first-child,.cnx-note>h3:first-child{margin-top:0}
.cnx-example .cnx-problem,.cnx-example .cnx-solution{margin:1em 0}
.cnx-example .pair:last-child,.cnx-note .pair:last-child{margin-bottom:0}
.cnx-example .cnx-example{border:0;padding:0}
.cnx-exercise+.cnx-exercise{margin-top:1.5em;padding-top:1.2em;border-top:1px solid var(--rule)}
.exercise-number,.example-number,.checkpoint-number{font-family:var(--en);font-weight:600;display:block;margin:1em 0 .5em}
.source-number,.solution-label{display:flex;flex-wrap:wrap;gap:.5em 1em;font-size:.94em;line-height:1.7;font-weight:600;margin:.5em 0 .8em}
.source-number>.en,.solution-label>.en{font-family:var(--en)}
.source-number>.ja,.solution-label>.ja{font-family:var(--jp)}
.solution-label{margin-top:1.5em}
.bodyfold{margin:1.5em 0;border-top:1px solid var(--rule);border-bottom:1px solid var(--rule);min-width:0}
.bodyfold>summary{display:block;list-style:none;position:relative;cursor:pointer;padding:.85em .55em .85em 1.8em;font-family:var(--jp);font-size:1em;font-weight:500;line-height:1.65;color:var(--ink)}
.bodyfold>summary::-webkit-details-marker{display:none}
.bodyfold>summary::before{content:'▸';position:absolute;left:.45em;top:.85em}
.bodyfold[open]>summary::before{content:'▾'}
.bodyfold>summary .en,.bodyfold>summary .ja{display:block}
.bodyfold>summary .en{font:500 .94em/1.65 var(--en)}
.bodyfold>summary .ja{margin-top:.2em}
.bodyfold>summary:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.bodyfold-content{padding:.25em .65em 1em;min-width:0}
.bodyfold-content>.pair:first-child{margin-top:.5em}
.bodyfold .cnx-exercise-group{margin:0}
.cnx-note.try .try-solution{margin:1em 0 0}
.room-content img{max-width:100%;width:min(100%,var(--image-width,640px));height:auto;object-fit:contain}
.room-content h4,.room-content h5,.room-content h6{margin:calc(1.7*var(--u)) 0 var(--u);line-height:1.6}
.room-content h4>.en,.room-content h5>.en,.room-content h6>.en{display:block;font:700 15px/1.6 var(--hd);color:var(--ink)}
.room-content h4>.ja,.room-content h5>.ja,.room-content h6>.ja{display:block;font-size:18px;line-height:1.6;margin-top:2px}
.cnx-figure{width:auto;max-width:100%;margin:1.8em auto;--fw:44em;--mw:710px}
.cnx-figure img{display:block;max-width:100%;width:min(100%,var(--image-width,640px));max-height:520px;height:auto;object-fit:contain;margin:0 auto .8em}
.cnx-subfigure{margin:1em 0;max-width:100%}
.figure-number{font-weight:600}
.image-source{font:13px/1.65 var(--jp);color:var(--sub);overflow-wrap:anywhere;margin:.5em 0}
.figure-omission{border:1px solid var(--rule);padding:1em;line-height:1.8}
.figure-omission>.en,.figure-omission>.ja{display:block}
.figure-omission>.ja{margin-top:.6em}
.rights-omission{margin:1em 0;line-height:1.8}
.rights-omission>.en,.rights-omission>.ja{display:block}
.rights-omission>.ja{margin-top:.65em}
.table-scroll{overflow-x:auto;max-width:100%;margin:1.5em 0;overscroll-behavior-x:contain}
.table-scroll table{border-collapse:collapse;width:100%;margin:.25em 0}
.table-scroll td,.table-scroll th{border:1px solid var(--rule);padding:.65em;vertical-align:top;min-width:3em}
.table-scroll .pair{margin:0}
.table-scroll .pair>.en,.table-scroll .pair>.ja{font-size:1em}
.table-value{font-family:var(--en);line-height:1.65}
.language-shared{font-family:var(--en);line-height:1.85;margin:.8em 0;max-width:100%;overflow-x:auto}
.equation-pair>.en,.equation-pair>.ja,.equation-shared{overflow-x:auto;max-width:100%;overscroll-behavior-x:contain}
.equation-shared{margin:1.2em 0;padding:.4em 0;font-family:var(--en)}
.equation-number{display:inline-block;margin-left:1em;font-family:var(--en);white-space:nowrap}
.room-content math{max-width:none}
.room-content ul>li,.room-content ol>li{margin-top:.85em}
.room-content ul>li:first-child,.room-content ol>li:first-child{margin-top:0}
.room-content>ul,.room-content>ol{padding-left:1.5em}
.room-content li>ol,.room-content li>ul{margin-top:.85em}
.room-content ol[type=a]>li,.room-content ol[type=A]>li{padding-left:.4em;margin-top:1em}
.room-content blockquote{margin:1.5em 0;padding-left:1em;border-left:2px solid var(--rule)}
.reference-pair,.license-text{overflow-wrap:anywhere}
.license-text{white-space:pre-wrap;font:14px/1.7 var(--en);border-top:1px solid var(--rule);padding-top:1.5em}
.cnx-media-link{display:block;padding:.7em;border:1px solid var(--rule);margin:1em 0}
.contents .toc-rooms{list-style:none;margin:3px 0 12px;padding-left:14px;border-left:1px solid var(--rule)}
.contents .sub a{overflow-wrap:anywhere}
.term-index .index-jumps{display:flex;flex-wrap:wrap;gap:.7em;margin:1.5em 0}
.term-index section{scroll-margin-top:5em}
.term-index section ul{list-style:none;padding:0}
.term-index section li{padding:.7em 0;border-bottom:1px solid var(--rule)}
.term-index section a,.term-index section .en,.term-index section .ja{display:block}
.term-index section .ja{margin-top:.3em}
@media(max-width:760px){
 .cnx-definition,.cnx-rule,.cnx-theorem,.cnx-example,.cnx-note{padding:.8em}
 .cnx-figure img{max-height:360px}
 .bodyfold-content{padding-left:.35em;padding-right:.35em}
 .table-scroll td,.table-scroll th{padding:.5em}
}
@media print{.bodyfold{break-inside:avoid}}
