/* Level 4 (matches matter) figures. The three match panels stay side by side, even on a phone. */
#l4 .l4-trio { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 40rem; gap: 10px; margin-bottom: 0; }
#l4 .l4-trio figcaption { font-size: 0.82rem; line-height: 1.35; }
#l4 .l4-trio svg.dg { background: var(--bg); border: 1px solid var(--rule); border-radius: 8px; }
#l4 .l4-key { max-width: 40rem; margin-bottom: 2px; }
#l4 .l4-sw-match { color: var(--match); }
#l4 .l4-sw-bad { color: var(--bad); }
#l4 .l4-fig-votes { max-width: 26rem; }
#l4 svg.dg text.l4-halo { stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; paint-order: stroke; }
/* on wide screens the three panels sit beside the text, as on the neighbouring levels, so the activity stays near the top */
@media (min-width: 900px) {
  #l4 .idea { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); grid-template-rows: auto 1fr; column-gap: 28px; align-items: start; }
  #l4 .idea > h3, #l4 .idea > .brief { grid-column: 1; }
  #l4 .idea > .l4-trio-wrap { grid-column: 2; grid-row: 1 / span 2; }
  #l4 .l4-trio-wrap .l4-trio { margin-top: 0; }
}
