/* One role-based type scale for all seven pages. Diagram labels and numeric
   displays keep their own scale; headings and prose share the same tokens. */
:root{--qcs-type-title:40px;--qcs-type-subtitle:24px;--qcs-type-card-title:20px;--qcs-type-body:18px;--qcs-type-caption:16px}
main p,main li{font-family:Inter,Arial,sans-serif;font-size:var(--qcs-type-body)!important;line-height:1.5!important;overflow-wrap:break-word}
main p{font-weight:400!important}
.vision p,.career-goal{font-weight:600!important}
main h1,main h2,.section-heading,
.program-offer h3,.hours h3,.split-feature h3,.development h3,.project-includes h3,.directions h3,.why-program h3,
.program-center-heading h3,.program-text-center h3,.principles-block h3,.career-stage h3,.career-practices h3,.split-section h3,.parents-split h3{
  font-family:Montserrat,Arial,sans-serif;font-size:var(--qcs-type-title)!important;line-height:1.225!important;overflow-wrap:break-word
}
main article h3,main article h4,.skill-panels b{font-family:Montserrat,Arial,sans-serif;font-size:var(--qcs-type-card-title)!important;line-height:1.35!important;overflow-wrap:anywhere}
.language-map>h3,.csca>h3{font-size:var(--qcs-type-subtitle)!important;line-height:1.35!important}
.subject-cards p,.why-items p,.process-cards p,.opportunity-grid p,.country-grid p,.university-grid p,.houses-grid p,.skill-panels p{
  font-size:var(--qcs-type-caption)!important;line-height:1.5!important;overflow-wrap:anywhere
}
.skill-panels p br{display:revert!important}
.faq-group-toggle,.faq-list article>button{font-family:Inter,Arial,sans-serif;font-size:var(--qcs-type-body)!important;line-height:1.5!important;white-space:normal}
.future-summary{white-space:normal!important;height:auto}
.profile-band h2{max-width:100%;overflow-wrap:anywhere}
.universities-heading{width:min(1000px,calc(100% - 48px))!important;max-width:calc(100% - 48px)}
.universities-heading h2{width:100%;height:auto;white-space:normal}
.universities-heading h2>strong{white-space:normal;margin-left:0;margin-right:0}
.universities-heading h2>span{flex-wrap:wrap;font-size:var(--qcs-type-subtitle);line-height:1.35;gap:12px}
.universities-heading{height:auto}
.family-discount p{font-size:28px!important;line-height:1.35!important}
.faq-group-panel article>button{font-size:var(--qcs-type-body)!important;line-height:1.5!important}
.grade-copy h3{font-size:var(--qcs-type-title)!important;line-height:1.225!important}
.career-stage h3>span{font-size:inherit;line-height:inherit;white-space:normal;overflow-wrap:anywhere}
.final-stage h2 span{white-space:normal!important;overflow-wrap:anywhere}
.partner-grid article>span,.education-facts b,.team-grid b,.team-category-grid b{font-family:Montserrat,Arial,sans-serif;font-size:var(--qcs-type-card-title)!important;line-height:1.35!important}
.partner-benefits article>span,.csca-benefits article>span,.process-cards article>span,.team-grid span,.team-category-grid span{font-size:var(--qcs-type-caption)!important;line-height:1.5!important;overflow-wrap:break-word}
.team-grid article>div,.team-category-grid article>div{height:170px;min-height:0;padding:14px 12px}
.world-map h2{font-size:var(--qcs-type-subtitle)!important;line-height:1.35!important}
.subject-cards article,.skill-panels article,.houses-grid article{height:auto;min-height:var(--qcs-card-height,279px)}
.subject-cards article{min-height:320px;padding:30px 14px;display:flex;flex-direction:column;align-items:center;gap:16px}
.subject-cards .subject-icon,.subject-cards h4,.subject-cards p,.subject-cards article>i{position:static!important;transform:none;margin:0;width:auto}
.subject-cards .subject-icon{width:94px;height:94px;flex:none}
.subject-cards h4,.subject-cards p{width:100%}
.subject-cards article>i{width:48px;margin-top:auto}
.skill-panels article{--qcs-card-height:459px;padding-bottom:28px}
.houses-grid article{padding-bottom:36px}
.opportunity-grid article,.university-grid article{height:auto!important;min-height:351px}
.opportunity-grid h3{height:auto;min-height:54px}
.university-grid article{min-height:520px}
@media(min-width:901px){
  .why-items article,.why-items.four article{height:auto;min-height:279px;padding-bottom:24px}
  .why-items.four.ap-results article{height:auto;min-height:339px}
  .why-items article>i,.why-items.four article>i{position:static;display:block;margin:24px auto 0;transform:none}
}
@media(min-width:901px) and (max-width:1200px){
  .subject-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
  .subject-cards article{width:auto!important}
  .opportunity-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
  .why-items,.why-items.four,.why-items.four.ap-results{zoom:1!important;transform:none!important;width:calc(100% - 80px)!important;margin:50px auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:24px!important}
  .why-items article,.why-items.four article,.why-items.four.ap-results article{width:auto;min-height:280px;height:auto;display:flex;flex-direction:column;align-items:center;padding:24px 12px}
  .why-items article:after{display:none}
  .why-icon,.why-items.four .why-icon{width:94px;height:94px;margin:0;flex:none}
  .why-items p,.why-items.four p{width:100%!important;margin:24px 0 0}
  .why-items article>i{position:static;margin:24px auto 0;transform:none}
}
@media(max-width:1200px){:root{--qcs-type-title:34px}}
@media(max-width:900px){
  :root{--qcs-type-title:28px;--qcs-type-subtitle:22px;--qcs-type-card-title:18px;--qcs-type-body:16px;--qcs-type-caption:14px}
  .family-discount p{font-size:24px!important}
  main p,main li{font-size:16px!important;line-height:1.5!important}
  main h1,main h2,.section-heading,.students-heading h2,.program-center-heading h3,.program-text-center h3{font-size:var(--qcs-type-title)!important;line-height:1.25!important}
  /* Breaks also separate list-like sentences: hiding them joins words. */
  .skill-panels p br{display:revert!important}
  .skill-panels p{white-space:normal;overflow-wrap:anywhere;width:auto;max-width:100%;margin:24px 0 0!important;text-align:center}
  .skill-panels article{height:auto!important;min-height:330px;padding:24px}
  .structure-grid p,.structure-grid span,.subject-grid p,.subject-grid span,.why-items p,.process-cards p{font-size:14px!important;line-height:1.5!important}
  .structure-grid article,.subject-grid article,.process-cards article{height:auto!important;min-height:190px;padding-bottom:35px}
  .subject-cards article{width:auto!important;height:auto!important;min-height:250px;padding:24px 12px;display:flex;flex-direction:column;align-items:center;gap:12px}
  .subject-cards .subject-icon,.subject-cards h4,.subject-cards p,.subject-cards article>i{position:static!important;width:auto;transform:none;margin:0}
  .subject-cards .subject-icon{width:64px;height:64px;flex:none}
  .subject-cards h4{font-size:18px;line-height:1.35}
  .subject-cards p{font-size:14px!important;line-height:1.5!important;width:100%}
  .subject-cards article>i{width:40px;margin-top:auto}
  .program-center-heading,.program-intro,.program-text-center,.section-note{height:auto!important}
  .mission,.values,.campus-intro,.wellbeing,.why-qcs,.partners{height:auto!important;padding-bottom:64px}
  .values-grid{position:static;width:100%;height:auto;margin:32px 0 0;grid-template-columns:1fr;grid-template-rows:none;gap:24px}
  .values-grid article{position:relative;height:auto;min-height:80px;padding-left:60px}
  .values-grid b{position:absolute;left:0;top:10px;font-size:28px}
  .values-grid i{position:absolute;left:46px;top:0;width:1px;margin:0}
  .values-grid p{position:static;width:auto;transform:none}
  .values-grid i{height:100%}
  .future{height:auto!important;padding:56px 24px!important}
  .future-copy{position:static;height:auto;display:contents}
  .future h2,.future-summary,.future ul,.future .more{position:static;width:auto;height:auto;transform:none}
  .future-summary{margin:24px 0}
  .future-grid{position:static;left:auto;top:auto;width:100%;max-width:100%;height:auto;margin:24px 0;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;gap:12px}
  .future-grid figure{width:100%;min-width:0;height:180px;aspect-ratio:auto}
  .future-grid figcaption{width:100%;max-width:100%;height:auto;min-height:36px;padding:8px;font-size:14px;line-height:1.35;white-space:normal;overflow-wrap:normal}
  .partner-grid{width:100%;height:auto;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:auto;gap:18px}
  .partner-grid article{width:100%;height:auto;min-height:240px;aspect-ratio:auto;padding:18px 12px;gap:16px;overflow:visible}
  .partner-grid img{width:100%;height:90px;flex:none;object-fit:contain}
  .partner-grid article>span{width:100%;word-break:normal;overflow-wrap:break-word}
  .partner-grid b{flex:none;margin-top:auto}
  .partner-grid .ibpyp{height:90px;font-size:30px}
  .partner-grid article:last-child{grid-column:1/-1;width:calc((100% - 18px)/2);justify-self:center}
  .future ul{margin:24px 0;gap:14px}
  .future li{height:auto;white-space:normal}
  .future .more{display:inline-block;margin-top:12px}
  .vision{height:auto!important;padding:56px 24px!important;display:flex;flex-direction:column;gap:24px;overflow:visible}
  .vision h2{position:static!important;order:0;width:auto;margin:0}
  .vision-media{position:relative!important;order:1;left:auto!important;top:auto!important;width:100%!important;height:auto!important;aspect-ratio:4/3;overflow:hidden}
  .vision-media img{position:static!important;width:100%!important;height:100%!important;max-width:100%;object-fit:cover!important;object-position:center!important}
  .vision-media picture{display:block;height:100%}
  .vision p{position:static!important;order:2;width:auto!important;height:auto!important;margin:0;padding:24px!important}
  .site-footer{position:relative;height:auto!important;min-height:0!important;padding:48px 24px!important;overflow:visible}
  .footer-brand{position:static;width:100%;height:auto;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start}
  .footer-logo{width:min(155px,100%);height:auto}
  .footer-brand p{width:auto;margin:0;font-size:14px;line-height:1.5;letter-spacing:1.4px}
  .footer-columns{position:static;width:100%;margin:32px 0 0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:32px 24px}
  .footer-columns nav,.footer-columns nav:first-child,.footer-columns nav:nth-child(2),.footer-columns address,.social{width:auto;min-width:0;gap:12px;font-size:14px;line-height:1.5}
  .footer-columns b{font-size:13px;line-height:1.5}
  .footer-contact-row{height:auto;min-height:24px;gap:8px;white-space:normal;overflow-wrap:anywhere}
  .social a,.social .footer-whatsapp{font-size:14px;width:100%;min-width:0;height:auto;gap:8px;overflow-wrap:anywhere}
  .social a img,.social a svg{width:22px;height:22px;flex:none}
  .footer-apply{position:static;width:100%;height:48px;margin:32px 0 0;font-size:14px}
  .copyright{position:static;height:auto;margin:32px 0 0;padding:20px 0 0;font-size:14px}
  .footer-credit{font-size:12px}
}
@media(max-width:360px){
  .future-grid{grid-template-columns:1fr}
  .partner-grid{grid-template-columns:1fr}
  .partner-grid article:last-child{width:100%}
}
.footer-whatsapp svg{display:block;width:26px;height:26px;flex:none}
/* Section boundaries follow the text instead of covering longer content. */
.school-program{height:auto}
.school-program> *{flex-shrink:0}
.china-opportunities,.partnership,.china-language,.china-guidance,.china-universities,.china-universities.is-expanded{height:auto}
.partner-benefits article{display:flex;flex-direction:column;align-items:center;height:auto;min-height:241px;padding:35px 0 24px;gap:28px}
.partner-benefits .benefit-icon{position:static;transform:none;flex:none}
.partner-benefits article>span{position:static;transform:none;max-width:100%;margin:0}
.partner-benefits article:after{position:static;transform:none;flex:none;margin-top:auto}
@media(min-width:901px){
  .partnership{padding-bottom:80px}
  .hsk-row{grid-template-columns:minmax(0,430px) minmax(0,1fr);width:calc(100% - 128px);max-width:1312px;height:auto;min-height:258px;gap:64px;padding-bottom:40px}
  .hsk-row h2{overflow-wrap:normal;word-break:normal}
  .guidance-stage:not(.final-stage){height:auto;min-height:365px;padding-bottom:40px}
}
@media(max-width:900px){
  .partner-benefits article{min-height:210px;padding:18px 0 20px;gap:22px}
}
.thankyou-content{max-width:850px;margin:0 auto;padding:160px 24px 100px;text-align:center;min-height:65vh}
.thankyou-content h1{color:var(--cyan);margin:0 0 28px}
.thankyou-content p{margin:0 auto 36px;max-width:720px}
.thankyou-content .apply-button{display:inline-flex;align-items:center;justify-content:center;min-height:52px;padding:16px 28px}
.thankyou-content .thankyou-countdown{margin:24px 0 0;font-size:16px!important;color:var(--blue)}
@media(max-width:900px){.thankyou-content{padding-top:120px;padding-bottom:72px}}
/* Paragraph separation is semantic, not a hidden pair of line breaks. */
.admissions-apply .apply-intro+.apply-intro{margin-top:20px}
.psychology-service>.intro-block>p+p,.bullying-block>p+p,.voice-callout>p+p{margin-top:20px}
.bullying-block{height:auto;padding-bottom:60px}
.psychology-service>.intro-block,.voice-callout{height:auto;padding-bottom:60px}
.psychology-service,.student-voice{height:auto!important}
.qcs-prose-list{width:min(822px,100%);margin:20px auto;padding:0;list-style:none;text-align:center}
.qcs-prose-list li+li{margin-top:8px}
.photo-strip figure{display:flex;flex-direction:column;min-width:0}
.photo-strip figcaption{height:auto;min-height:72px;flex:1;display:flex;align-items:center;justify-content:center;padding:16px 12px;font-size:16px;line-height:1.5;overflow-wrap:break-word}
@media(max-width:900px){
  .photo-strip figcaption{font-size:14px;min-height:84px;padding:14px 10px}
}
@media(max-width:410px){.photo-strip{grid-template-columns:1fr}}

