/* ────────────────────────────────────────────────────────────
   SIMD Tutorial — page-specific styles
   The shared tutorial.css and asm-tutorial.css (reg-table, isa-table,
   timeline-block, encoding pills) carry most of the layout. This file
   adds only what is unique to the SIMD widgets.
   ──────────────────────────────────────────────────────────── */

/* Two stacked toggle-groups in the lane widget header */
#widget-lanes .widget-header {
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

#widget-lanes .toggle-group + .toggle-group {
  margin-left: 0;
}

/* Make the lane row labels readable on narrow viewports */
@media (max-width: 720px) {
  #widget-lanes canvas,
  #widget-mask canvas,
  #widget-pshufb canvas {
    aspect-ratio: 1.5 / 1;
  }
}

/* Mask widget pattern buttons line up with other engine widgets */
#widget-mask .controls .btn-group {
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Frustum widget: stat grid pulled in slightly so the three counters fit
   without overflowing on narrower viewports. */
#widget-frustum .stat-grid {
  grid-template-columns: repeat(3, minmax(8rem, 1fr));
}
@media (max-width: 720px) {
  #widget-frustum .stat-grid {
    grid-template-columns: repeat(2, minmax(7rem, 1fr));
  }
}

/* Layout widget legend: ensure the legend chips don't collide with the canvas */
#widget-layout canvas {
  margin-top: 0.25rem;
}
