/* November review: clearer hierarchy, fewer repeated blocks, larger original renders. */
#app :is(#research-essentials,#chapter-2,#chapter-13) > .section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
#app :is(#research-essentials,#chapter-2,#chapter-13) > .section-head > p {
  width: 100%; max-width: none; margin: 0; text-wrap: pretty;
}
#app #chapter-4 .alternative-grid {
  display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 24px;
}
#app #chapter-4 .alternative {
  grid-column: auto; padding: 28px 24px; min-width: 0;
  display: flex; flex-direction: column; align-items: flex-start;
  background: #f5f5f7; border: 0; border-radius: 16px;
}
#app #chapter-4 .alternative .icon {
  width: 48px; height: 56px; margin: 0 0 24px; flex: none;
}
#app #chapter-4 .alternative h4 { margin: 0 0 12px; }
#app #chapter-4 .alternative p { margin: 0; }
#app .definition-portrait { background: #f6f5f4; }
#app #architecture-comparison {
  border: 1px solid #d2d2d7; background: #f5f5f7; margin-block: 40px;
}
#app #architecture-comparison > summary { padding-block: 28px; }
#app #architecture-comparison > summary > span {
  font-size: var(--type-heading) !important; font-weight: 500; line-height: 1.3;
}
#app .internal-detail-links {
  display: flex; flex-wrap: wrap; gap: 16px 28px;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line);
}
#app .internal-detail-links .internal-upper-detail { margin: 0; }
#app #chapter-13 .component-detail-pair {
  grid-template-columns: minmax(0,1fr); gap: 56px;
}
#app #chapter-13 .component-detail-pair .dimension-drawing img {
  width: 100%; height: auto; max-height: none; object-fit: contain;
}
#app #chapter-13 .component-detail-pair figcaption { max-width: 75ch; }
#app #stage-outcomes .stage-outcome-status { margin-top: 0; }
@media(max-width:1000px) {
  #app #chapter-4 .alternative-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:580px) {
  #app #chapter-4 .alternative-grid { grid-template-columns: minmax(0,1fr); gap: 16px; }
  #app #chapter-4 .alternative { padding: 24px; }
  #app #chapter-13 .component-detail-pair { gap: 36px; }
}

/* Give the independence statistic the full content measure. */
#app #chapter-2 .adl {
  grid-template-columns: minmax(0,1fr);
  gap: 0;
  padding-bottom: 32px;
}
#app #chapter-2 .adl > div { grid-column: 1 / -1; width: 100%; }
#app #chapter-2 .adl-heading {
  align-items: center; flex-wrap: wrap; gap: 16px 28px; margin-bottom: 24px;
}
#app #chapter-2 .adl-heading strong {
  font-size: var(--type-display) !important;
  font-weight: 600; line-height: 1.1; white-space: nowrap;
}
#app #chapter-2 .adl-heading > span { max-width: none; padding-top: 0; }
#app #chapter-2 .adl-bar { width: 100%; max-width: none; height: 20px; }
#app #chapter-2 .adl-legend {
  width: 100%; max-width: none; gap: 16px 32px; margin-top: 20px;
}
@media(max-width:580px) {
  #app #chapter-2 .adl-heading { flex-direction: column; align-items: flex-start; gap: 12px; }
  #app #chapter-2 .adl-legend { gap: 12px 24px; }
}
