/* Cross-engine reading layout. Typography and palette remain in styles.css;
   text flow and intrinsic sizing are explicit here rather than inherited. */
#root .spread,
#root .spread-frame,
#root .spread-title-block,
#root .asset-main,
#root .asset-aside,
#root .method-essay,
#root .method-chapter,
#root .method-mechanisms > section,
#root .method-principles > div {
  box-sizing: border-box;
  min-width: 0;
  white-space: normal;
  text-wrap: wrap;
  text-align: left;
}
#root .spread-frame { width:100%; max-width:1440px; }
#root .spread-title-block { grid-template-columns:minmax(0,1fr); }
#root .spread p,
#root .spread h1,
#root .spread h2,
#root .spread h3,
#root .spread dd,
#root .spread li,
#root .spread th,
#root .spread td,
#root .spread summary {
  box-sizing:border-box;
  min-width:0;
  white-space:normal;
  text-wrap:wrap;
  text-align:left;
  word-break:normal;
  overflow-wrap:break-word;
  overflow-wrap:anywhere;
}
#root .spread p { display:block; width:auto; }
#root .method-chapter p,
#root .asset-section p { max-width:72ch; }
#root .method-mechanisms p,
#root .method-principles p,
#root .asset-aside p { width:100%; max-width:100%; }
#root .method-mechanisms > section,
#root .method-principles > div { max-width:100%; }
#root .method-mechanisms { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
#root .method-principles { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
#root .method-layout { display:grid; grid-template-columns:minmax(0,210px) minmax(0,1fr); }
#root .asset-columns { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,260px); }
#root .spread-top { flex-wrap:wrap; }
#root .spread-folio { min-width:0; max-width:100%; }
#root .spread-back { max-width:100%; flex-shrink:0; }
#root .method-contents a { min-width:0; white-space:normal; text-wrap:wrap; }
#root .method-contents .contents-title { min-width:0; overflow-wrap:anywhere; }
#root .entry-sources a,
#root .asset-section a { white-space:normal; overflow-wrap:anywhere; }
#root .method-chapter table { table-layout:fixed; width:100%; max-width:100%; }
#root .method-table-wrap { min-width:0; max-width:100%; }
#root .spread-bottom { flex-wrap:wrap; gap:12px 24px; }
@media(max-width:1050px) {
  #root .method-layout { display:block; }
  #root .method-contents { position:static; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); max-height:290px; margin-bottom:30px; padding:16px; }
}
@media(max-width:900px) {
  #root .asset-columns { grid-template-columns:minmax(0,1fr); }
  #root .asset-aside { border-left:0; border-top:1px solid var(--line-2); padding:24px 0; }
}
@media(max-width:760px) {
  #root .method-mechanisms,
  #root .method-principles { grid-template-columns:minmax(0,1fr); }
  #root .spread-frame { padding-left:24px; padding-right:24px; }
}
@media(max-width:560px) {
  #root .method-contents { grid-template-columns:minmax(0,1fr); }
  #root .spread-frame { padding-left:20px; padding-right:20px; }
  #root .method-chapter table,
  #root .method-chapter tbody,
  #root .method-chapter tr,
  #root .method-chapter th,
  #root .method-chapter td { display:block; width:100%; }
  #root .method-chapter thead { display:none; }
}
