/* Level "l2" figures (group G2). Every rule is scoped to #l2. */
/* On wide screens the idea diagram sits beside the text, so the activity stays near the top. */
@media (min-width: 900px) {
  #l2 .idea { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 32rem); grid-template-rows: auto 1fr; column-gap: 28px; align-items: start; }
  #l2 .idea > h3, #l2 .idea > .brief { grid-column: 1; }
  #l2 .idea > .fig { grid-column: 2; grid-row: 1 / span 2; margin: 0; max-width: none; }
}
#l2 .l2-fig-idea { max-width: 34rem; }
#l2 .l2-fig-cos, #l2 .l2-fig-pipe { max-width: 36rem; }
#l2 .dg .halo { stroke: var(--surface); stroke-width: 5px; stroke-linejoin: round; paint-order: stroke; }
#l2 .dg .g2-m14 { font-size: 14px; }
/* SVD: four small panels in a row; two by two on narrow screens */
#l2 .l2-fig-svd { max-width: 50rem; }
#l2 .l2-svd-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
#l2 .l2-svd-row svg.dg { background: var(--bg); border: 1px solid var(--rule); border-radius: 8px; font-size: 16px; }
@media (max-width: 640px) { #l2 .l2-svd-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* cost curve and the (M11 + M22, M21 - M12) arrow: side by side, the arrow under the curve on a phone */
#l2 .l2-cos-row { display: grid; grid-template-columns: minmax(0, 33fr) minmax(0, 17fr); gap: 0; align-items: end; }
@media (max-width: 480px) { #l2 .l2-cos-row { grid-template-columns: minmax(0, 1fr); gap: 6px; } #l2 .l2-cos-row svg.dg:last-child { max-width: 13rem; margin-inline: auto; } }
