:root{--portal-blue:#1687ef;--portal-dark:#182d38;--portal-green:#195953;--portal-line:#e1e4e7}
body.portal-page{margin:0;background:#fff;color:#1c2b36;font:16px/1.5 "Microsoft YaHei","PingFang SC",Arial,sans-serif}
.portal-width{width:min(1180px,calc(100% - 40px));margin-inline:auto}.portal-page [hidden]{display:none!important}
.portal-page :is(a,button,select,input):focus-visible{outline:3px solid #0762ae;outline-offset:3px}
#portal-dialog{width:min(498px,calc(100% - 24px));color:#203444;padding:26px;max-height:85dvh;overflow:auto}#portal-dialog h2{font-size:24px;margin:0 38px 18px 0}#portal-dialog h3{font-size:17px;margin:18px 0 8px}#portal-dialog p{font-size:15px;line-height:1.6;margin:10px 0}#portal-dialog form{display:grid;gap:10px}#portal-dialog input{box-sizing:border-box;width:100%;border:1px solid #acbfc8;border-radius:4px;padding:9px;font:inherit}.portal-dialog-close{position:absolute;right:13px;top:10px;font-size:24px;border:0;background:none;cursor:pointer}.portal-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:15px}.portal-actions button,#portal-dialog form button{padding:8px 13px;border:1px solid #b5c7c9;background:white;color:#16484a;border-radius:4px;cursor:pointer}.portal-actions .emphasis{background:#195953;color:white}.portal-gpa-line{display:grid;grid-template-columns:1fr 1fr;gap:10px}#portal-dialog output{font-weight:bold}
.portal-page .pd-footer { color:#cbd1d5; }
.portal-page .pd-foot-row a { padding-block:4px; }
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  .portal-page *, .portal-page *::before, .portal-page *::after { animation-duration:0s!important; transition-duration:0s!important; }
}

/* The image frames follow the original homepage: 211×100 countries, 60px school badges,
   280×74 rankings, 286×212 service covers and the 280×180 news lead. */
.pd-directory .pd-country-cover { isolation:isolate; }
.pd-directory .pd-country-cover::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg,rgba(10,29,38,.12),rgba(10,29,38,.32) 32%,rgba(10,29,38,.37) 70%,rgba(10,29,38,.18)); }
.pd-directory .pd-country-cover span { z-index:1; text-shadow:0 1px 4px rgba(0,0,0,.88),0 0 12px rgba(0,0,0,.62); }
.pd-directory .pd-emblem { overflow:hidden; }
.pd-directory .pd-emblem img { display:block; object-fit:cover; }
.pd-directory a.pd-rank { position:relative; isolation:isolate; overflow:hidden; color:#fff; }
.pd-rank>img { position:absolute; z-index:-2; inset:0; width:100%; height:100%; object-fit:cover; }
.pd-directory .pd-rank::before { content:""; position:absolute; z-index:-1; inset:0; background:linear-gradient(90deg,rgba(15,37,49,.48),rgba(15,37,49,.67) 46%,rgba(15,37,49,.43)); }
.pd-rank .pd-rank-label { display:grid; padding:0 8px; gap:2px; line-height:1.25; text-shadow:0 1px 4px rgba(0,0,0,.7); }
.pd-rank-label small { font:500 .84rem/1.15 Arial,sans-serif; }
.pd-rank-label strong { font-size:1rem; }
.pd-directory .pd-get { font-size:13px; font-weight:650; color:#fff; background:#a92c49; }
.pd-directory .pd-service-name { justify-items:start; gap:2px; padding:10px 15px; text-align:left; background:rgba(255,255,255,.9); }
.pd-service-name strong { color:#1b343f; font-size:1.04rem; line-height:1.35; }
.pd-service-name small { color:#4d626b; line-height:1.25; font-size:.82rem; }
.pd-directory .pd-news-cover span { white-space:normal; padding:5px 10px; line-height:1.4; background:rgba(13,34,48,.87); }
.portal-page .pd-en { color:#58666e; }
#portal-dialog .portal-actions .portal-detail-link { align-self:center; }
@media(max-width:800px){



  .pd-rank-label strong { font-size:.89rem; }
  .pd-rank-label small { font-size:.76rem; }
  .portal-page .pd-directory a.pd-rank { padding-block:3px; }
  .pd-directory .pd-service-name { padding:7px 10px; }
  .pd-service-name strong { font-size:.95rem; }
  .pd-directory .pd-get { font-size:12px; }
}
body.portal-page { --home-navy:#173955; --home-red:#b33748; --home-muted:#56677a; }
/* Shared navigation */
.portal-main { display:block; max-width:none; margin:0; padding:0; }
.portal-page .visually-hidden { position:absolute; width:1px; height:1px; margin:-1px; clip-path:inset(50%); overflow:hidden; white-space:nowrap; }
.portal-nav { position:relative; z-index:12; border-bottom:1px solid #dce3eb; background:white; }
.nav-inner,.portal-brand,.portal-logins,#portal-navigation { display:flex; align-items:center; }
.nav-inner { gap:clamp(18px,3vw,48px); min-height:64px; }
.portal-brand { gap:8px; color:var(--home-navy); text-decoration:none; white-space:nowrap; }
.portal-brand img { width:33px; height:33px; }
.portal-brand strong { font:750 21px/1.2 system-ui,sans-serif; }
#portal-navigation { position:relative; gap:clamp(12px,2vw,30px); min-width:0; }
.portal-nav button { font:inherit; cursor:pointer; }
#portal-navigation a,#portal-navigation button,.portal-logins button,.mobile-menu { border:0; background:none; color:var(--home-navy); text-decoration:none; font-size:15px; }
#portal-navigation>a,#tools-button,.portal-logins button { min-height:44px; padding:0; display:inline-flex; gap:8px; align-items:center; white-space:nowrap; }
#portal-navigation :is(a,button):hover,.portal-logins button:hover { color:var(--home-red); text-decoration:underline; text-underline-offset:4px; }
.nav-chevron { display:inline-block; width:7px; height:7px; transform:translateY(-2px) rotate(45deg); border:solid currentColor; border-width:0 1.5px 1.5px 0; }
[aria-expanded=true]>.nav-chevron { transform:translateY(2px) rotate(225deg); }
.portal-logins { margin-left:auto; gap:18px; }
.portal-logins button { font-size:14px; font-weight:550; }
.portal-logins button.student-entry { background:var(--home-red); color:white; border-radius:6px; padding:0 17px; min-height:40px; }
.portal-logins button.student-entry:hover { background:#93283a; color:white; }
.mobile-menu { display:none; }
#portal-tools { position:absolute; z-index:2; top:100%; right:0; padding:6px; border:1px solid #d9e2eb; border-radius:8px; background:white; box-shadow:0 12px 26px #173c441c; min-width:164px; }
#portal-tools>* { display:flex; align-items:center; width:100%; min-height:40px; padding:6px 12px; text-align:left; }
#portal-tools>*:hover { background:#f4f6fa; }
.pd-foot-row button { color:inherit; background:none; border:0; font:inherit; cursor:pointer; padding:4px 8px; }
@media(min-width:801px) and (max-width:1199px) { .portal-width {width:min(1000px,calc(100% - 40px));} }
@media(max-width:800px) {
  .portal-width { width:calc(100% - 32px); }
  .nav-inner { min-height:56px; gap:8px; }
  .portal-brand { gap:5px; }
  .portal-brand strong { font-size:18px; }
  .portal-brand img { width:27px; height:27px; }
  .mobile-menu { display:grid; place-items:center; width:44px; height:44px; padding:8px; cursor:pointer; }
  .menu-bars { position:relative; display:block; width:17px; height:12px; border-block:1.8px solid currentColor; }
  .menu-bars::after { position:absolute; content:""; left:0; right:0; top:50%; border-top:1.6px solid currentColor; transform:translateY(-50%); }
  #portal-navigation { display:none; position:absolute; inset:100% 0 auto; padding:8px 16px; gap:0; flex-wrap:wrap; border-bottom:1px solid #d4dce6; background:white; box-shadow:0 8px 16px #193c4212; }
  #portal-navigation.menu-open { display:flex; }
  #portal-navigation>a,#tools-button { flex:1 0 auto; justify-content:center; padding:0 8px; font-size:14px; }
  #portal-tools { position:static; width:100%; box-shadow:none; display:grid; grid-template-columns:1fr 1fr; border:0; border-top:1px solid #e1e6ee; border-radius:0; }
  .portal-logins { gap:10px; }
  .portal-logins button { font-size:13px; }
  .portal-logins button.student-entry { min-height:40px; padding:0 11px; }
}
@media(max-width:360px) {
  .nav-inner { gap:2px; }
  .portal-brand strong { font-size:16px; }
  .portal-brand img { width:24px; height:24px; }
  .portal-logins { gap:7px; }
  .portal-logins button.student-entry { padding-inline:8px; }
}

/* Homepage feature and directory entry points */
.hf { padding:24px 0 0; background:linear-gradient(#edf1f6 0%,#f6f7fa 83%,#fff 83%); }
.hf-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(270px,32%); gap:16px; }
.hf-story { position:relative; isolation:isolate; display:flex; align-items:center; overflow:hidden; min-height:270px; padding:32px clamp(24px,3.6vw,54px); border-radius:8px; background:#132e49; color:white; }
.hf-story .hf-photo { position:absolute; z-index:-2; inset:0; width:100%; height:100%; max-width:none; object-fit:cover; object-position:65% 55%; }
.hf-story::before { content:""; position:absolute; z-index:-1; inset:0; background:linear-gradient(90deg,rgba(10,31,53,.98) 0%,rgba(18,43,69,.93) 27%,rgba(17,39,63,.80) 43%,rgba(17,37,56,.27) 72%,rgba(14,32,47,.05) 100%); }
.hf-story-copy { width:100%; }
.hf .hf-edition { display:flex; align-items:center; gap:9px; margin:0 0 13px; color:white; font-size:14px; font-weight:600; line-height:1.2; }
.hf-edition::before { content:""; width:24px; height:3px; background:#f18d96; }
.hf #hf-title { margin:0; color:white; font:750 clamp(30px,3.5vw,50px)/1.22 system-ui,sans-serif; letter-spacing:-.035em; }
.hf #hf-title span { font-family:Georgia,serif; font-weight:500; letter-spacing:-.055em; }
.hf .hf-lede { max-width:29em; margin:14px 0 22px; color:#fff; font-size:15px; line-height:1.65; text-wrap:pretty; }
.hf .hf-story-link { display:inline-flex; align-items:center; gap:20px; min-height:36px; padding:0 0 2px; color:#fff; font-size:15px; font-weight:650; text-decoration:none; border-bottom:1px solid #ffffffa6; }
.hf-story-link:hover { border-bottom-color:#fff; }
.hf .hf-finder { display:flex; flex-direction:column; min-width:0; margin:0; padding:21px clamp(15px,2vw,27px); border:1px solid #d7dfe6; background:white; border-radius:8px; }
.hf #hf-finder-title { margin:0 0 14px; padding:0; color:#17354c; font:720 22px/1.25 system-ui,sans-serif; }
.hf-finder .hf-label,.hf-stages legend { margin:0 0 4px; padding:0; color:#445263; font:550 13px/1.3 system-ui,sans-serif; }
.hf-finder select { box-sizing:border-box; width:100%; min-height:40px; margin:0; padding:6px 10px; border:1px solid #bfccd7; border-radius:4px; background-color:white; color:#18374c; font:550 15px/1.35 system-ui,sans-serif; }
.hf-stages { min-width:0; margin:10px 0 13px; padding:0; border:none; }
.hf-choices { display:grid; grid-template-columns:repeat(3,1fr); border:1px solid #c6d1dc; border-radius:4px; background:#fff; }
.hf-choices label { position:relative; display:block; margin:0; padding:0; cursor:pointer; }
.hf-choices label+label { border-left:1px solid #c6d1dc; }
.hf-choices input { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.hf-choices span { display:grid; place-items:center; min-height:36px; color:#415366; font:500 14px/1.2 system-ui,sans-serif; }
.hf-choices input:checked+span { background:#e7edf3; color:#183955; box-shadow:inset 0 -2px #355873; font-weight:700; }
.hf-choices label:first-child span { border-radius:3px 0 0 3px; }
.hf-choices label:last-child span { border-radius:0 3px 3px 0; }
.hf .hf-submit { display:flex; align-items:center; justify-content:space-between; width:100%; min-height:42px; margin:auto 0 0; padding:6px 14px; border:0; border-radius:4px; background:var(--home-red); color:#fff; font:650 15px/1.3 system-ui,sans-serif; cursor:pointer; }
.hf .hf-submit:hover { background:#942b3a; }
.hf-shortcuts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin-top:12px; padding:7px 0; background:#fff; border:1px solid #d7dfe6; border-radius:6px; }
.hf-shortcuts a { display:flex; min-width:0; min-height:44px; align-items:center; justify-content:center; gap:11px; padding:0 7px; color:var(--home-navy); text-decoration:none; font-size:15px; font-weight:620; }
.hf-shortcuts a+a { border-left:1px solid #dfe5eb; }
.hf-shortcuts svg { flex:none; width:24px; height:24px; color:#9e3546; fill:none; stroke:currentColor; stroke-width:1.55; stroke-linecap:round; stroke-linejoin:round; }
.hf-shortcuts a:hover { color:var(--home-red); text-decoration:underline; text-underline-offset:3px; }
.hf :is(a,button,select):focus-visible,.hf-choices input:focus-visible+span { outline:3px solid #477dab; outline-offset:2px; }
.hf-story a:focus-visible { outline-color:white; }

@media(max-width:850px) {
  .hf { padding-top:16px; }
  .hf-layout { grid-template-columns:minmax(0,1fr) minmax(228px,33%); gap:12px; }
  .hf-story { padding:25px; }
  .hf .hf-lede { max-width:21em; }
}
@media(max-width:660px) {
  .hf { padding-top:12px; }
  .hf-layout { grid-template-columns:minmax(0,1fr); gap:9px; }
  .hf-story { min-height:0; padding:19px 20px 15px; }
  .hf-story::before { background:linear-gradient(90deg,rgba(10,31,53,.97),rgba(17,39,63,.85) 49%,rgba(13,33,54,.3)); }
  .hf .hf-edition { margin-bottom:6px; font-size:12px; }
  .hf #hf-title { font-size:clamp(27px,7.2vw,34px); }
  .hf .hf-lede { max-width:27em; margin:6px 0 4px; font-size:13px; line-height:1.5; }
  .hf .hf-story-link { min-height:38px; font-size:14px; }
  .hf .hf-finder { display:grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); column-gap:10px; padding:14px; align-items:end; }
  .hf #hf-finder-title { grid-column:1/-1; margin:0 0 11px; font-size:19px; }
  .hf-finder .hf-label { grid-area:2/1; }
  .hf-finder select { grid-area:3/1; }
  .hf-stages { grid-area:2/2/4/3; margin:0; }
  .hf-choices span { min-height:38px; }
  .hf .hf-submit { grid-column:1/-1; margin-top:11px; }
  .hf-shortcuts { grid-template-columns:repeat(2,minmax(0,1fr)); margin-top:9px; padding:0 8px; }
  .hf-shortcuts a { justify-content:flex-start; gap:9px; min-height:43px; padding-left:12px; font-size:14px; }
  .hf-shortcuts a:nth-child(odd) { border-left:0; }
  .hf-shortcuts a:nth-child(n+3) { border-top:1px solid #dfe5eb; }
  .hf-shortcuts svg { width:20px; height:20px; }
}

/* Product campaigns occupy only the left panel of the homepage feature. */
.hf .product-carousel { position:relative; isolation:isolate; display:grid; align-items:stretch; min-width:0; padding:0; background:#142d44; touch-action:pan-y pinch-zoom; }
.hf .product-carousel::before { content:none; }
.product-slide { --product-dark:12,31,56; position:relative; isolation:isolate; grid-area:1/1; display:grid; align-items:center; overflow:hidden; }
.product-slide[hidden], .product-controls[hidden] { display:none; }
.product-speaking { --product-dark:45,24,47; }
.product-mock { --product-dark:14,27,58; }
.product-ketpet { --product-dark:58,33,24; }
.product-ielts { --product-dark:25,45,37; }
.product-alevel { --product-dark:11,38,53; }
.product-slide .product-art { position:absolute; inset:0; z-index:-2; width:100%; max-width:none; height:100%; object-fit:cover; object-position:67% 50%; }
.product-slide::before { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(90deg,rgba(var(--product-dark),.94),rgba(var(--product-dark),.80) 25%,rgba(var(--product-dark),.38) 51%,rgba(var(--product-dark),.04) 80%),linear-gradient(0deg,rgba(10,19,27,.36),transparent 30%); }
.product-copy { min-width:0; padding:30px clamp(23px,3.1vw,46px) 66px; }
.product-copy :is(h1,h2) { margin:0; color:white; font:720 clamp(28px,3vw,44px)/1.25 system-ui,sans-serif; letter-spacing:-.035em; }
.product-copy p { margin:10px 0 13px; max-width:min(24em,57%); color:#fff; font-size:15px; line-height:1.6; text-wrap:pretty; }
.product-actions { display:flex; flex-wrap:wrap; gap:0 20px; }
.product-actions .product-action { display:inline-flex; align-items:center; gap:10px; min-height:36px; padding:0 0 1px; color:#fff; text-decoration:none; font-size:14px; font-weight:650; border-bottom:1px solid #ffffff9c; }
.product-actions .product-action:hover { border-color:#fff; }
.product-controls { position:absolute; z-index:1; bottom:10px; inset-inline:clamp(16px,3vw,44px) 12px; display:flex; align-items:center; justify-content:space-between; gap:6px; }
.product-picker,.product-steering { display:flex; align-items:center; }
.product-controls button { position:relative; display:grid; place-items:center; margin:0; padding:0; border:0; color:#fff; background:transparent; font:inherit; cursor:pointer; }
.product-picker button { width:26px; height:36px; }
.product-picker button span { display:block; width:16px; height:3px; border-radius:2px; background:rgba(255,255,255,.54); }
.product-picker button[aria-pressed=true] span { width:22px; height:4px; background:#fff; }
.product-steering { padding:1px 2px; border:1px solid #ffffff73; border-radius:20px; background:#101e2bc9; }
.product-steering button { width:34px; height:32px; border-radius:50%; font:normal 23px/1 Arial,sans-serif; }
.product-steering button:hover { background:#ffffff2b; }
.product-playback { display:block; height:11px; width:8px; box-sizing:border-box; border-inline:2px solid currentColor; }
.product-steering [data-paused=true] .product-playback { height:0; width:0; border:0; border-left:8px solid currentColor; border-block:5px solid transparent; }
.product-carousel :is(a,button):focus-visible { outline:2px solid white; outline-offset:2px; }
.product-directory { display:flex; flex-wrap:wrap; gap:7px 16px; padding:14px 0; font-size:14px; }
@media (prefers-reduced-motion:no-preference) {
  .product-slide.is-entering .product-art { animation:product-fade .34s ease-out; }
  @keyframes product-fade { from { opacity:.55; } to { opacity:1; } }
}
@media(max-width:660px) {
  .hf .product-carousel { min-height:192px; }
  .product-copy { padding:20px 17px 53px; }
  .product-copy :is(h1,h2) { font-size:clamp(26px,6.6vw,34px); }
  .product-copy p { max-width:57%; margin:6px 0; font-size:13px; line-height:1.45; }
  .product-slide::before { background:linear-gradient(90deg,rgba(var(--product-dark),.96) 0%,rgba(var(--product-dark),.88) 33%,rgba(var(--product-dark),.78) 49%,rgba(var(--product-dark),.47) 61%,rgba(var(--product-dark),.03) 82%),linear-gradient(0deg,rgba(10,19,27,.33),transparent 26%); }
  .product-controls { bottom:6px; inset-inline:12px 8px; }
  .product-slide .product-art { object-position:65% 50%; }
  .product-selector .product-art,.product-mock .product-art { object-position:right center; }
  .product-picker button { width:24px; }
}

/* These five product campaigns use a common signature and leave the subject in clear light. */
.product-slide.branded-product::before {
  background: linear-gradient(90deg, rgba(8, 24, 40, .69), rgba(8, 24, 40, .5) 34%, transparent 67%);
}
.branded-product .product-copy {
  padding: 19px clamp(23px, 3.1vw, 46px) 55px;
}
.branded-product .product-signature {
  display: block;
  width: 84px;
  height: auto;
  margin: 0 0 8px;
}
.branded-product .product-copy p {
  max-width: min(24em, 46%);
}
@media (max-width: 660px) {
  .hf .product-carousel { min-height: 338px; }
  .product-slide.branded-product { display: grid; grid-template-rows: clamp(132px, 37vw, 172px) 1fr; align-items: start; background: #11263b; }
  .product-slide.branded-product[hidden] { display: none; }
  .product-slide.branded-product::before { content: none; }
  .product-slide.branded-product .product-art {
    inset: 0 0 auto auto;
    height: clamp(132px, 37vw, 172px);
    object-fit: cover;
    object-position: 82% center;
  }
  .branded-product .product-copy {
    grid-row: 2;
    padding: 12px 16px 48px;
  }
  .branded-product .product-signature { position: absolute; left: 15px; top: 11px; width: 70px; }
  .branded-product .product-copy :is(h1,h2) { font-size: clamp(24px, 6.6vw, 30px); }
  .branded-product .product-copy p { max-width: 39em; margin: 5px 0 0; font-size: 13px; line-height: 1.5; }
  .branded-product .product-actions .product-action { min-height: 32px; font-size: 13px; }
}
