/* Education Malta V114: page-family polish, mobile-first layout audit, and language UI.
   Loaded last even in legacy static templates (which append CSS after wp_head). */
:root{--em114-red:#B51221;--em114-red-dark:#8E0D1B;--em114-cream:#FBF6F2;--em114-ink:#142639}
html,body{max-width:100%;overflow-x:clip}
/* Subpages: rich, stable Maltese-red brand masthead in place of anonymous white. */
body.ep-edition .em112-shell .em109-header,
body.ep-edition.em111-condensed .em112-shell .em109-header,
body:not(.em107-home):not(.ep-edition) .em112-shell .em109-header,
body:not(.em107-home):not(.ep-edition).em111-condensed .em112-shell .em109-header{
 background:var(--em114-red)!important;border-color:rgba(255,255,255,.20)!important;
 box-shadow:0 9px 30px rgba(69,8,17,.16)!important;color:#fff!important;
}
body.ep-edition .em112-shell .em109-brand span,
body.ep-edition .em112-shell .em109-brand b,
body.ep-edition .em112-shell .em109-menu-toggle,
body.ep-edition .em112-shell .em112-gooey-nav>a,
body.ep-edition.em111-condensed .em112-shell .em109-brand span,
body.ep-edition.em111-condensed .em112-shell .em109-brand b,
body.ep-edition.em111-condensed .em112-shell .em109-menu-toggle,
body.ep-edition.em111-condensed .em112-shell .em112-gooey-nav>a,
body:not(.em107-home):not(.ep-edition) .em112-shell .em109-brand span,
body:not(.em107-home):not(.ep-edition) .em112-shell .em109-brand b,
body:not(.em107-home):not(.ep-edition) .em112-shell .em109-menu-toggle,
body:not(.em107-home):not(.ep-edition) .em112-shell .em112-gooey-nav>a{
 color:#fff!important;text-shadow:none!important;
}
body.ep-edition .em112-shell .em109-menu-toggle,
body:not(.em107-home):not(.ep-edition) .em112-shell .em109-menu-toggle{border-left-color:rgba(255,255,255,.25)!important}
body.ep-edition .em112-shell .em113-fallback,
body:not(.em107-home):not(.ep-edition) .em112-shell .em113-fallback{background:#fff!important;box-shadow:0 4px 20px rgba(55,5,14,.15)!important}
body.ep-edition .em112-shell .em113-overlay-link,
body:not(.em107-home):not(.ep-edition) .em112-shell .em113-overlay-link{color:var(--em114-red)!important}
body.ep-edition .em112-shell .em113-overlay-link .em112-news-badge,
body:not(.em107-home):not(.ep-edition) .em112-shell .em113-overlay-link .em112-news-badge{background:#f9e2e4!important;color:var(--em114-red)!important}
body.ep-edition .em112-shell .em112-news-badge,
body:not(.em107-home):not(.ep-edition) .em112-shell .em112-news-badge{background:#fff!important;color:var(--em114-red)!important}
body.ep-edition .em112-shell .em113-actual-gooey>a:is(:hover,:focus-visible),
body:not(.em107-home):not(.ep-edition) .em112-shell .em113-actual-gooey>a:is(:hover,:focus-visible){color:#fff!important}
/* Keep the full menu readable; only the bar is red. */
body.ep-edition .em112-shell .em112-panel,
body:not(.em107-home):not(.ep-edition) .em112-shell .em112-panel{color:var(--em114-ink)!important}
/* Give different page types their own warm editorial canvas, rather than endless white. */
body.ep-edition{background:#FAF8F6!important}
body.ep-edition .ep-lead-section{background:#FAF5F0!important}
body.em107-type-directory .ep-lead-section{background:#F8F3EF!important}
body.em107-type-profile .ep-lead-section{background:#F5F4F0!important}
body.em107-type-newsroom .ep-lead-section{background:#F7F2F1!important}
body.em107-type-article .ep-lead-section{background:#F8F5F2!important}
body.em107-type-utility .ep-lead-section{background:#F8F6F2!important}
body.ep-edition .ep-feature{background:transparent!important}
body.ep-edition .ep-body{background:#FFFEFC!important}
body.ep-edition .ep-feature-topic{color:var(--em114-red)!important}
body.ep-edition .ep-breadcrumb b{color:var(--em114-red)!important}
body.ep-edition .ep-feature>img{box-shadow:0 14px 40px rgba(35,30,27,.13)}
/* Global emergency guards for imported WordPress content, nested grids and media. */
body.ep-edition main,body.ep-edition main *,body.em107-home #m-app *{min-width:0}
body.ep-edition main img,body.ep-edition main video,body.ep-edition main iframe,
body.ep-edition main svg{max-width:100%}
body.ep-edition .ep-body-main,body.ep-edition .ep-body-main article,
body.ep-edition .ep-body-main section,body.ep-edition .ep-body-main blockquote{overflow-wrap:break-word}
body.ep-edition .ep-body-main h1,body.ep-edition .ep-body-main h2,
body.ep-edition .ep-body-main h3{overflow-wrap:break-word;hyphens:auto}
body.ep-edition .ep-body-main a{overflow-wrap:anywhere}
body.ep-edition .ep-body-main table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
body.ep-edition .ep-body-main pre{max-width:100%;overflow:auto}
body.ep-edition .ep-feature h1{max-width:100%;overflow-wrap:break-word}
/* Language control lives on the hero, not inside the long navigation bar. */
body.em107-home #m-app .frame>.em114-lang-wrap{position:absolute;top:clamp(94px,12svh,136px);right:clamp(18px,4vw,70px);z-index:26;display:flex;align-items:center;gap:9px;padding:6px 8px;background:rgba(18,32,50,.61);border:1px solid rgba(255,255,255,.36);border-radius:100px;color:#fff;backdrop-filter:blur(14px);box-shadow:0 10px 30px rgba(0,0,0,.16)}
.em114-lang-wrap .em114-lang-title{font:600 10px/1.2 Inter,Arial,sans-serif;color:#e3e9f1;letter-spacing:.045em;padding:0 6px}
.em114-lang-wrap .em114-lang-items{display:flex;gap:3px;align-items:center}
.em114-lang-wrap .em114-lang-option{display:grid;place-items:center;min-height:32px;min-width:42px;border-radius:99px;padding:5px 8px;background:transparent;border:0;color:#fff!important;font:700 11px/1 Inter,Arial,sans-serif;text-decoration:none!important;white-space:nowrap}
.em114-lang-wrap .em114-lang-option[aria-current="true"]{color:var(--em114-red)!important;background:#fff!important}
.em114-lang-wrap .em114-lang-option[aria-disabled="true"]{opacity:.55;cursor:not-allowed}
.em114-lang-wrap .em114-lang-option:focus-visible{outline:2px solid white;outline-offset:2px}
/* A compact, legible mobile hero card instead of a full-screen translucent block. */
@media(max-width:860px){
 body.ep-edition .ep-width{width:calc(100% - 40px)!important}
 body.ep-edition .ep-lead-section{padding-top:96px!important;padding-bottom:24px!important}
 body.ep-edition .ep-feature-grid{display:block!important;min-height:0!important}
 body.ep-edition:not(.em107-type-newsroom) .ep-feature{display:flex!important;flex-direction:column!important;gap:0!important;min-height:0!important;height:auto!important;padding:0!important;overflow:visible!important;border-radius:0!important;border-top:0!important;border-left:0!important;background:transparent!important}
 body.ep-edition:not(.em107-type-newsroom) .ep-feature>img{order:2!important;position:relative!important;inset:auto!important;display:block!important;width:100%!important;height:clamp(210px,47vw,340px)!important;margin:12px 0 0!important;object-fit:cover!important;border-radius:12px!important}
 body.ep-edition:not(.em107-type-newsroom) .ep-feature-copy{order:1!important;position:relative!important;inset:auto!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:flex-start!important;width:100%!important;max-width:100%!important;min-height:0!important;gap:12px!important;padding:20px 0 4px!important;margin:0!important}
 body.ep-edition:not(.em107-type-newsroom) .ep-feature h1{font-size:clamp(32px,5.8vw,49px)!important;line-height:1.13!important;letter-spacing:-.052em!important;margin:0!important;text-wrap:balance}
 body.ep-edition:not(.em107-type-newsroom) .ep-feature p{font-size:15px!important;line-height:1.6!important;max-width:100%!important;margin:0!important}
 body.ep-edition .ep-body{padding:29px 0 70px!important}
 body.ep-edition .ep-body-grid,body.ep-edition.em107-type-newsroom .ep-body-grid{display:block!important;width:100%!important;grid-template-columns:minmax(0,1fr)!important;max-width:100%!important}
 body.ep-edition .ep-rail{position:static!important;width:100%!important;max-width:100%!important;margin:30px 0 0!important}
 body.ep-edition .ep-body-main{max-width:100%!important;width:100%!important}
 body.ep-edition .ep-body-main .em-news-cards,body.ep-edition .ep-body-main .em-news-archive-list,body.ep-edition .ep-body-main .em-source-ledger{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body.ep-edition .em-news-filters{flex-wrap:wrap!important}
 body.ep-edition .em-news-filters input{flex:1 1 200px}
 body.ep-edition .em-news-filters select{flex:1 1 170px}
 body.em107-type-newsroom .ep-feature-grid{display:block!important;overflow:hidden!important}
 body.em107-type-newsroom .ep-feature{min-height:365px!important;height:365px!important}
 body.em107-type-newsroom .ep-lead-sidebar{position:relative!important}
 body.em107-type-newsroom .ep-feature h1{font-size:clamp(27px,5.5vw,44px)!important}
}
@media(max-width:560px){
 html{scroll-padding-top:76px}
 body.ep-edition .ep-width{width:calc(100% - 32px)!important}
 body.ep-edition .ep-lead-section{padding-top:82px!important;padding-bottom:21px!important}
 body.ep-edition .ep-breadcrumb{display:block!important;font-size:11px!important;line-height:1.65!important;margin:6px 0 13px!important;overflow-wrap:anywhere}
 body.ep-edition:not(.em107-type-newsroom) .ep-feature-copy{gap:11px!important;padding:14px 0 0!important}
 body.ep-edition:not(.em107-type-newsroom) .ep-feature h1{font-size:clamp(30px,8.3vw,40px)!important;line-height:1.12!important}
 body.ep-edition:not(.em107-type-newsroom) .ep-feature>img{height:clamp(180px,56vw,270px)!important;margin-top:16px!important}
 body.ep-edition .ep-body-main h2{font-size:clamp(22px,6vw,30px)!important;line-height:1.25!important}
 body.ep-edition .ep-body-main h3{font-size:clamp(19px,5vw,25px)!important;line-height:1.3!important}
 body.ep-edition .ep-body-main p,body.ep-edition .ep-body-main li{font-size:15px!important;line-height:1.74!important}
 body.ep-edition .ep-body-main .em-news-cards,body.ep-edition .ep-body-main .em-news-archive-list,body.ep-edition .ep-body-main .em-source-ledger,body.ep-edition .ep-body-main .related-grid{grid-template-columns:minmax(0,1fr)!important}
 body.ep-edition .ep-body-main .em-bulletin-notes{grid-template-columns:1fr!important}
 body.ep-edition .ep-rail{display:block!important}
 body.ep-edition .ep-rail-panel{margin:0 0 14px!important;padding:19px!important}
 body.em107-type-newsroom .ep-feature{height:390px!important;min-height:390px!important}
 body.em107-type-newsroom .ep-feature-copy{left:17px!important;right:17px!important;bottom:20px!important}
 body.em107-type-newsroom .ep-feature h1{font-size:clamp(29px,8vw,38px)!important;line-height:1.12!important}
 body.em107-type-newsroom .ep-lead-sidebar{padding:18px!important}
 body.em107-type-newsroom .ep-ranked-story{min-width:0}
 body .em112-shell .em109-header{padding:0 13px!important;gap:8px!important}
 body .em112-shell .em109-brand{gap:5px!important;flex-shrink:1!important}
 body .em112-shell .em109-brand img{width:34px!important;height:34px!important;flex:0 0 34px!important}
 body .em112-shell .em109-brand span{font-size:clamp(11px,3.1vw,13px)!important;letter-spacing:-.045em!important}
 body .em112-shell .em109-menu-toggle{gap:7px!important;padding:0 0 0 9px!important;font-size:12px!important}
 body .em112-shell .em109-menu-lines{width:19px!important}
 body .em112-shell .em109-menu-lines i{width:19px!important}
 body.em111-condensed .em112-shell .em109-header{width:calc(100vw - 20px)!important}
 /* Hero box: substantially smaller, dark readable type, no headline collisions. */
 body.em107-home #m-app .frame>.em108-hero-news{left:14px!important;right:14px!important;bottom:clamp(72px,11svh,92px)!important;width:calc(100% - 28px)!important;max-width:none!important;max-height:220px!important;overflow:hidden!important;padding:13px 15px 14px!important;border-radius:15px!important;background:rgba(255,255,255,.96)!important;backdrop-filter:blur(8px)!important;box-shadow:0 14px 30px rgba(15,16,33,.19)!important}
 body.em107-home #m-app .frame .em108-story-kicker{font-size:11px!important;line-height:1.2!important;padding:0 0 8px!important}
 body.em107-home #m-app .frame .em108-story-body{display:flex!important;align-items:flex-start!important;gap:10px!important;padding:10px 0 9px!important}
 body.em107-home #m-app .frame .em108-story-date{font-size:9px!important;line-height:1.3!important;margin:0 0 6px!important;letter-spacing:0!important;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
 body.em107-home #m-app .frame .em108-story-link{font-size:clamp(16px,4.7vw,19px)!important;line-height:1.23!important;letter-spacing:-.02em!important;display:-webkit-box!important;-webkit-line-clamp:3!important;-webkit-box-orient:vertical!important;overflow:hidden!important}
 body.em107-home #m-app .frame .em108-news-thumb{width:64px!important;height:65px!important;flex:0 0 64px!important;border-radius:8px!important}
 body.em107-home #m-app .frame .em108-story-more{font-size:11px!important;line-height:1.3!important;margin:0!important;padding-bottom:3px!important}
 body.em107-home #m-app .frame .cue{bottom:3%!important;font-size:9px!important}
 body.em107-home #m-app .frame>.em114-lang-wrap{top:clamp(90px,14svh,125px);right:14px;padding:4px 5px;gap:0}
 body.em107-home #m-app .frame>.em114-lang-wrap .em114-lang-title{display:none}
 body.em107-home #m-app .frame>.em114-lang-wrap .em114-lang-option{min-width:34px;min-height:30px;font-size:10px;padding:4px 7px}
 /* Fewer repeated micro-labels at the narrow mobile breakpoint. */
 body.em107-home #m-app #em-latest-news .em-news-masthead{justify-content:flex-start!important;font-size:10px!important;gap:6px!important;padding:10px 0!important}
 body.em107-home #m-app #em-latest-news .em-news-masthead>span:last-child{display:none!important}
 body.em107-home #m-app #em-latest-news .em-news-title-row{gap:10px!important;flex-wrap:wrap!important;padding:20px 0!important}
 body.em107-home #m-app #em-latest-news .em-news-title-row h2{font-size:clamp(35px,9vw,46px)!important}
 body.em107-home #m-app #em-latest-news .em-news-main{width:100%!important;overflow:visible!important}
 body.em107-home #m-app #em-latest-news .em-news-lead-content>strong{font-size:clamp(25px,7vw,34px)!important;line-height:1.12!important}
 body.em107-home #m-app #em-latest-news .em-news-top{width:100%!important}
 body.em107-home #m-app #em-latest-news .em-news-bottom{max-width:100%!important}
 body.em107-home #m-app #em-latest-news .em-news-wrap{width:calc(100% - 28px)!important}
}
@media(max-width:380px){body .em112-shell .em109-brand span{font-size:10px!important}body .em112-shell .em109-menu-label{display:none!important}body.em107-home #m-app .frame>.em108-hero-news{bottom:74px!important}body.em107-home #m-app .frame .em108-story-link{font-size:15px!important}}
@media(prefers-reduced-motion:reduce){body.em107-home #m-app .frame>.em108-hero-news{transition:none!important}}

/* When Maltese homepage content exists, let the translated WP editor content render with correct language and a branded layout. */
.em114-translated-home{padding:clamp(115px,12vw,155px) clamp(18px,6vw,88px) 90px;background:#faf6f2;min-height:100vh;color:#142639;font-family:Inter,Arial,sans-serif}
.em114-translated-home .em114-lang-wrap{display:inline-flex;align-items:center;gap:7px;margin:0 0 40px;padding:5px 9px;background:#b51221;border-radius:99px}
.em114-translated-intro{border-bottom:2px solid #b51221;padding:0 0 25px;margin-bottom:32px}
.em114-translated-intro h1{font:500 clamp(34px,6vw,64px)/1.12 Georgia,serif;letter-spacing:-.045em;margin:0}
.em114-translated-content{max-width:880px;font:400 clamp(16px,1.4vw,19px)/1.82 Georgia,serif}
.em114-translated-content img{max-width:100%;height:auto}
.em114-translated-content a{color:#b51221;text-decoration:underline;text-underline-offset:4px}
@media(max-width:560px){.em114-translated-home{padding-top:100px}.em114-translated-intro h1{font-size:34px}.em114-translated-content{font-size:16px}}
