.book-index { max-width: 960px; padding-top: 44px; }
.book-index__head { margin-bottom: 32px; }
.book-index__head h2 { font: 500 clamp(28px,3vw,38px)/1.2 var(--serif,Georgia,serif); letter-spacing: -.025em; margin: 9px 0 14px; }
.book-index__head>p:last-child,.book-path-note { color: var(--ink-3); font-size: 14px; line-height: 1.6; }
.book-switch { display: inline-flex; background: var(--surface-2); border: 1px solid var(--rule); border-radius: 9px; padding: 3px; gap: 3px; }
.book-switch button { min-height: 40px; padding: 8px 17px; border-radius: 6px; font-weight: 500; color: var(--ink-3); }
.book-switch [aria-pressed=true] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px #0000000c; }
.book-path-note { margin: 15px 0 28px; }
.book-index__list { border-top: 1px solid var(--rule-2); }
.book-index__row { display: flex; align-items: center; gap: 22px; padding: 26px 4px; border-bottom: 1px solid var(--rule); color: inherit; text-decoration: none; }
.book-index__row:hover h3 { color: var(--blue); }
.book-index__row h3 { font: 500 24px/1.3 var(--serif,Georgia,serif); margin: 3px 0 9px; }
.book-index__row p { color: var(--ink-3); font-size: 14px; line-height: 1.6; }
.book-index__row .book-index__category { font-size: 11px; letter-spacing: .04em; }
.book-index__number { font: 400 22px var(--serif,Georgia,serif); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.book-index__chevron { margin-left: auto; color: var(--ink-3); font-size: 25px; }
.book-reader { display: grid; grid-template-columns: 200px minmax(0,800px); gap: clamp(24px,4vw,60px); max-width: 1140px; margin: 0 auto; padding: 38px 32px 100px; align-items: start; }
.book-toc { position: sticky; top: 30px; display: flex; flex-direction: column; gap: 3px; }
.book-back { font-size: 13px; color: var(--blue); text-decoration: none; margin-bottom: 32px; display: inline-block; }
.book-toc>.label { margin-bottom: 12px; }
.book-toc button { text-align: left; color: var(--ink-3); line-height: 1.5; font-size: 13px; padding: 9px 12px; border-left: 2px solid transparent; }
.book-toc [aria-current=location] { color: var(--blue); border-left-color: var(--blue); }
.book-toc .book-toc__sources { margin-top: 20px; }
.book-reader__main { min-width: 0; }
.book-reader__head { padding-bottom: 28px; border-bottom: 1px solid var(--rule); margin-bottom: 38px; }
.book-reader__head h1 { font: 500 clamp(30px,3.8vw,44px)/1.16 var(--serif,Georgia,serif); letter-spacing: -.025em; margin: 9px 0 20px; text-wrap: balance; }
.book-reader__head>p:not(.label) { max-width: 640px; color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.book-reader__head p.book-edition { color: var(--ink-3); font-size: 11px; margin-top: 17px; }
.book-version-note { border-left: 2px solid var(--blue); padding-left: 12px; margin-top: 16px; }
.book-section { margin-bottom: 54px; }
.book-section + .book-section { padding-top: 32px; border-top: 1px solid var(--rule); }
.book-document { font: calc(18px * var(--prose-scale,1))/1.65 var(--serif,Georgia,serif); color: var(--ink); }
.book-document h2,.book-end h2 { font: 600 23px/1.35 var(--sans,system-ui,sans-serif); letter-spacing: -.02em; margin: 0 0 22px; color: var(--blue); text-wrap: balance; }
.book-block { position: relative; margin: 0 0 22px; }
.book-block--material { margin: 30px 0; }
.book-block h3 { font: 600 16px/1.4 var(--sans,system-ui,sans-serif); margin: 28px 0 10px; letter-spacing: -.01em; }
.book-document strong { font-weight: 700; }
.book-block>p { margin: 0; }
.book-block ul { padding-left: 22px; list-style: disc; }
.book-block ul li { margin-bottom: 10px; }
.book-block__actions { display: flex; justify-content: flex-end; align-items: center; gap: 16px; font: 12px/1.4 var(--sans,system-ui,sans-serif); margin-top: 6px; }
.book-sources { color: var(--ink-3); min-height: 32px; text-decoration: none; }
.book-sources:hover { color: var(--blue); }
.book-flow { margin: 8px 0 0; font: 14px/1.6 var(--sans,system-ui,sans-serif); }
.book-flow>figcaption { font-weight: 600; font-size: 16px; margin-bottom: 18px; }
.book-flow__lanes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px; }
.book-flow__lane { border-top: 2px solid var(--blue); padding: 18px; background: var(--blue-tint); border-radius: 6px 6px 0 0; }
.book-flow__lane h4 { font-size: 17px; line-height: 1.4; font-weight: 600; }
.book-flow__lane p { margin-top: 12px; }
.book-flow__arrow { display: block; color: var(--blue); font-size: 27px; margin: 12px 0; }
.book-flow__test { color: var(--blue); }
.book-flow__purpose { font-weight: 500; }
.book-flow__caption { margin-top: 24px; color: var(--ink-2); font-size: 13px; }
.book-references { padding-left: 20px; font: 13px/1.6 var(--sans,system-ui,sans-serif); }
.book-references li { padding-left: 5px; margin-bottom: 14px; }
.book-references a { color: var(--blue); text-decoration: none; }
.book-references a:hover { text-decoration: underline; }
.book-references p { color: var(--ink-3); margin-top: 3px; }
.book-end { border-top: 1px solid var(--rule); padding-top: 30px; }
.book-question-link { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 16px 0; font: 13px/1.5 var(--sans,system-ui,sans-serif); }
.book-question-link>span { color: var(--ink-3); }
.book-question-link>button { color: var(--blue); text-align: right; min-height: 44px; }
.book-section-select,.book-back--mobile { display: none; }
.book-reading-references { font: 13px/1.5 var(--sans,system-ui,sans-serif); margin-top: 25px; }
.book-reading-references summary { color: var(--blue); cursor: pointer; min-height: 44px; }
@media(max-width:1100px) { .book-reader { grid-template-columns: 160px minmax(0,1fr); gap: 28px; padding: 32px 24px 80px; } }
@media(max-width:850px) {
  .book-reader { display: block; padding: 24px 24px 70px; }
  .book-toc { display: none; }
  .book-back--mobile { display: inline-block; margin-bottom: 22px; }
  .book-section-select { display: block; width: 100%; margin-bottom: 30px; min-height: 44px; border: 1px solid var(--rule); border-radius: 7px; padding: 9px 12px; color: var(--ink-2); background: var(--surface); font: 14px var(--sans,system-ui,sans-serif); }
}
@media(max-width:560px) {
  .book-index { padding-top: 28px; }
  .book-index__row { gap: 16px; padding: 23px 0; }
  .book-index__row h3 { font-size: 22px; }
  .book-document { font-size: calc(17px * var(--prose-scale,1)); }
  .book-flow__lanes { grid-template-columns: 1fr; gap: 28px; }
  .book-block__actions { gap: 18px; }
  .book-sources { min-height: 44px; }
}
@media print {
  html,body,.app,.main,.view { height: auto!important; overflow: visible!important; display: block!important; background: white!important; color: #111!important; }
  .rail,.topbar,.app>aside.panel,.note-panel,.notepanel,.book-toc,.book-block__actions,.book-section-select,.book-back,#modal,#toasts,#selPop { display: none!important; }
  .book-reader { display: block; padding: 0; max-width: none; }
  .book-document { font-size: 10.5pt; line-height: 1.5; }
  .book-reader__head h1 { font-size: 26pt; }
  .book-section { margin-bottom: 24pt; }
  .book-block { margin-bottom: 14pt; }
  .book-document h2,.book-end h2 { break-after: avoid; font-size: 15pt; }
  .book-end { break-inside: avoid; }
  .book-document .xtab table { font-size: 9pt; }
  .book-document .xtab tr { break-inside: avoid; }
  .book-flow { break-inside: avoid; }
  .book-reader__head { margin-bottom: 24pt; }
  @page { margin: 18mm; size: A4; }
}
.book-source-details { position: relative; }
.book-source-details summary { cursor: pointer; list-style: none; display: flex; align-items: center; }
.book-source-details summary::-webkit-details-marker { display: none; }
.book-source-details[open] { position: static; }
.book-source-details[open]>.book-references { margin-top: 12px; padding: 18px 18px 6px 36px; background: var(--surface-2); border-radius: 6px; max-width: 600px; }
.book-block__actions:has(.book-source-details[open]) { flex-wrap: wrap; }
.book-source-details[open] { flex-basis: 100%; }

.book-citation { display: inline-flex; align-items: center; justify-content: center; vertical-align: super; min-width: 24px; min-height: 24px; padding: 0 4px; margin-left: 3px; font: 11px/1 var(--sans,system-ui,sans-serif); color: var(--blue); border-radius: 4px; white-space: nowrap; }
.book-citation:hover,.book-citation[aria-expanded=true] { background: var(--blue-tint); }
.book-inline-sources { margin-top: 14px; padding: 16px 18px; background: var(--surface-2); border-radius: 6px; }
.book-inline-sources[hidden] { display: none; }
.book-inline-sources>.book-sources { font: 12px var(--sans,system-ui,sans-serif); color: var(--blue); }
.book-list-citation { text-align: right; margin-top: -8px; }
@media print { .book-inline-sources { display: none!important; } .book-citation { color: #333; } .book-document h3 { break-after: avoid; } }
