/* ===== BAB EXAM CENTRE — design tokens ===== */
/* Fonts are now loaded via <link rel="preconnect"> + <link rel="stylesheet"> in <head> (see base template) instead of @import, to avoid render-blocking. */

:root{
  --navy:#00235F;
  --navy-2:#001739;
  --navy-soft:#0C3277;
  --gold:#F9BA00;
  --gold-2:#D89E00;
  --gold-text:#7A5C00;
  --bg:#FFFFFF;
  --bg-soft:#F5F7FB;
  --ink:#0E1A33;
  --ink-soft:#57607A;
  --line:#E3E7F0;
  --shadow: 0 20px 50px -20px rgba(0,35,95,0.25);
  --shadow-sm: 0 8px 24px -12px rgba(0,35,95,0.22);
  --radius: 16px;
  --font-ar: 'IBM Plex Sans Arabic', 'Tajawal', sans-serif;
  --font-en: 'Inter', sans-serif;
  --container: 1180px;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
html[dir="rtl"] body{font-family:var(--font-ar);}
html[dir="ltr"] body{font-family:var(--font-en);}
body{
  margin:0; background:var(--bg); color:var(--ink);
  -webkit-font-smoothing:antialiased; line-height:1.65;
}
img{max-width:100%; display:block;}
a{color:inherit; text-decoration:none;}
ul{margin:0; padding:0; list-style:none;}
button{font-family:inherit; cursor:pointer;}
h1,h2,h3,h4{margin:0; line-height:1.25; font-weight:700;}
p{margin:0;}
.container{max-width:var(--container); margin-inline:auto; padding-inline:24px;}
:focus-visible{outline:3px solid var(--gold-text); outline-offset:2px;}
@media (prefers-reduced-motion: reduce){*{animation:none !important; transition:none !important;}}

/* Scroll-reveal: sections and cards fade/rise into view once, on first scroll into viewport */
.reveal{opacity:0; transform:translateY(18px); transition:opacity .6s ease, transform .6s ease;}
.reveal.is-visible{opacity:1; transform:translateY(0);}
.reveal-stagger > *{opacity:0; transform:translateY(18px); transition:opacity .5s ease, transform .5s ease;}
.reveal-stagger.is-visible > *{opacity:1; transform:translateY(0);}
.reveal-stagger.is-visible > *:nth-child(1){transition-delay:.05s;}
.reveal-stagger.is-visible > *:nth-child(2){transition-delay:.12s;}
.reveal-stagger.is-visible > *:nth-child(3){transition-delay:.19s;}
.reveal-stagger.is-visible > *:nth-child(4){transition-delay:.26s;}
.reveal-stagger.is-visible > *:nth-child(5){transition-delay:.33s;}
.reveal-stagger.is-visible > *:nth-child(6){transition-delay:.4s;}
@media (prefers-reduced-motion: reduce){
  .reveal, .reveal-stagger > *{opacity:1 !important; transform:none !important; transition:none !important;}
}

.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-size:13px; font-weight:700; letter-spacing:.06em;
  color:var(--navy); background:rgba(249,186,0,.18);
  padding:6px 14px; border-radius:999px; margin-bottom:16px;
}
.eyebrow.cambridge-product-name{
  background:none; padding:0 0 10px; border-radius:0; color:#000;
  font-family:Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size:14px; font-weight:800; letter-spacing:.08em;
  border-bottom:3px solid var(--gold); display:inline-block;
}
.bg-navy .eyebrow.cambridge-product-name{border-bottom-color:var(--gold);}
html[dir="ltr"] .eyebrow{text-transform:uppercase;}