/* Native embeds do not inherit the spacing of the forms they replace. */
.admissions-apply>.qcs-bitrix-form{max-width:1001px;margin:36px auto 0}
.why-grid h3+p{margin-top:16px}
@media(min-width:1440px){
  .future-summary{top:268px}
  .future ul{top:370px}
  .future .more{top:558px}
}
/* Keep prose and lists in normal flow so text changes cannot close the gaps. */
.final-stage .guidance-details{display:flex;flex-direction:column;gap:20px}
.final-stage .guidance-details>b,.final-stage .guidance-details>p,.final-stage .guidance-details>.check-list{position:static!important;width:100%!important;margin:0!important}
.final-stage .guidance-details>.check-list li{height:auto!important;white-space:normal!important}
@media(min-width:901px){
  .final-stage{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:64px;width:100%;height:auto;min-height:1174px;padding:80px 64px;zoom:1!important}
  .final-stage h2,.final-stage>div:first-child>p,.final-stage .guidance-details{position:static!important;width:100%!important;height:auto!important;margin:0}
  .final-stage>div:first-child>p{margin-top:24px}
  .final-stage .stage-photos{display:grid;gap:28px;margin-top:40px}
  .final-stage .stage-photos img{position:static;width:100%;height:auto!important;aspect-ratio:571/332;object-fit:cover}
  .china-guidance{height:auto;padding-bottom:60px}
}
@media(max-width:900px){
  .stage-columns{row-gap:16px}
  .mobile-menu-group>button,.mobile-menu-direct{font-size:18px!important;line-height:1.4!important;min-height:60px;padding:14px 0;white-space:normal;overflow-wrap:break-word}
  .mobile-submenu a{font-size:16px!important;line-height:1.5!important;min-height:48px;padding:12px 16px;white-space:normal;overflow-wrap:break-word}
}
