
/* v11 layout tuning: 4:1 text:margin when marginalia exists; full width when none */

.para-row{
  display:flex;
  align-items:flex-start;
  gap:16px;
}

/* Wider measure when marginalia rail is present */
.has-margnotes .paper{ max-width: 1040px; }

/* Default: assume marginalia exists somewhere in this chapter; keep consistent text column width */
.has-margnotes .para-text{
  flex:15 1 0;
  min-width: 0;
}

.has-margnotes .para-marg{
  flex: 2 1 0;
  min-width: 110px;
  max-width: 150px;
}

/* If a chapter has NO marginalia at all, collapse the margin column entirely */
.no-margnotes .para-row{ gap:0; }
.no-margnotes .para-marg{ display:none; }
.no-margnotes .para-text{ flex: 1 1 auto; min-width:0; }

/* Keep margin summaries readable */
.marg-summary{ text-align:left; hyphens:none;
font-size: 0.8em;
}

/* Justify main text but disable automatic hyphenation */
#mainPane .paper p{ text-align: justify; text-justify: inter-word; hyphens: none; }

/* v11: Prevent lists from intruding into margin column */
#mainPane .paper ul,
#mainPane .paper ol{
  box-sizing: border-box;
  max-width: 100%;
  padding-right: 0;
  margin-right: 0;
  overflow-wrap: anywhere;
}
#mainPane .paper li{
  max-width: 100%;
  overflow-wrap: anywhere;
}
