/* One canonical education article layout: text 60% / art 40%, alternating sides.
   Overrides older article-specific legacy layout rules while preserving illustrations and copy. */
@media (min-width:681px) {
  body.education-article .article-body {
    display:grid;
    grid-template-columns:repeat(10,minmax(0,1fr));
    column-gap:0;
    align-items:center;
  }
  body.education-article .article-body > p:not(.edu-disclaimer) {
    max-width:none;
    font-size:clamp(19px,1.85vw,22px);
    line-height:1.78;
    align-self:center;
  }
  body.education-article .article-body > .story-images {
    display:block;
    width:100%;
    max-width:none;
    margin:0;
  }
  body.education-article .article-body > p:nth-of-type(1):not(.edu-disclaimer) {grid-column:1/7;grid-row:1;padding-right:28px}
  body.education-article .article-body > .story-images:nth-of-type(1) {grid-column:7/11;grid-row:1;padding:16px 0 16px 28px}
  body.education-article .article-body > p:nth-of-type(2):not(.edu-disclaimer) {grid-column:5/11;grid-row:2;padding-left:28px}
  body.education-article .article-body > .story-images:nth-of-type(2) {grid-column:1/5;grid-row:2;padding:16px 28px 16px 0}
  body.education-article .article-body > p:nth-of-type(3):not(.edu-disclaimer) {grid-column:1/7;grid-row:3;padding-right:28px}
  body.education-article .article-body > .story-images:nth-of-type(3) {grid-column:7/11;grid-row:3;padding:16px 0 16px 28px}
  body.education-article .article-body > p:nth-of-type(4):not(.edu-disclaimer) {grid-column:5/11;grid-row:4;padding-left:28px}
  body.education-article .article-body > .story-images:nth-of-type(4) {grid-column:1/5;grid-row:4;padding:16px 28px 16px 0}
  body.education-article .article-body > .article-more,
  body.education-article .article-body > .edu-disclaimer,
  body.education-article .article-body > .cracked-summary {grid-column:1/-1}
}
@media (min-width:681px) and (max-width:850px) {
  body.education-article .article-body > p:not(.edu-disclaimer) {font-size:19px}
  body.education-article .article-body > p:nth-of-type(odd):not(.edu-disclaimer){padding-right:16px}
  body.education-article .article-body > p:nth-of-type(even):not(.edu-disclaimer){padding-left:16px}
  body.education-article .article-body > .story-images:nth-of-type(odd){padding-left:16px}
  body.education-article .article-body > .story-images:nth-of-type(even){padding-right:16px}
}
@media (max-width:680px) {
  body.education-article .article-body{display:block}
  body.education-article .article-body > p:not(.edu-disclaimer){font-size:17px;line-height:1.8}
}

