/* Schoolep V218 — S Level-2 outer 2 / inner 3 with safe gutters.
   The subjects grid lives inside the stream-body padding; never add width:100%
   together with inline margins because that overflows into the card edge. */
.streams-section-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:start!important;
  gap:18px!important;
}
.stream-card,.stream-card .stream-body,.stream-card .subjects-grid,.stream-card .subject-chip{
  min-width:0!important; box-sizing:border-box!important;
}
/* A real interior gutter on every open stream card. */
.content-area.theme-secondary .stream-card.open .stream-body{
  padding:18px clamp(12px,1.35vw,20px)!important;
}
.stream-card .stream-body>.subjects-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
  width:auto!important;
  max-width:100%!important;
  margin:6px 0 0!important;
  padding:0!important;
}
.stream-card .subject-chip{
  width:100%!important; max-width:none!important; min-height:58px!important;
  padding:10px clamp(9px,1vw,14px)!important;
  gap:clamp(8px,.8vw,12px)!important;
}
.stream-card .subject-chip .texts,.stream-card .subject-chip .title,.stream-card .subject-chip .subtitle{min-width:0!important;}
.stream-card .subject-chip .title,.stream-card .subject-chip .subtitle{overflow-wrap:anywhere;word-break:normal;}
/* Desktop/laptop: outer 2, subjects inside each expanded card 3. */
@media (min-width:768px){
 .streams-section-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
 .content-area.theme-secondary .stream-card.open .subjects-grid,
 .content-area.theme-secondary .stream-card:not(.open) .subjects-grid,
 .stream-card .stream-body>.subjects-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
 .stream-card .subject-chip .title{font-size:clamp(.82rem,1vw,1rem)!important;line-height:1.18!important;}
}
/* Tablet / compact split screen. */
@media (min-width:521px) and (max-width:767px){
 .streams-section-grid{grid-template-columns:1fr!important;}
 .content-area.theme-secondary .stream-card.open .subjects-grid,
 .content-area.theme-secondary .stream-card:not(.open) .subjects-grid,
 .stream-card .stream-body>.subjects-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
/* Phones. */
@media (max-width:520px){
 .streams-section-grid{grid-template-columns:1fr!important;gap:12px!important;}
 .content-area.theme-secondary .stream-card.open .stream-body{padding:12px 10px!important;}
 .content-area.theme-secondary .stream-card.open .subjects-grid,
 .content-area.theme-secondary .stream-card:not(.open) .subjects-grid,
 .stream-card .stream-body>.subjects-grid{grid-template-columns:1fr!important;gap:8px!important;}
}
