/* Foreign-language copy may wrap at natural word boundaries in Chinese layouts. */
/* Keep the new reading guides' paragraphs distinct and link arrows with their labels. */
body[data-source-locale="zh-CN"][data-locale] .parent-reading > div > p:not(.eyebrow):not(.nursery-eyebrow) {
  margin-block: 0 1em;
}
body[data-source-locale="zh-CN"][data-locale] .parent-reading nav a {
  display: inline-flex;
  align-items: baseline;
  gap: .4em;
  max-inline-size: 100%;
}
body[data-source-locale="zh-CN"][data-locale] .parent-reading nav a > span {
  flex-shrink: 0;
  white-space: nowrap;
}
body[data-source-locale="zh-CN"][data-locale="ko"] .parent-reading :is(h2, h3, p, li, a) {
  word-break: keep-all;
  overflow-wrap: normal;
}
body[data-source-locale="zh-CN"][data-locale] .nursery-content-block.parent-reading > div > :is(p:not(.nursery-eyebrow), ul, nav) {
  max-inline-size: 68ch;
  margin-inline-start: 0;
  margin-inline-end: auto;
}
@media (max-width: 699px) {
  body[data-source-locale="zh-CN"][data-locale="ru"] .nursery-content-block.parent-reading > div > h2 {
    font-size: 25px;
    line-height: 1.45;
  }
}

[data-source-locale="zh-CN"][data-locale] .about-heading-topic,
[data-source-locale="zh-CN"][data-locale] .about-heading-description {
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  text-wrap: pretty;
}

/* Keep Korean word units intact in this English-education section heading. */
[data-source-locale="zh-CN"][data-locale="ko"] #section-english-2 > div > h2 {
  word-break: keep-all;
  overflow-wrap: normal;
}

/* Longer Northeast gallery captions need full words and wider portrait columns. */
body[data-source-locale="zh-CN"][data-locale][data-page-path="education/international-community/"] #travel-5 .shared-photo figcaption {
  hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
}
body[data-source-locale="zh-CN"][data-locale="ko"][data-page-path="education/international-community/"] #travel-5 .shared-photo figcaption {
  word-break: keep-all;
}
@media (min-width: 1000px) {
  body[data-source-locale="zh-CN"][data-locale][data-page-path="education/international-community/"] #travel-5 .shared-photo-row > .shared-photo {
    flex: 1 1 0;
  }
}
@media (min-width: 700px) and (max-width: 999px) {
  body[data-source-locale="zh-CN"][data-locale][data-page-path="education/international-community/"] #travel-5 .shared-photo-row {
    display: block;
  }
  body[data-source-locale="zh-CN"][data-locale][data-page-path="education/international-community/"] #travel-5 .shared-photo-row > .shared-photo + .shared-photo {
    margin-top: 18px;
  }
}

/* Keep the Korean nursery principles heading's attached particles with their words. */
body.nursery-home[data-source-locale="zh-CN"][data-locale="ko"] .nursery-home-principles > header > h2 {
  word-break: keep-all;
  overflow-wrap: normal;
}

/* These longer Korean passages keep word units and particles together. */
body[data-source-locale="zh-CN"][data-locale="ko"][data-page-path="education/english/articles/free-primary-weekend-english/"] .longform-article :is(h1, h2, h3, p),
body[data-source-locale="zh-CN"][data-locale="ko"][data-page-path="faq/"] .faq-list :is(summary, p) {
  word-break: keep-all;
  overflow-wrap: normal;
}

/* Override left alignment inherited from the Chinese article and FAQ styles. */
body[data-source-locale="zh-CN"][data-locale="ar"] .longform-article .article-section :is(p, li),
body[data-source-locale="zh-CN"][data-locale="ar"] .faq-list :is(summary, p) {
  text-align: start;
}

/* The language list is LTR for uniform label alignment; anchor it inside RTL headers. */
body[data-source-locale="zh-CN"][data-locale="ar"] .locale-switch > nav {
  inset-inline-start: 0;
  inset-inline-end: auto;
}

/* Keep Korean words intact in these travel descriptions and the IB timeline. */
body[data-source-locale="zh-CN"][data-locale="ko"][data-page-path="education/international-community/"] :is(#video-travel-chengdu, #video-study-travel-singapore) > p,
body[data-source-locale="zh-CN"][data-locale="ko"][data-page-path="education/ib-pyp/"] #section-ib-0 p,
body[data-source-locale="zh-CN"][data-locale="ko"][data-page-path="education/ib-pyp/"] .editorial-section h2,
body[data-source-locale="zh-CN"][data-locale="ko"][data-page-path="nursery/day/"] #chapter-3 h2 {
  word-break: keep-all;
  overflow-wrap: normal;
}

/* Align Arabic PE titles and descriptions at the same reading edge. */
body[data-source-locale="zh-CN"][data-locale="ar"][data-page-path="life/movement/"] #section-sports-1 .campus-video-clip figcaption {
  text-align: start;
}

/* Keep Korean words intact in the newly updated birthday and PE sections. */
body[data-source-locale="zh-CN"][data-locale="ko"][data-page-path="education/international-community/"] #video-birthday-party > p,
body[data-source-locale="zh-CN"][data-locale="ko"][data-page-path="life/movement/"] #section-sports-1 p {
  word-break: keep-all;
  overflow-wrap: normal;
}

/* Keep Korean words and their attached endings together in the IB FAQ. */
body[data-source-locale="zh-CN"][data-locale="ko"][data-page-path="education/ib-pyp/"] #ib-faq .faq-list p {
  word-break: keep-all;
  overflow-wrap: normal;
}

/* Preserve the classroom clip's portrait composition in foreign pages. */
body[data-source-locale="zh-CN"][data-locale][data-page-path="education/english/"] .classroom-video .study-video video {
  aspect-ratio: 9 / 16;
}

/* Give the portrait video and its copy a balanced reading layout on wider screens. */
@media (min-width: 700px) {
  body[data-source-locale="zh-CN"][data-locale][data-page-path="education/english/"] .classroom-video .study-video {
    display: grid;
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    grid-template-rows: 1fr 1fr;
    column-gap: clamp(24px, 4vw, 56px);
  }
  body[data-source-locale="zh-CN"][data-locale][data-page-path="education/english/"] .classroom-video .study-video > video {
    grid-column: 1;
    grid-row: 1 / 3;
  }
  body[data-source-locale="zh-CN"][data-locale][data-page-path="education/english/"] .classroom-video .study-video > h3 {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    margin: 0 0 16px;
  }
  body[data-source-locale="zh-CN"][data-locale][data-page-path="education/english/"] .classroom-video .study-video > p {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    max-inline-size: 34em;
  }
}

/* Keep Korean word units intact in the two newly added video descriptions. */
body[data-source-locale="zh-CN"][data-locale="ko"][data-page-path="education/english/"] .classroom-video :is(h3, p),
body[data-source-locale="zh-CN"][data-locale="ko"][data-page-path="education/international-community/"] #activity-06 :is(h3, .study-video > p) {
  word-break: keep-all;
  overflow-wrap: normal;
}