/* Extend the same alternating 60/40 rhythm to longer articles. */
@media (min-width:681px) {
  body.education-article .article-body > p:nth-of-type(5):not(.edu-disclaimer) {grid-column:1/7;grid-row:5;padding-right:28px}
  body.education-article .article-body > .story-images:nth-of-type(5) {grid-column:7/11;grid-row:5;padding:16px 0 16px 28px}
  body.education-article .article-body > p:nth-of-type(6):not(.edu-disclaimer) {grid-column:5/11;grid-row:6;padding-left:28px}
  body.education-article .article-body > .story-images:nth-of-type(6) {grid-column:1/5;grid-row:6;padding:16px 28px 16px 0}
  body.education-article .article-body > p:nth-of-type(7):not(.edu-disclaimer) {grid-column:1/7;grid-row:7;padding-right:28px}
  body.education-article .article-body > .story-images:nth-of-type(7) {grid-column:7/11;grid-row:7;padding:16px 0 16px 28px}
  body.education-article .article-body > p:nth-of-type(8):not(.edu-disclaimer) {grid-column:5/11;grid-row:8;padding-left:28px}
  body.education-article .article-body > .story-images:nth-of-type(8) {grid-column:1/5;grid-row:8;padding:16px 28px 16px 0}
  body.education-article .article-body > p:nth-of-type(9):not(.edu-disclaimer) {grid-column:1/7;grid-row:9;padding-right:28px}
  body.education-article .article-body > .story-images:nth-of-type(9) {grid-column:7/11;grid-row:9;padding:16px 0 16px 28px}
  body.education-article .article-body > p:nth-of-type(10):not(.edu-disclaimer) {grid-column:5/11;grid-row:10;padding-left:28px}
  body.education-article .article-body > .story-images:nth-of-type(10) {grid-column:1/5;grid-row:10;padding:16px 28px 16px 0}
  body.education-article .article-body > p:nth-of-type(11):not(.edu-disclaimer) {grid-column:1/7;grid-row:11;padding-right:28px}
  body.education-article .article-body > .story-images:nth-of-type(11) {grid-column:7/11;grid-row:11;padding:16px 0 16px 28px}
  body.education-article .article-body > p:nth-of-type(12):not(.edu-disclaimer) {grid-column:5/11;grid-row:12;padding-left:28px}
  body.education-article .article-body > .story-images:nth-of-type(12) {grid-column:1/5;grid-row:12;padding:16px 28px 16px 0}
  body.education-article .article-body > h2,
  body.education-article .article-body > h3,
  body.education-article .article-body > ul,
  body.education-article .article-body > ol {grid-column:1/-1}
}

/* Size the frame from the scaled image, with captions wrapping within it. */
body.education-article .article-body > .story-images .story-figure {
  box-sizing:border-box;
  width:fit-content;
  max-width:100%;
  margin-inline:auto;
}
body.education-article .article-body > .story-images .story-figure img {
  display:block;
  width:auto;
  height:auto;
  min-height:0;
  max-width:100%;
  max-height:clamp(300px,62vh,520px);
  max-height:clamp(300px,62svh,520px);
  aspect-ratio:auto;
  margin-inline:auto;
}
body.education-article .article-body > .story-images .story-figure figcaption {
  contain:inline-size;
  overflow-wrap:anywhere;
}
@media (max-width:680px) {
  body.education-article .article-body > .story-images .story-figure img {
    max-height:clamp(260px,58vh,400px);
    max-height:clamp(260px,58svh,400px);
  }
}

body.education-article .article-body > .article-comparison {
  grid-column:1/-1;
  width:100%;
  max-width:900px;
  margin:32px auto 0;
  text-align:center;
  color:#314e52;
  font-size:clamp(19px,1.85vw,22px);
  line-height:1.78;
}
@media (max-width:680px) {
  body.education-article .article-body > .article-comparison {
    font-size:17px;
    line-height:1.8;
  }
}

body.education-article .article-body > .article-comparison > p {
  box-sizing:border-box;
  width:100%;
  max-width:none;
  margin:0 auto;
  text-align:center;
  font-size:inherit;
  line-height:inherit;
  color:inherit;
}

/* Keep paired healing illustrations together in the article's image column. */
body.education-article .article-body > .story-images.story-images-pair {
  display:grid;
  grid-template-columns:var(--pair-columns,repeat(2,minmax(0,1fr)));
  gap:12px;
  align-items:start;
  box-sizing:border-box;
  background:#fff;
  border:1px solid #667a78;
  border-radius:17px;
  padding:8px;
  box-shadow:0 9px 24px rgba(20,48,49,.07);
}
body.education-article .article-body > .story-images.story-images-pair .story-figure {
  min-width:0;
  padding:0;
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
}
body.education-article .article-body > .story-images.story-images-pair .story-figure {
  width:100%;
}
body.education-article .article-body > .story-images.story-images-pair .story-figure img {
  width:100%;
  height:auto;
  max-height:none;
  object-fit:contain;
  border:0;
}