/* Cambridge English Skills Test — mandatory product-name treatment: always plain black, never brand-coloured */
.cambridge-product-name, .cambridge-product-name a{color:#000 !important; font-weight:700; font-family:Arial, "Helvetica Neue", Helvetica, sans-serif;}
/* Dark-background exception: on the navy stats section and the footer, the product name must render in white so it stays legible */
.bg-navy .cambridge-product-name, .bg-navy .cambridge-product-name a,
.site-footer .cambridge-product-name, .site-footer .cambridge-product-name a{color:#fff !important;}

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:14px 26px; border-radius:12px; font-weight:700; font-size:15px;
  border:2px solid transparent; transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space:nowrap;
}
.btn:hover{transform:translateY(-2px);}
.btn-gold{background:var(--gold); color:var(--navy-2); box-shadow:var(--shadow-sm);}
.btn-gold:hover{background:var(--gold-2);}
.btn-outline{border-color:rgba(255,255,255,.35); color:#fff;}
.btn-outline:hover{border-color:#fff; background:rgba(255,255,255,.08);}
.btn-navy-outline{border-color:var(--navy); color:var(--navy);}
.btn-navy-outline:hover{background:var(--navy); color:#fff;}
.btn-wa{background:#25D366; color:#06301A;}
.btn-wa:hover{background:#1fb958;}
.btn-block{width:100%;}

/* ===== Header ===== */
.site-header{
  position:sticky; top:0; z-index:60; background:#fff;
  border-bottom:1px solid var(--line); transition:box-shadow .2s ease, padding .2s ease;
}
.site-header.is-scrolled{box-shadow:0 6px 24px -18px rgba(0,35,95,.4);}
.header-row{display:flex; align-items:center; justify-content:space-between; gap:20px; padding-block:14px;}
.brand{display:flex; align-items:center; gap:10px; font-weight:700; color:var(--navy);}
/* Horizontal wordmark logo: height-constrained, width flexes naturally to preserve aspect ratio */
.brand img{height:58px; width:auto; max-width:260px; object-fit:contain;}

.nav-desktop{display:flex; align-items:center; gap:2px;}
.nav-desktop > li{position:relative;}
.nav-desktop > li > a, .nav-desktop > li > button{
  display:flex; align-items:center; gap:6px; padding:10px 14px; border-radius:10px;
  font-weight:600; font-size:14.5px; color:var(--ink); background:none; border:none;
}
.nav-desktop > li > a:hover, .nav-desktop > li > button:hover{background:var(--bg-soft); color:var(--navy);}
.caret{width:9px; height:9px; border-inline-start:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(-45deg); margin-top:-3px;}
html[dir="rtl"] .caret{transform:rotate(135deg);}

.dropdown{
  position:absolute; top:calc(100% + 8px); inset-inline-start:0; min-width:230px;
  background:#fff; border:1px solid var(--line); border-radius:14px; box-shadow:var(--shadow);
  padding:8px; opacity:0; visibility:hidden; transform:translateY(6px); transition:all .18s ease;
}
.nav-desktop > li:hover .dropdown, .nav-desktop > li:focus-within .dropdown{opacity:1; visibility:visible; transform:translateY(0);}
.dropdown a{display:block; padding:10px 14px; border-radius:9px; font-size:14px; font-weight:600; color:var(--ink);}
.dropdown a:hover{background:var(--bg-soft); color:var(--navy);}

.header-actions{display:flex; align-items:center; gap:10px;}
.lang-toggle{
  display:flex; border:1px solid var(--line); border-radius:999px; padding:3px; background:var(--bg-soft);
}
.lang-toggle button{
  border:none; background:none; padding:6px 13px; border-radius:999px; font-size:13px; font-weight:700; color:var(--ink-soft);
}
.lang-toggle button.active{background:var(--navy); color:#fff;}
.burger{display:none; background:none; border:none; padding:8px;}
.burger span{display:block; width:22px; height:2px; background:var(--navy); margin:5px 0; border-radius:2px;}

.mobile-nav{
  display:none; position:fixed; inset:0; background:#fff; z-index:70; padding:20px 24px; overflow-y:auto;
}
.mobile-nav.open{display:block;}
.mobile-nav-top{display:flex; justify-content:space-between; align-items:center; margin-bottom:20px;}
.mobile-nav .close-x{background:none; border:none; font-size:26px; color:var(--navy); line-height:1;}
.mobile-nav details{border-bottom:1px solid var(--line); padding:14px 0;}
.mobile-nav summary{font-weight:700; font-size:16px; color:var(--navy); cursor:pointer; list-style:none; display:flex; justify-content:space-between;}
.mobile-nav summary::-webkit-details-marker{display:none;}
.mobile-nav a{display:block; padding:12px 0; font-weight:600;}
.mobile-nav .mobile-link{border-bottom:1px solid var(--line); padding:14px 0; font-weight:700; color:var(--navy); font-size:16px;}

@media (max-width:980px){
  .nav-desktop, .header-actions .lang-toggle-desktop{display:none;}
  .burger{display:block;}
}

/* ===== Hero ===== */
.hero{
  background:linear-gradient(180deg,#fff 0%, var(--bg-soft) 100%);
  padding-block:64px 90px; position:relative; overflow:hidden;
}
.hero-grid{display:grid; grid-template-columns:1.05fr .95fr; gap:56px; align-items:center;}
@media (max-width:960px){.hero-grid{grid-template-columns:1fr; text-align:center;}}
.hero h1{font-size:clamp(30px,4.2vw,48px); color:var(--navy); margin-bottom:20px;}
.hero .lede{font-size:18px; color:var(--ink-soft); max-width:56ch; margin-bottom:30px;}
/* About page hero — refined typography hierarchy & line spacing */
body[data-page="about"] .hero h1{line-height:1.35; letter-spacing:-.01em; margin-bottom:14px;}
body[data-page="about"] .hero .section-head p[data-i18n="a_sub"]{line-height:1.7; font-size:17px;}
@media (max-width:960px){.hero .lede{margin-inline:auto;}}
.hero-ctas{display:flex; gap:14px; flex-wrap:wrap; margin-bottom:30px;}
@media (max-width:960px){.hero-ctas{justify-content:center;}}
.hero-wa-link{display:inline-flex; align-items:center; gap:6px; font-size:13.5px; font-weight:700; color:#1f9e52; margin-bottom:22px;}
.hero-wa-link:hover{text-decoration:underline;}
.trust-line{display:flex; gap:10px; flex-wrap:wrap; font-size:13px; font-weight:700; color:var(--navy-soft);}
@media (max-width:960px){.trust-line{justify-content:center;}}
.trust-line span{background:#fff; border:1px solid var(--line); padding:7px 13px; border-radius:999px;}

/* Hero visual (arch frame removed per brand update — plain image/logo now) */
.hero-visual{display:flex; align-items:center; justify-content:center;}
.hero-report-img{max-width:420px; width:100%; height:auto; aspect-ratio:640/900; object-fit:contain; border-radius:20px; box-shadow:var(--shadow);}
.hero-version-logo{max-width:460px; width:100%; height:auto;}
@media (max-width:960px){.hero-report-img{max-width:260px;} .hero-version-logo{max-width:300px; margin-inline:auto;}}

/* CEST wordmark — plain black text lockup (Cambridge product-name rule: always black, never decorative or brand-coloured) */
.cest-wordmark{display:inline-flex; flex-direction:column; align-items:center; line-height:1.15; color:#000; font-family:'Inter', sans-serif;}
.cest-wordmark .cw-cambridge{font-weight:600; font-size:0.4em; letter-spacing:.01em; margin-bottom:2px;}
.cest-wordmark .cw-main{font-weight:800; font-size:1em;}
.cest-wordmark .cw-sub{font-weight:700; font-size:0.62em; margin-top:-2px;}

/* ===== generic section rhythm ===== */
section{padding-block:76px;}
.section-head{max-width:680px; margin-bottom:44px;}
.section-head.center{margin-inline:auto; text-align:center;}
.section-head h2{font-size:clamp(24px,3vw,34px); color:var(--navy);}
.section-head p{margin-top:12px; color:var(--ink-soft); font-size:16px;}
.bg-soft{background:var(--bg-soft);}
.bg-navy{background:var(--navy); color:#fff;}
.bg-navy .section-head h2, .bg-navy h3{color:#fff;}
.bg-navy .section-head p{color:rgba(255,255,255,.72);}

/* divider: arch skyline */
.arch-divider{height:34px; background-image:radial-gradient(circle at center, transparent 0 60%, transparent 60%); }
.arch-skyline{display:block; width:100%; height:36px;}

/* ===== cards ===== */
.grid-3{display:grid; grid-template-columns:repeat(3,1fr); gap:24px;}
.grid-4{display:grid; grid-template-columns:repeat(4,1fr); gap:24px;}
.grid-2{display:grid; grid-template-columns:repeat(2,1fr); gap:24px;}
@media (max-width:860px){.grid-3, .grid-2{grid-template-columns:1fr;}}
@media (max-width:860px){.grid-4{grid-template-columns:1fr 1fr;}}
@media (max-width:520px){.grid-4{grid-template-columns:1fr;}}

.card{
  background:#fff; border:1px solid var(--line); border-radius:var(--radius);
  padding:30px 26px; box-shadow:var(--shadow-sm); position:relative;
}
.card .card-num{
  position:absolute; top:-14px; inset-inline-start:26px; width:40px; height:40px;
  border-radius:20px 20px 6px 6px; background:var(--gold); color:var(--navy-2);
  display:flex; align-items:center; justify-content:center; font-weight:800; font-size:14px;
}
.card .icon-arch{
  width:52px; height:52px; border-radius:26px 26px 6px 6px; background:var(--bg-soft);
  display:flex; align-items:center; justify-content:center; font-size:22px; margin-bottom:16px; color:var(--navy);
}
.card h3{color:var(--navy); font-size:19px; margin-bottom:10px;}
.card p{color:var(--ink-soft); font-size:14.5px; margin-bottom:16px;}
.card ul{display:flex; flex-direction:column; gap:8px; margin-bottom:18px;}
.card ul li{font-size:14px; color:var(--ink); position:relative;}
.card .card-link{font-weight:700; color:var(--navy); font-size:14.5px; display:inline-flex; gap:6px; align-items:center;}
.card .card-link:hover{color:var(--gold-text);}

/* value strip */
.value-strip{display:grid; grid-template-columns:repeat(4,1fr); gap:20px;}
@media (max-width:860px){.value-strip{grid-template-columns:repeat(2,1fr);}}
.value-item{text-align:center; padding:22px 12px; border-radius:14px; background:#fff; border:1px solid var(--line);}
.value-item .vi-icon{font-size:26px; margin-bottom:10px;}
.value-item h3{font-size:15px; color:var(--navy); margin-bottom:6px;}
.value-item p{font-size:13px; color:var(--ink-soft);}

/* timeline */
.timeline{display:flex; gap:0; counter-reset:step;}
@media (max-width:860px){.timeline{flex-direction:column; gap:26px;}}
.timeline .step{flex:1; position:relative; padding-inline-start:0; text-align:center;}
.timeline .step .dot{
  width:44px; height:44px; border-radius:22px 22px 6px 6px; background:var(--navy); color:var(--gold);
  display:flex; align-items:center; justify-content:center; font-weight:800; margin:0 auto 14px;
}
.timeline .step .connector{position:absolute; top:22px; inset-inline-start:calc(50% + 30px); width:calc(100% - 60px); height:2px; background:var(--line);}
.timeline .step:last-child .connector{display:none;}
@media (max-width:860px){.timeline .step .connector{display:none;}}
.timeline .step h3{font-size:15px; color:var(--navy); margin-bottom:8px;}
.timeline .step p{font-size:13.5px; color:var(--ink-soft); max-width:220px; margin-inline:auto;}

/* choosing guide / decision */
.decision-flow{display:flex; align-items:center; justify-content:center; gap:14px; flex-wrap:wrap; font-weight:700; color:var(--navy); margin-bottom:36px;}
.decision-flow .df-arrow{color:var(--gold-text); font-size:18px;}
html[dir="ltr"] .decision-flow .df-arrow{transform:none;}

/* FAQ */
.faq-list{max-width:820px; margin-inline:auto; display:flex; flex-direction:column; gap:12px;}
.faq-item{border:1px solid var(--line); border-radius:14px; background:#fff; overflow:hidden;}
.faq-item summary{
  list-style:none; cursor:pointer; padding:18px 22px; font-weight:700; color:var(--navy);
  display:flex; justify-content:space-between; align-items:center; gap:16px;
}
.faq-item summary::-webkit-details-marker{display:none;}
.faq-item summary::after{content:"+"; font-size:22px; color:var(--gold-text); flex-shrink:0;}
.faq-item[open] summary::after{content:"–";}
.faq-item .faq-a{padding:0 22px 20px; color:var(--ink-soft); font-size:14.5px; line-height:1.75;}

/* final CTA */
.final-cta{text-align:center; padding-block:80px; position:relative; overflow:hidden;}
.final-cta::before{content:""; position:absolute; inset:0; background:radial-gradient(ellipse 60% 100% at 50% 0%, rgba(249,186,0,.14), transparent 70%); pointer-events:none;}
.fc-card{position:relative; max-width:680px; margin-inline:auto; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.12); border-radius:24px; padding:44px 32px; backdrop-filter:blur(2px);}
.fc-eyebrow{display:inline-block; background:rgba(249,186,0,.14); color:var(--gold); font-weight:700; font-size:12.5px; letter-spacing:.03em; padding:6px 16px; border-radius:999px; margin-bottom:16px;}
.final-cta h2{color:#fff; font-size:clamp(26px,3.4vw,38px); margin-bottom:14px;}
.final-cta p{color:rgba(255,255,255,.75); max-width:52ch; margin-inline:auto; margin-bottom:26px;}
.final-cta .final-ctas{display:flex; gap:14px; justify-content:center; flex-wrap:wrap; margin-bottom:22px;}
.final-cta .btn-wa{display:inline-flex; align-items:center; gap:9px;}
.final-cta .wa-line{color:var(--gold); font-weight:700; font-size:13.5px;}

/* lead form */
.lead-form{background:#fff; border:1px solid var(--line); border-radius:20px; padding:30px; box-shadow:var(--shadow);}
.lead-form h3{color:var(--navy); font-size:20px; margin-bottom:6px;}
.lead-form .lf-sub{color:var(--ink-soft); font-size:13.5px; margin-bottom:22px;}
.form-row{display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px;}
@media (max-width:600px){.form-row{grid-template-columns:1fr;}}
.field{display:flex; flex-direction:column; gap:6px;}
.field label{font-size:13px; font-weight:700; color:var(--navy);}
.field input, .field select, .field textarea{
  border:1px solid var(--line); border-radius:10px; padding:12px 14px; font-size:14.5px; font-family:inherit; background:var(--bg-soft);
}
.field input:focus, .field select:focus, .field textarea:focus{background:#fff; border-color:var(--navy);}
.field.full{grid-column:1/-1;}
.form-note{font-size:12px; color:var(--ink-soft); margin-top:12px;}
.form-success{display:none; text-align:center; padding:30px 10px;}
.form-success .fs-icon{width:56px; height:56px; border-radius:28px 28px 6px 6px; background:var(--gold); color:var(--navy-2); font-size:26px; display:flex; align-items:center; justify-content:center; margin:0 auto 16px; font-weight:800;}

/* footer */
.site-footer{background:var(--navy-2); color:rgba(255,255,255,.78); padding-block:56px 26px;}
.footer-grid{display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:36px; margin-bottom:40px;}
@media (max-width:860px){.footer-grid{grid-template-columns:1fr 1fr;}}
.footer-brand{display:flex; align-items:center; gap:10px; color:#fff; font-weight:700; margin-bottom:14px;}
.footer-brand img{height:56px;}
.site-footer h2.footer-h{color:#fff; font-size:14px; margin-bottom:16px;}
.site-footer ul{display:flex; flex-direction:column; gap:10px;}
.site-footer a{font-size:14px;}
.site-footer a:hover{color:var(--gold);}
.footer-bottom{border-top:1px solid rgba(255,255,255,.12); padding-top:22px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; font-size:12.5px;}

/* cookie banner */
.cookie-banner{
  position:fixed; bottom:16px; inset-inline:16px; z-index:90; background:#fff; border:1px solid var(--line);
  border-radius:16px; box-shadow:var(--shadow); padding:18px 20px; display:none;
  max-width:760px; margin-inline:auto; align-items:center; gap:18px; flex-wrap:wrap;
}
.cookie-banner.show{display:flex;}
.cookie-banner p{font-size:13px; color:var(--ink-soft); flex:1; min-width:220px;}
.cookie-actions{display:flex; gap:10px;}
.cookie-actions button{padding:9px 16px; border-radius:9px; font-size:13px; font-weight:700; border:1px solid var(--line); background:#fff;}
.cookie-actions .accept{background:var(--navy); color:#fff; border-color:var(--navy);}

/* whatsapp float */
.wa-float{
  position:fixed; bottom:22px; inset-inline-end:22px; z-index:80; background:#25D366; color:#fff;
  width:56px; height:56px; border-radius:28px; display:flex; align-items:center; justify-content:center;
  font-size:26px; box-shadow:0 10px 24px -8px rgba(0,0,0,.4);
}

/* breadcrumb */
.breadcrumb{font-size:13px; color:var(--ink-soft); margin-bottom:18px;}
.breadcrumb a{color:var(--navy); font-weight:600;}

/* compare table */
.table-wrap{overflow-x:auto; border:1px solid var(--line); border-radius:16px;}
table.compare{width:100%; border-collapse:collapse; min-width:640px;}
table.compare th, table.compare td{padding:14px 16px; text-align:center; border-bottom:1px solid var(--line); font-size:14px;}
table.compare th{background:var(--bg-soft); color:var(--navy); font-size:13.5px;}
table.compare td:first-child, table.compare th:first-child{text-align:start; font-weight:700; color:var(--navy); background:var(--bg-soft);}
table.compare tr:last-child td{border-bottom:none;}

/* audience picker (compare quiz) */
.picker-options{display:grid; grid-template-columns:repeat(3,1fr); gap:14px;}
@media (max-width:760px){.picker-options{grid-template-columns:1fr;}}
.picker-opt{border:2px solid var(--line); border-radius:14px; padding:16px; text-align:center; background:#fff; font-weight:700; color:var(--navy);}
.picker-opt:hover{border-color:var(--gold);}
.picker-opt.selected{border-color:var(--navy); background:var(--bg-soft);}

/* wizard */
.wizard-result{display:none; margin-top:26px; padding:22px; border-radius:16px; background:var(--bg-soft); border:1px dashed var(--navy-soft); text-align:center;}
.wizard-result.show{display:block;}

/* test logos & CEST wordmark */
.test-logo{height:120px; width:auto; max-width:100%; margin:0 auto 14px; display:block;}
.hero-cest-badge{display:inline-flex; align-items:center; background:#fff; border:1px solid var(--line); border-radius:12px; padding:10px 18px; margin-bottom:18px; box-shadow:var(--shadow-sm);}
.hero-cest-badge img{height:40px; width:auto;}
.trust-logo-row{display:flex; justify-content:center; align-items:center; gap:24px; flex-wrap:wrap; margin-top:24px;}
.trust-logo-card{background:#fff; border-radius:14px; padding:16px 24px; display:flex; align-items:center;}
.trust-logo-card img{height:64px; width:auto;}
.hero-logo-pair{display:flex; align-items:center; justify-content:center; gap:18px; flex-wrap:wrap;}
.hero-logo-pair .divider{width:1px; height:60px; background:var(--line);}

/* My Best Score section */
.best-score-flow{display:flex; align-items:stretch; justify-content:center; gap:14px; margin-top:32px; flex-wrap:wrap;}
.bs-panel{background:#fff; border-radius:18px; padding:22px 20px 20px; box-shadow:var(--shadow-sm); flex:1 1 230px; max-width:260px; display:flex; flex-direction:column;}
.bs-panel h3{font-size:14.5px; font-weight:700; color:var(--navy); margin:0 0 16px; text-align:center;}
.bs-panel-final{background:var(--navy); box-shadow:var(--shadow);}
.bs-panel-final h3{color:var(--gold);}
.bs-bars{display:flex; align-items:flex-end; justify-content:center; gap:10px; height:120px;}
.bs-bars-single{justify-content:center;}
.bs-bar-col{display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; width:38px;}
.bs-lvl{font-size:11px; font-weight:700; color:var(--navy); margin-bottom:6px;}
.bs-panel-final .bs-lvl{color:#fff;}
.bs-bar{width:100%; border-radius:6px 6px 2px 2px; background:var(--navy-soft); min-height:10px;}
.bs-bar-low{background:#C7CEDD;}
.bs-bar-gold{background:var(--gold);}
.bs-skill{font-size:10.5px; color:var(--ink-soft); margin-top:8px; text-align:center;}
.bs-panel-final .bs-skill{color:rgba(255,255,255,.75);}
.bs-caption{font-size:12.5px; color:var(--ink-soft); line-height:1.6; text-align:center; margin-top:16px;}
.bs-panel-final .bs-caption{color:rgba(255,255,255,.85);}
.bs-arrow{display:flex; align-items:center; justify-content:center; color:var(--gold-text); flex:0 0 auto; align-self:center;}
html[dir="ltr"] .bs-arrow svg{transform:scaleX(-1);}
@media (max-width:860px){
  .best-score-flow{flex-direction:column; align-items:center;}
  .bs-panel{max-width:320px; width:100%;}
  .bs-arrow svg{transform:rotate(-90deg) !important;}
}
.hero-logo-pair img{max-height:70px; width:auto;}
.hero-logo-pair img.upa-logo{max-height:38px;}
.card .icon-arch img{height:26px; width:auto;}
.card .icon-arch svg{color:var(--navy);}
.value-item .vi-icon svg{color:var(--navy);}

/* CEFR ladder (in-house visual) */
.cefr-ladder{display:flex; align-items:flex-end; gap:10px; justify-content:center; padding:20px 10px 0;}
.cefr-step{display:flex; flex-direction:column; align-items:center; gap:8px; flex:1; max-width:90px; position:relative; cursor:pointer; border-radius:10px;}
.cefr-step .bar{width:100%; border-radius:10px 10px 4px 4px; background:linear-gradient(180deg, var(--gold) 0%, var(--gold-2) 100%); transition:transform .2s ease, filter .2s ease;}
.cefr-step:hover .bar, .cefr-step:focus-within .bar, .cefr-step.active .bar{transform:scaleX(1.12); filter:brightness(1.06);}
.cefr-step .lvl{font-weight:800; color:var(--navy); font-size:15px;}
.cefr-step .lbl{font-size:11.5px; color:var(--ink-soft); text-align:center;}
.cefr-caption{text-align:center; font-size:12.5px; color:var(--ink-soft); margin-top:14px;}
.cefr-tooltip{
  position:absolute; bottom:calc(100% + 10px); left:50%; transform:translateX(-50%) translateY(6px);
  width:200px; background:var(--navy-2); color:#fff; font-size:12.5px; line-height:1.6;
  padding:12px 14px; border-radius:12px; box-shadow:var(--shadow);
  opacity:0; visibility:hidden; transition:opacity .18s ease, transform .18s ease; z-index:20; text-align:center;
}
.cefr-tooltip::after{content:""; position:absolute; top:100%; left:50%; transform:translateX(-50%); border:6px solid transparent; border-top-color:var(--navy-2);}
.cefr-step:hover .cefr-tooltip, .cefr-step:focus-within .cefr-tooltip, .cefr-step.active .cefr-tooltip{
  opacity:1; visibility:visible; transform:translateX(-50%) translateY(0);
}
@media (max-width:600px){.cefr-tooltip{width:160px; font-size:11.5px;}}

/* resources reference image */
.reference-figure{border:1px solid var(--line); border-radius:16px; overflow:hidden; background:#fff; max-width:720px; margin-inline:auto;}
.reference-figure img{width:100%; display:block;}
.reference-figure figcaption{padding:14px 18px; font-size:12.5px; color:var(--ink-soft); border-top:1px solid var(--line);}

/* Cambridge stats strip */
.stat-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:20px; margin-bottom:36px;}
@media (max-width:860px){.stat-grid{grid-template-columns:repeat(2,1fr);}}
.stat-item{text-align:center;}
.stat-num{font-size:clamp(28px,3.6vw,42px); font-weight:800; color:var(--gold); line-height:1.1; margin-bottom:6px;}
.stat-label{font-size:11.5px; color:rgba(255,255,255,.78); max-width:18ch; margin-inline:auto;}
.stat-source{text-align:center; font-size:11.5px; color:rgba(255,255,255,.5); margin-top:6px;}
.trust-bar{background:var(--bg-soft); border-bottom:1px solid var(--line); font-size:12.5px; color:var(--ink-soft); text-align:center; padding:8px 12px;}
.trust-bar a{color:var(--navy); font-weight:700;}
.trust-bar .tb-short{display:none;}
@media (max-width:640px){
  .trust-bar .tb-full{display:none;}
  .trust-bar .tb-short{display:inline;}
}

/* inline CTA strip for content-only pages */
.inline-cta-strip{
  background:var(--bg-soft); border:1px solid var(--line); border-radius:14px;
  padding:16px 22px; display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
  margin-top:28px;
}
.inline-cta-strip p{font-weight:700; color:var(--navy); font-size:14.5px;}
.inline-cta-strip .btn{flex-shrink:0;}

/* ===== QA fixes (root-cause, no overflow-x:hidden band-aid) ===== */

/* CEFR: edge tooltips were centred on the outermost bars and spilled past the viewport.
   Anchor the first/last tooltip to their own bar's outer edge instead (logical props = correct in RTL and LTR). */
.cefr-step:first-child .cefr-tooltip{left:auto; right:auto; inset-inline-start:0; transform:translateY(6px);}
.cefr-step:last-child  .cefr-tooltip{left:auto; right:auto; inset-inline-end:0;   transform:translateY(6px);}
.cefr-step:first-child:hover .cefr-tooltip, .cefr-step:first-child:focus-within .cefr-tooltip, .cefr-step:first-child.active .cefr-tooltip,
.cefr-step:last-child:hover  .cefr-tooltip, .cefr-step:last-child:focus-within  .cefr-tooltip, .cefr-step:last-child.active  .cefr-tooltip{transform:translateY(0);}
.cefr-step:first-child .cefr-tooltip::after{left:auto; right:auto; inset-inline-start:22px; transform:none;}
.cefr-step:last-child  .cefr-tooltip::after{left:auto; right:auto; inset-inline-end:22px;   transform:none;}
@media (max-width:420px){ .cefr-tooltip{width:150px;} }

/* Header at very small widths: logo + gold CTA + burger don't fit in 320px.
   The same CTA stays one tap away in the mobile menu, the hero, and the WhatsApp button. */
@media (max-width:380px){
  .header-actions .btn-gold{display:none;}
  .brand img{height:44px; max-width:190px;}
}

/* Honeypot: visually-hidden clip pattern instead of parking it 9999px off-canvas. */
.hp-field{position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap; border:0;}

/* Touch targets: raise stacked/standalone links to >=24px tap height without visual redesign */
.site-footer ul{gap:4px;}
.site-footer ul a, .card ul a{display:inline-block; padding-block:6px;}
.breadcrumb a{display:inline-block; padding-block:5px;}
.hero-wa-link{padding-block:5px;}
.card .card-link{padding-block:4px;}
.site-footer h2.footer-h{font-size:14px; line-height:1.4;}
/* heading-level corrections: same visuals as the former h3s */
.card h2.card-h{color:var(--navy); font-size:19px; margin-bottom:10px;}
.value-item h2.vi-h{font-size:15px; color:var(--navy); margin-bottom:6px;}
.lead-form h2.lf-h{color:var(--navy); font-size:20px; margin-bottom:6px;}
/* inline links in running text must not rely on colour alone (WCAG 1.4.1) */
p a:not(.btn):not(.card-link), .faq-a a{text-decoration:underline; text-underline-offset:3px;}

/* Schools — results section */
.results-grid{display:grid; grid-template-columns:1.15fr .85fr; gap:40px; align-items:center; max-width:1040px; margin-inline:auto;}
.result-list{display:grid; grid-template-columns:1fr 1fr; gap:28px 32px;}
.result-item{display:flex; gap:14px; align-items:flex-start;}
.result-ico{flex:none; width:44px; height:44px; border-radius:12px; display:grid; place-items:center; background:rgba(249,186,0,.18); color:var(--navy);}
.result-ico svg{width:22px; height:22px;}
.result-item h3{color:var(--navy); font-size:17px; margin:2px 0 6px;}
.result-item p{color:var(--ink-soft); font-size:14.5px; line-height:1.7; margin:0;}
.result-demo{margin:0; background:var(--navy); border-radius:18px; padding:26px 26px 22px; color:#fff;}
.result-demo figcaption{font-size:14px; line-height:1.6; color:rgba(255,255,255,.85); margin-bottom:22px;}
.rp-bars{display:flex; align-items:flex-end; gap:12px; height:170px; border-bottom:1px solid rgba(255,255,255,.25);}
.rp-bar{flex:1; height:100%; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; position:relative;}
.rp-bar i{display:block; width:100%; background:rgba(255,255,255,.28); border-radius:6px 6px 0 0;}
.rp-bar:nth-child(3) i{background:var(--gold);}
.rp-bar b{position:absolute; top:100%; margin-top:8px; font:700 12px Arial,sans-serif; color:rgba(255,255,255,.85);}
.rp-bars{margin-bottom:34px;}
@media (max-width:960px){
  .results-grid{grid-template-columns:1fr; gap:28px;}
}
@media (max-width:560px){
  .result-list{grid-template-columns:1fr;}
}

/* Compare — collaboration panel */
.collab-panel{max-width:820px; margin-inline:auto; text-align:center; background:var(--bg-soft); border:1px solid var(--line); border-radius:20px; padding:44px 32px 36px;}
.collab-panel h2{margin-bottom:14px;}
.collab-sub{max-width:620px; margin:0 auto; color:var(--ink-soft); font-size:16px; line-height:1.9;}
.collab-cta{margin-top:28px; padding-top:26px; border-top:1px solid var(--line);}
.collab-prompt{font-weight:700; color:var(--navy); font-size:18px; margin-bottom:6px;}
.collab-note{color:var(--ink-soft); font-size:15px; margin-bottom:18px;}
.collab-btns{justify-content:center;}
@media (max-width:560px){.collab-panel{padding:32px 18px 26px;} .collab-btns .btn{width:100%;}}

/* CEFR ladder — keep six steps inside narrow phones */
.cefr-step{min-width:0;}
.cefr-step .lbl{overflow-wrap:anywhere; line-height:1.3;}
@media (max-width:420px){
  .cefr-ladder{gap:6px; padding-inline:2px;}
  .cefr-step .lvl{font-size:13px;}
  .cefr-step .lbl{font-size:10.5px;}
}

/* Level labels such as B1+ must not flip in RTL */
.cefr-step .lvl{direction:ltr; unicode-bidi:isolate;}

/* Comparison tables: wrap instead of side-scrolling on phones */
@media (max-width:640px){
  table.compare{min-width:0;}
  table.compare th, table.compare td{padding:10px 5px; font-size:12px; line-height:1.55; overflow-wrap:break-word; word-break:normal;}
  table.compare td:first-child, table.compare th:first-child{width:27%;}
  table.compare th{font-size:12px;}
  .table-wrap{border-radius:12px;}
}

/* General polish */
html{scroll-padding-top:84px; -webkit-text-size-adjust:100%;}
a, button{-webkit-tap-highlight-color:transparent;}
.btn{min-height:46px;}
.collab-btns{gap:12px;}
.card{transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;}
@media (hover:hover){.card:hover{transform:translateY(-3px); border-color:#D3D9E8;}}
@media (max-width:420px){
  .btn{white-space:normal; text-align:center; line-height:1.4; padding-inline:18px;}
  .container{padding-inline:18px;}
}
@media (prefers-reduced-motion: reduce){.card:hover{transform:none;}}

/* Resources page */
img{height:auto;}
.res-head{display:flex; align-items:center; gap:28px; margin-bottom:32px;}
.res-logo{height:104px; width:auto; max-width:46%; flex:none;}
.res-head h2{font-size:clamp(24px,3vw,34px); color:var(--navy);}
.res-head p{margin-top:8px; color:var(--ink-soft); font-size:16px; max-width:56ch;}
.res-card h3{font-size:18px; margin-bottom:14px;}
.res-list{display:flex; flex-direction:column; gap:8px; margin-bottom:0;}
.res-link{display:flex; align-items:center; gap:12px; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:#fff; color:var(--navy); font-weight:600; font-size:14.5px; transition:border-color .18s ease, background .18s ease;}
.res-link:hover{border-color:var(--gold); background:rgba(249,186,0,.08);}
.res-name{flex:1; direction:ltr; text-align:start; unicode-bidi:isolate;}
html[dir="rtl"] .res-name{text-align:right;}
.res-tag{font-size:12px; font-weight:700; color:var(--gold-text); background:rgba(249,186,0,.18); padding:3px 10px; border-radius:999px; white-space:nowrap;}
.res-arrow{flex:none; color:var(--ink-soft);}
html[dir="rtl"] .res-arrow{transform:scaleX(-1);}
.res-note{max-width:680px; display:flex; flex-direction:column; align-items:flex-start; gap:14px;}
.res-note p{margin:0;}
.tech-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:20px;}
.tech-item{background:#fff; border:1px solid var(--line); border-radius:16px; padding:22px 20px; border-top:3px solid var(--gold);}
.tech-item h3{font-size:16px; color:var(--navy); margin-bottom:8px; direction:ltr; unicode-bidi:isolate; text-align:start;}
html[dir="rtl"] .tech-item h3{text-align:right;}
.tech-item p{font-size:14px; color:var(--ink-soft); line-height:1.75; margin:0;}
.reference-figure{max-width:760px; box-shadow:var(--shadow-sm);}
.reference-figure img{width:100%; height:auto; background:#fff; padding:12px;}
@media (max-width:960px){.tech-grid{grid-template-columns:repeat(2,1fr);}}
@media (max-width:640px){
  .res-head{flex-direction:column; align-items:flex-start; gap:14px;}
  .res-logo{height:84px; max-width:70%;}
  .tech-grid{grid-template-columns:1fr;}
}
.res-list li{width:100%;}
.res-link{width:100%; box-sizing:border-box;}
.res-logo{height:128px;}
@media (max-width:640px){.res-logo{height:96px;}}
.card ul a.res-link{display:flex; padding:12px 14px;}

.form-error{display:none; margin:0 0 14px; padding:12px 14px; border-radius:10px; background:#FDECEC; color:#8A1C1C; font-size:14px; line-height:1.7;}
.form-error a{color:#8A1C1C; font-weight:700; text-decoration:underline;}
#lead-form button[disabled]{opacity:.65; cursor:wait;}

/* FAQ question with an inline product-name span: keep the text as one flowing line (summary was a flex row, which spread text/span apart) */
.faq-item summary{display:block; position:relative; padding-inline-end:56px;}
.faq-item summary::after{position:absolute; inset-inline-end:22px; top:50%; transform:translateY(-50%);}

/* CEFR ladder: fixed label height so every bar sits on the same baseline, whatever the label wraps to */
.cefr-step .lbl{min-height:4.2em; display:block;}
@media (max-width:420px){
  .cefr-ladder{gap:3px;}
  .cefr-step .lbl{font-size:8.8px; overflow-wrap:break-word; letter-spacing:-.1px;}
}
