/* अध्ययनसार — Phase 6 Standard Content Templates
   This layer normalizes structure without erasing family-specific identity.
   Applied only through data-content-template + ds-template-* runtime hooks.
*/
body[data-content-template] .ds-template-main{min-width:0;max-width:100%;}
body[data-content-template] .ds-template-shell{
  width:min(var(--ds-content-max),calc(100% - (var(--ds-page-gutter) * 2)));
  max-width:var(--ds-content-max);
  min-width:0;
  margin-inline:auto;
}
body[data-content-template="study-article"] .ds-template-shell{
  width:min(var(--ds-content-max),calc(100% - (var(--ds-page-gutter) * 2)));
}
body[data-content-template="study-article"] .ds-template-article{
  width:min(var(--ds-reading-max),100%);
  max-width:var(--ds-reading-max);
  min-width:0;
  margin-inline:auto;
}
body[data-content-template] .ds-template-breadcrumb{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:var(--ds-space-2);
  max-width:100%;
  color:var(--ds-text-muted);
  font-size:var(--ds-text-sm);
  line-height:1.5;
  overflow-wrap:anywhere;
}
body[data-content-template] .ds-template-breadcrumb a{
  color:var(--ds-primary);
  text-decoration:none;
}
body[data-content-template] .ds-template-breadcrumb a:hover{
  text-decoration:underline;
  text-underline-offset:3px;
}
body[data-content-template] .ds-template-head{
  min-width:0;
}
body[data-content-template] .ds-template-head h1{
  max-width:24ch;
  margin-top:var(--ds-space-3);
  overflow-wrap:anywhere;
  text-wrap:balance;
}
body[data-content-template="study-article"] .ds-template-head h1{
  max-width:26ch;
}
body[data-content-template] .ds-template-kicker{
  color:var(--ds-primary-strong);
  font-size:var(--ds-text-sm);
  font-weight:800;
  line-height:1.4;
}
body[data-content-template] .ds-template-lead{
  max-width:76ch;
  color:var(--ds-text-muted);
  line-height:1.75;
  text-wrap:pretty;
}
body[data-content-template] .ds-template-meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:var(--ds-space-2) var(--ds-space-3);
  max-width:100%;
  color:var(--ds-text-muted);
  font-size:var(--ds-text-sm);
  line-height:1.5;
}
body[data-content-template] .ds-template-meta>*{min-width:0;}
body[data-content-template] .ds-template-toc{
  max-width:100%;
  min-width:0;
  overflow-wrap:anywhere;
}
body[data-content-template] .ds-template-prose{
  min-width:0;
  overflow-wrap:anywhere;
}
body[data-content-template] .ds-template-prose :where(h2,h3,h4){
  scroll-margin-top:calc(var(--ds-sticky-top) + var(--ds-space-3));
}
body[data-content-template] .ds-template-prose :where(img,video,canvas,svg){
  max-width:100%;
  height:auto;
}
body[data-content-template] .ds-template-prev-next{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:var(--ds-space-3);
  max-width:100%;
}
body[data-content-template] .ds-template-prev-next>a{
  min-height:var(--ds-touch-min);
  display:inline-flex;
  align-items:center;
}
body[data-content-template] .ds-template-collection{
  min-width:0;
  max-width:100%;
}
body[data-content-template] .ds-template-collection>*{min-width:0;}

body[data-content-template="subject-hub"] .ds-template-head,
body[data-content-template="resource-hub"] .ds-template-head,
body[data-content-template="collection"] .ds-template-head,
body[data-content-template="exam-hub"] .ds-template-head{
  max-width:var(--ds-reading-max);
}
body[data-content-template="resource-hub"] .ds-template-shell,
body[data-content-template="collection"] .ds-template-shell{
  width:min(var(--ds-shell-max),calc(100% - (var(--ds-page-gutter) * 2)));
  max-width:var(--ds-shell-max);
}

/* Interactive families are deliberately left visually untouched until their dedicated phases. */
body[data-content-template="interactive"] [data-template-part]{min-width:0;}

@media(max-width:47.999rem){
  body[data-content-template] .ds-template-head h1{max-width:none;}
  body[data-content-template] .ds-template-prev-next{align-items:stretch;}
  body[data-content-template] .ds-template-prev-next>a{
    flex:1 1 12rem;
    justify-content:center;
    text-align:center;
  }
}
@media print{
  body[data-content-template] .ds-template-shell,
  body[data-content-template="study-article"] .ds-template-article{
    width:100%;
    max-width:none;
  }
}