@media (min-width:600px){
body.cfhi-d .topbar,body.cfhi-d .fx-stats,body.cfhi-d .cfhi-bc,body.cfhi-d .cfhi-gone{display:none!important}
/* footer */
body.cfhi-d footer.ft{background:#2A1B18!important;color:#EADFDA!important;padding:0!important;margin-top:64px!important}
body.cfhi-d footer.ft .ft-in{display:none!important}
body.cfhi-d .cfhi-ft{display:grid!important;grid-template-columns:1fr auto;grid-template-areas:"b tel" "ad soc" "lg c";gap:14px 48px;max-width:1120px;margin:0 auto;padding:40px 32px 24px;box-sizing:border-box;color:#EADFDA;font-size:13px;line-height:1.7}
body.cfhi-d .cfhi-ft a{color:#fff}
body.cfhi-d .cfhi-ft svg{width:22px;height:22px;fill:none!important}body.cfhi-d .cfhi-ft svg *{fill:none!important;stroke:currentColor!important}
body.cfhi-d .cfhi-ft .ft-b{grid-area:b;display:flex;align-items:center;gap:12px}
body.cfhi-d .cfhi-ft .ft-mark{width:48px;height:48px;border-radius:12px;background:#812D21;color:#fff;font:600 14px Kanit,sans-serif;display:flex;align-items:center;justify-content:center;flex:none}
body.cfhi-d .cfhi-ft .ft-n{font-family:Kanit,sans-serif;font-weight:600;font-size:16px;color:#fff;line-height:1.35}
body.cfhi-d .cfhi-ft .ft-tel{grid-area:tel;display:flex;align-items:center;gap:10px;justify-content:flex-end}
body.cfhi-d .cfhi-ft .ft-tel>div{margin-right:4px}
body.cfhi-d .cfhi-ft .ft-tel small{display:block;font-size:12px}
body.cfhi-d .cfhi-ft .ft-tel strong{font-family:Kanit,sans-serif;font-size:24px;font-weight:600;color:#fff}
body.cfhi-d .cfhi-ft .ft-tel a{width:44px;height:44px;border-radius:22px;border:1px solid rgba(255,255,255,.35);display:flex;align-items:center;justify-content:center;flex:none}
body.cfhi-d .cfhi-ft .ft-soc{grid-area:soc;display:flex;gap:8px;justify-content:flex-end}
body.cfhi-d .cfhi-ft .ft-soc a{height:44px;padding:0 18px;border-radius:22px;border:1px solid rgba(255,255,255,.35);display:flex;align-items:center;font-size:13px;font-weight:600}
body.cfhi-d .cfhi-ft .ft-ad{grid-area:ad;max-width:460px}
body.cfhi-d .cfhi-ft .ft-lg{grid-area:lg;display:flex;gap:0 20px;padding-top:14px;border-top:1px solid rgba(255,255,255,.16)}
body.cfhi-d .cfhi-ft .ft-lg a{min-height:36px;display:flex;align-items:center;text-decoration:underline;text-underline-offset:3px}
body.cfhi-d .cfhi-ft .ft-c{grid-area:c;text-align:right;font-size:12px;padding-top:14px;border-top:1px solid rgba(255,255,255,.16);opacity:.85}
/* home trims */
body.cfhi-d.cfhi-home #students~section{display:none!important}
body.cfhi-d.cfhi-home #apply .card:nth-child(3){display:none!important}
body.cfhi-d.cfhi-home #students tr{display:none!important}
body.cfhi-d.cfhi-home #students tr.cfhi-show{display:table-row!important;background:#812D21!important;color:#fff}
body.cfhi-d.cfhi-home #students tr.cfhi-show td{background:transparent!important;color:#fff!important;border:0!important;padding:16px 20px!important;font-size:16px}
body.cfhi-d.cfhi-home #students tr.cfhi-show td:last-child{font-weight:700;text-align:right}
body.cfhi-d.cfhi-home #students table{border-radius:14px;overflow:hidden;min-width:0!important;width:100%}
/* accordions on inner pages (not students) */
body.cfhi-d:not(.cfhi-stu) .sec.cfhi-acc,body.cfhi-d:not(.cfhi-stu) .sec.alt.cfhi-acc,body.cfhi-d:not(.cfhi-stu) .fx-f.cfhi-acc,body.cfhi-d:not(.cfhi-stu) .split>.cfhi-acc{background:#fff!important;border:1px solid #E6DCD3;border-radius:16px;padding:0!important;overflow:hidden;box-shadow:none!important}
body.cfhi-d:not(.cfhi-stu) .sec.cfhi-acc{max-width:1120px;width:calc(100% - 64px)!important;margin:0 auto 14px!important;box-sizing:border-box}
body.cfhi-d:not(.cfhi-stu) .split>.cfhi-acc{margin:0!important;width:auto!important}
body.cfhi-d:not(.cfhi-stu) .cfhi-acc>.cfhi-ah{display:flex!important;align-items:center;gap:12px;min-height:64px;box-sizing:border-box;padding:10px 24px!important;margin:0!important;font-size:18px!important;font-weight:600!important;line-height:1.4!important;color:#2A1B18;cursor:pointer}
body.cfhi-d:not(.cfhi-stu) .cfhi-acc>.cfhi-ah::after{content:"";margin-left:auto;flex:none;width:22px;height:22px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A7A74' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center/22px no-repeat}
body.cfhi-d:not(.cfhi-stu) .cfhi-open>.cfhi-ah{color:#812D21}
body.cfhi-d:not(.cfhi-stu) .cfhi-open>.cfhi-ah::after{transform:rotate(180deg)}
body.cfhi-d:not(.cfhi-stu) .cfhi-acc>.cfhi-ab{padding:0 24px 24px}
body.cfhi-d:not(.cfhi-stu) .cfhi-acc:not(.cfhi-open)>.cfhi-ab{display:none!important}
body.cfhi-d:not(.cfhi-stu) .cfhi-ab>.wrap{padding:0!important;max-width:none!important}
body.cfhi-d:not(.cfhi-stu) .cfhi-ab>*:first-child{margin-top:0!important}
body.cfhi-d:not(.cfhi-stu) .sec.cfhi-acc .wrap.cfhi-acc{width:auto}
/* heritage / contact (phone-only JS content, now on desktop too) */
body.cfhi-d .cfhi-jack{max-width:1120px;margin:20px auto 0;padding:18px 24px;border-radius:16px;background:#F3E4E0;display:flex;align-items:center;gap:16px;box-sizing:border-box;width:calc(100% - 64px)}
body.cfhi-d .cfhi-jack>div{flex:1;line-height:1.4}
body.cfhi-d .cfhi-jack span{display:block;font-size:13px;color:#5B4A45}
body.cfhi-d .cfhi-jack b{display:block;font-family:Kanit,sans-serif;font-size:18px;color:#2A1B18}
body.cfhi-d .cfhi-jack strong{font-family:Kanit,sans-serif;font-size:30px;color:#812D21;font-weight:600}
body.cfhi-d .cfhi-jack a{width:56px;height:56px;border-radius:28px;background:#812D21;color:#fff;display:flex;align-items:center;justify-content:center;flex:none}
body.cfhi-d .cfhi-jack svg,body.cfhi-d .cfhi-jack svg *{fill:none!important;stroke:currentColor!important}
body.cfhi-d .cfhi-jack svg{width:26px;height:26px}
body.cfhi-d .cfhi-jk{display:inline-flex!important}
}

/* d2 */
@media (min-width:600px){
body.cfhi-d.cfhi-home #programmes .grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:20px!important}
body.cfhi-d.cfhi-home #programmes .pcard{display:flex!important;flex-direction:column!important;grid-column:auto!important;grid-row:auto!important;min-height:0!important}
body.cfhi-d.cfhi-home #programmes .pcard>img{width:100%!important;height:auto!important;max-height:none!important;aspect-ratio:4/3;object-fit:cover;object-position:50% 18%}
body.cfhi-d.cfhi-home #programmes .pcard .body{padding:20px!important;flex:1;display:flex;flex-direction:column}
body.cfhi-d.cfhi-home #programmes .pcard .more{margin-top:auto;padding-top:8px}
}
@media (min-width:1000px){body.cfhi-d.cfhi-home #programmes .grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}}

/* d3 */
@media (min-width:600px){body.cfhi-d.cfhi-home #programmes .pcard>img{flex:0 0 auto!important;min-height:0!important;height:auto!important}}

/* d4 */
@media (min-width:600px){body.cfhi-d .cfhi-jack{display:flex!important}}

/* d5 */
@media (min-width:600px){body.cfhi-d.cfhi-home #programmes .pcard>img{order:-1!important}body.cfhi-d.cfhi-home #programmes .pcard>.body{order:1!important}}

/* d6 */
@media (min-width:600px){
body.cfhi-d:not(.cfhi-stu) .hd-in{display:flex;align-items:center;gap:12px}
body.cfhi-d .hd-in .brand{margin-right:auto}
body.cfhi-d .hd-in .cfhi-lg{display:inline-flex!important;order:2;align-items:center;gap:6px;min-width:0;width:auto;height:44px;padding:0 6px;color:#2A1B18;font:600 13px/1 'Noto Sans Thai',sans-serif;text-decoration:none}
body.cfhi-d .hd-in .cfhi-lg>span{display:none}
body.cfhi-d .hd-in .cfhi-lg .cfhi-cur{display:inline;font:inherit}
body.cfhi-d .hd-in .cfhi-ph{display:inline-flex;order:3;align-items:center;justify-content:center;width:48px;height:48px;border:1px solid #D9CBC4;border-radius:50%;color:#812D21;background:#fff}
body.cfhi-d .hd-in .cfhi-hcta{display:inline-flex;order:4;align-items:center;height:44px;padding:0 22px;border-radius:22px;background:#812D21;color:#fff;font:600 15px/1 'Noto Sans Thai',sans-serif;text-decoration:none;white-space:nowrap}
body.cfhi-d .hd-in nav.main{order:1}
body.cfhi-d .hd-in nav.main li.cta{display:none!important}
}
@media (min-width:600px) and (max-width:999px){
body.cfhi-d .hd-in .cfhi-ph{display:none}
body.cfhi-d .hd-in nav.main{order:5}
}

/* d7 */
@media (min-width:1000px){
body.cfhi-d section.hero:has(dl)>.split{display:grid;grid-template-columns:minmax(0,1fr) 340px;grid-template-rows:auto auto auto 1fr;column-gap:32px;row-gap:0;align-items:start}
body.cfhi-d section.hero:has(dl)>.split>div:first-child{display:contents}
body.cfhi-d section.hero:has(dl) .stripe{display:none}
body.cfhi-d section.hero:has(dl) h1{grid-column:1/3;grid-row:1;margin:0 0 20px}
body.cfhi-d section.hero:has(dl)>.split>img{grid-column:1;grid-row:2/5;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:16px}
body.cfhi-d section.hero:has(dl) dl{grid-column:2;grid-row:2;margin:0;padding:20px 20px 8px;background:#fff;border:1px solid #E8DDD6;border-bottom:0;border-radius:16px 16px 0 0}
body.cfhi-d section.hero:has(dl) dt:nth-of-type(3),body.cfhi-d section.hero:has(dl) dd:nth-of-type(3){display:none}
body.cfhi-d section.hero:has(dl)>.split>div:first-child>div:last-child{grid-column:2;grid-row:3;display:flex;flex-direction:column;gap:10px;padding:12px 20px 20px;background:#fff;border:1px solid #E8DDD6;border-top:0;border-radius:0 0 16px 16px}
body.cfhi-d section.hero:has(dl) .btn{width:100%;text-align:center;justify-content:center;margin:0}
}
@media (min-width:600px){
body.cfhi-d main>section:last-of-type:not(.hero) h2~a{display:flex;justify-content:space-between;align-items:center;padding:14px 4px;border-top:1px solid #E8DDD6;text-decoration:none;color:#2A1B18;font-weight:600}
}

/* d8 */
@media (min-width:600px){
body.cfhi-d main:has(.cfhi-sn)>section.hero a.btn{display:none}
body.cfhi-d .cfhi-sn{display:flex;gap:8px;flex-wrap:wrap;padding-top:16px;padding-bottom:4px}
body.cfhi-d .cfhi-sn a{padding:9px 16px;border:1px solid #D9CBC4;border-radius:999px;background:#fff;color:#2A1B18;font:600 14px/1.2 'Noto Sans Thai',sans-serif;text-decoration:none}
}
@media (min-width:1000px){
body.cfhi-d main:has(.cfhi-sn){display:grid;grid-template-columns:260px minmax(0,1fr);column-gap:32px;max-width:1280px;margin:0 auto;padding:0 16px;align-items:start}
body.cfhi-d main:has(.cfhi-sn)>*{grid-column:2;margin-left:0!important;margin-right:0!important;max-width:none!important;width:auto!important}
body.cfhi-d main:has(.cfhi-sn)>.cfhi-bc,body.cfhi-d main:has(.cfhi-sn)>section.hero{grid-column:1/3}
body.cfhi-d main:has(.cfhi-sn)>.cfhi-sn{grid-column:1;grid-row:2/40;position:sticky;top:96px;flex-direction:column;gap:2px;padding:12px;background:#fff;border:1px solid #E8DDD6;border-radius:16px;margin-top:16px!important}
body.cfhi-d .cfhi-sn a{border:0;border-radius:10px;background:transparent;padding:12px 14px}
body.cfhi-d .cfhi-sn a:hover{background:#F7EFEA;color:#812D21}
}

/* d9 */
@media (min-width:600px){
body.cfhi-d .cfhi-ah .cfhi-n{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:24px;margin-left:10px;padding:0 8px;border-radius:12px;background:#F7EFEA;color:#812D21;font:600 13px/1 'Noto Sans Thai',sans-serif;vertical-align:middle}
body.cfhi-d .pgrid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important}
}
@media (min-width:1000px){body.cfhi-d .pgrid{grid-template-columns:repeat(4,minmax(0,1fr))!important}}

/* d10 */
@media (min-width:600px){
body.cfhi-d #quick .grid:has(.cfhi-tile){display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:16px!important}
body.cfhi-d #quick .cfhi-tile{position:relative;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:22px 14px!important;text-align:center;border-radius:16px!important}
body.cfhi-d #quick .cfhi-tile .cfhi-ic{display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:24px;flex:none}
body.cfhi-d #quick .cfhi-tile .cfhi-ic svg{width:26px;height:26px}
body.cfhi-d #quick .cfhi-tile .body{padding:0!important;display:block;width:100%}
body.cfhi-d #quick .cfhi-tile h3{margin:0!important;font:600 14px/1.35 'Noto Sans Thai',sans-serif!important}
body.cfhi-d #quick .cfhi-tile p{display:none!important}
body.cfhi-d #quick .cfhi-tile .more{position:absolute;inset:0;font-size:0!important;z-index:1}
}
@media (min-width:1000px){body.cfhi-d #quick .grid:has(.cfhi-tile){grid-template-columns:repeat(6,minmax(0,1fr))!important}}

/* d11 */
@media (min-width:600px){
body.cfhi-d.cfhi-flat .cfhi-ab .card:not(.cfhi-tile):not(.pcard){border:0!important;box-shadow:none!important;background:transparent!important;padding:0!important;border-radius:0!important}
body.cfhi-d.cfhi-flat .cfhi-ab .card:not(.cfhi-tile):not(.pcard) .body{padding:0!important}
}

/* d12 */
@media (min-width:1000px){
html body.cfhi-d main:has(.cfhi-sn)>section{width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important;justify-self:stretch;box-sizing:border-box}
}

/* d13 */
@media (min-width:600px){
body.cfhi-d .cfhi-calsec{display:block;max-width:1120px;margin:32px auto 0;padding:0 16px;box-sizing:border-box}
body.cfhi-d .cfhi-calsec h2{margin:0 0 14px;font:600 24px/1.3 'Kanit','Noto Sans Thai',sans-serif;color:#2A1B18}
body.cfhi-d .cfhi-cal{border:1px solid #E6DCD3;border-radius:16px;background:#fff;overflow:hidden}
body.cfhi-d .cfhi-cr{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 22px;border-top:1px solid #F0E6E1;font-size:15px;color:#2A1B18}
body.cfhi-d .cfhi-cr:first-child{border-top:0}
body.cfhi-d .cfhi-cr b{font-weight:600;white-space:nowrap}
body.cfhi-d .cfhi-cr.on{background:#812D21;color:#fff;font-weight:600}
body.cfhi-d .cfhi-ah .cfhi-hic{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:20px;margin-right:12px;vertical-align:middle}
body.cfhi-d .cfhi-hic svg{width:22px;height:22px}
}

/* d14 */
@media (min-width:600px){
body.cfhi-d .cfhi-spw{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;max-width:1120px;margin:0 auto 24px;padding:0 16px;box-sizing:border-box}
body.cfhi-d .cfhi-spr{display:flex;align-items:center;gap:14px;padding:18px 20px;background:#fff;border:1px solid #E6DCD3;border-radius:14px}
body.cfhi-d .cfhi-spi{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:22px;flex:none}
body.cfhi-d .cfhi-spi svg{width:24px;height:24px}
body.cfhi-d .cfhi-spb{flex:1;min-width:0}
body.cfhi-d .cfhi-spa{display:block;font:600 16px/1.4 'Noto Sans Thai',sans-serif;color:#2A1B18;text-decoration:none}
body.cfhi-d .cfhi-sps,body.cfhi-d .cfhi-spc{display:block;font-size:13px;line-height:1.6;color:#5B4A45;margin-top:2px}
body.cfhi-d .cfhi-spc a{color:#812D21;font-weight:600;text-decoration:none}
body.cfhi-d .cfhi-spg{display:flex;align-items:center;color:#8A7A74}
body.cfhi-d .cfhi-spg svg{width:18px;height:18px}
body.cfhi-d.cfhi-sp-on #phet-nueng,body.cfhi-d.cfhi-sp-on #heritage{display:none!important}
}

/* d15 home news compact */
@media(min-width:600px){
body.cfhi-d #news-list{gap:16px!important}
body.cfhi-d #news-list>article.card{display:flex!important;flex-direction:row!important;align-items:center;gap:12px;padding:12px!important;border-radius:14px}
body.cfhi-d #news-list>article.card>img{flex:0 0 76px;width:76px!important;height:76px!important;aspect-ratio:auto!important;object-fit:cover;border-radius:10px!important}
body.cfhi-d #news-list>article.card>.body{padding:0!important;min-width:0}
body.cfhi-d #news-list>article.card h3{font-size:15px!important;line-height:1.4!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:2px 0 0!important}
body.cfhi-d #news-list>article.card .meta{margin:0!important;font-size:12px!important}
}

/* d16 people: hide duplicate count text */
@media(min-width:600px){ body.cfhi-d .sec-h:has(.cfhi-n)>span.meta{display:none!important} }

/* d17 one content width (1120) like the mockup */
@media(min-width:1180px){
body.cfhi-d .hd .hd-in{max-width:1152px!important;margin-left:auto!important;margin-right:auto!important}
body.cfhi-d main>section.wrap:not(.cfhi-acc),body.cfhi-d main>div.wrap:not(.cfhi-acc){padding-left:max(16px,calc((100% - 1120px) / 2))!important;padding-right:max(16px,calc((100% - 1120px) / 2))!important;max-width:none!important}
}

/* d18 subpages like mockup: no pink hero band, breadcrumb instead of eyebrow; heritage Jack card in hero */
@media(min-width:600px){
body.cfhi-d.cfhi-sub main>section.hero{background:transparent!important;padding-top:8px!important}
body.cfhi-d.cfhi-sub main>section.hero::before{display:none!important}
body.cfhi-d.cfhi-sub section.hero p.meta{display:none!important}
body.cfhi-d.cfhi-sub:not(.page-id-11086):not(.page-id-11120) .cfhi-bc{display:block!important;padding-top:28px!important;padding-bottom:0!important}
body.cfhi-d.cfhi-sub .cfhi-bc .crumb{font-size:13px!important;color:#7A6A65!important;margin:0!important}
body.cfhi-d.cfhi-sub .cfhi-bc .crumb a{color:inherit!important;text-decoration:none!important}
body.cfhi-d.cfhi-sub.page-id-11086 main>section.hero,body.cfhi-d.cfhi-sub.page-id-11120 main>section.hero{padding-top:40px!important}
body.cfhi-d.page-id-11086 section.hero p.lead~div:has(>a.btn),body.cfhi-d.page-id-11120 section.hero p.lead~div:has(>a.btn){display:none!important}
body.cfhi-d section.hero .cfhi-jack{max-width:380px!important;width:auto!important;margin:20px 0 0!important;border-radius:16px!important}
}

/* d19 no hero lead on subpages (mockup), except heritage and students */
@media(min-width:600px){ body.cfhi-d.cfhi-sub:not(.page-id-11086):not(.page-id-11120):not(.page-id-11083):not(.page-id-11117) main>section.hero p.lead{display:none!important} }

/* d20 inner .wrap of plain sections at 1120 */
@media(min-width:1180px){ body.cfhi-d main>section:not(.cfhi-acc):not(.wrap)>.wrap{padding-left:max(16px,calc((100% - 1120px) / 2))!important;padding-right:max(16px,calc((100% - 1120px) / 2))!important;max-width:none!important} }

/* d21 header globe + phone like the mockup (were squeezed by flex) */
@media(min-width:600px){
body.cfhi-d .hd .hd-in>.cfhi-lg,body.cfhi-d .hd .hd-in>.cfhi-ph,body.cfhi-d .hd .hd-in>.cfhi-hcta{flex-shrink:0!important}
body.cfhi-d .hd .hd-in>.cfhi-lg{gap:6px!important;align-items:center!important;padding:0 6px!important;color:#2A1B18!important;font-weight:700!important;font-size:13px!important;line-height:1!important}
body.cfhi-d .hd .hd-in>.cfhi-lg svg{width:18px!important;height:18px!important;flex:0 0 18px!important;display:block!important}
body.cfhi-d .hd .hd-in>.cfhi-ph{width:40px!important;height:40px!important;flex:0 0 40px!important;padding:0!important;border:1px solid #E5D8D3!important;border-radius:50%!important;align-items:center!important;justify-content:center!important;color:#7F2A22!important;background:#fff!important}
body.cfhi-d .hd .hd-in>.cfhi-ph svg{width:18px!important;height:18px!important;flex:0 0 18px!important;display:block!important;transform:none!important}
body.cfhi-d .hd .hd-in>.cfhi-lg svg,body.cfhi-d .hd .hd-in>.cfhi-lg svg *,body.cfhi-d .hd .hd-in>.cfhi-ph svg,body.cfhi-d .hd .hd-in>.cfhi-ph svg *{fill:none!important;stroke:currentColor!important}
}

/* d22 EN header fits 1120 (longer menu labels) */
@media(min-width:1000px){
html[lang^="en"] body.cfhi-d .hd .hd-in{gap:14px!important}
html[lang^="en"] body.cfhi-d .hd .hd-in>.brand{max-width:250px!important;flex-shrink:1!important;min-width:0!important}
html[lang^="en"] body.cfhi-d .hd nav.main{min-width:0!important}
html[lang^="en"] body.cfhi-d .hd nav.main>ul>li>a,html[lang^="en"] body.cfhi-d .hd nav.main>ul>li>button{padding-left:9px!important;padding-right:9px!important;font-size:14px!important}
}
