/* Home pages only. Desktop keeps its original builder composition at >= 960px.
 * The mobile joins are full-width CSS shapes sharing their neighbour's colour;
 * never reflect a whole content block, logo or photograph to change direction.
 * Builder IDs are intentionally scoped here; re-map them if its layout changes.
 */
.emjey-mobile-home, .emjey-mobile-home-footer { display: none; }
/* Preserve real featured-news modules while the legacy welcome copy is retired. */
.emjey-home-featured { padding: 24px 40px; background: #f6f4ef; color: #333; }
@media (max-width: 959px) { .emjey-home-featured { padding: 24px; } }
@media (max-width: 959px) {
    body.emjey-language-home {
        --home-ink: #111213;
        --home-paper: #f6f4ef;
        --home-silver: #d3d0c9;
        --home-gold: #d6a453;
        background: var(--home-ink);
    }
    body.emjey-language-home.emjey-home-menu-open { overflow: hidden; }
    .emjey-language-home .tm-page,
    .emjey-language-home .tm-page-container { width: 100%; max-width: none; margin: 0; padding: 0; }
    .emjey-language-home .tm-header-mobile { display: none; }
    .emjey-mobile-home, .emjey-mobile-home-footer { display: block; }
    .emjey-mobile-home { background: #000; color: #f6f4ef; }
    .emjey-mobile-home a { color: inherit; text-decoration: none; }
    .emjey-mobile-home__hero { position: relative; height: clamp(310px, 68vw, 460px); overflow: hidden; }
    .emjey-mobile-home__portrait {
        position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 56% top;
        /* A soft fade replaces the hard rectangular lower edge of the montage. */
        mask-image: linear-gradient(#000 45%, transparent 92%);
    }
    .emjey-mobile-home__hero::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, #000b 65%, #000); pointer-events: none; }
    .emjey-mobile-home__identity { z-index: 1; position: absolute; inset: auto 24px 26px; }
    .emjey-mobile-home__eyebrow { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #d6a453; margin: 0 0 12px; }
    .emjey-mobile-home h1 { margin: 0; color: #f6f4ef; font: 400 clamp(30px, 6vw, 44px)/1.08 Georgia, serif; }
    .emjey-mobile-home h1 span { color: #c5c1b8; font-size: .8em; }
    [dir="rtl"] .emjey-mobile-home h1 { font-family: inherit; font-size: clamp(28px, 5.6vw, 40px); line-height: 1.5; }
    [dir="rtl"] .emjey-mobile-home__eyebrow { letter-spacing: 0; font-size: 12px; }
    /* Hide desktop-only decoration and duplicated builder navigation. */
    .emjey-language-home #template-lu_UGKJa\#3,
    .emjey-language-home #template-lu_UGKJa\#8 > nav:not(.emjey-mobile-home__shortcuts),
    .emjey-language-home #template-lu_UGKJa\#10,
    .emjey-language-home #template-lu_UGKJa\#19,
    .emjey-language-home #template-lu_UGKJa\#21,
    .emjey-language-home .emjey-en-legal-footer { display: none !important; }
    .emjey-language-home #template-lu_UGKJa\#9 > .uk-container { padding: 0; }
    .emjey-language-home #tm-main [data-emjey-news="compact"] .emjey-mod-article-title::before { content: none; }
    .emjey-language-home .tm-bottom:has(.emjey-en-legal-footer-module) { display: none; }
    .emjey-language-home #tm-main { margin: 0; padding: 0; }
    .emjey-language-home #template-lu_UGKJa\#9 { background: var(--home-paper) !important; }
    .emjey-language-home #template-lu_UGKJa\#8 { position: relative; isolation: isolate; overflow: hidden; margin: 0; display: flex; flex-direction: column; gap: 0; background: var(--home-paper) !important; }
    .emjey-language-home #template-lu_UGKJa\#8 > * { width: 100%; box-sizing: border-box; margin: 0; padding: 0; min-width: 0; }
    .emjey-language-home #template-lu_UGKJa\#8 > :nth-child(2) { position: relative; padding-top: 28px; }
    .emjey-language-home #template-lu_UGKJa\#8 > :nth-child(2)::before {
        content: ''; position: absolute; inset: -1px 0 auto; height: 23px; background: var(--home-ink);
        clip-path: polygon(0 0,100% 0,100% 0,0 100%);
    }
    [dir="rtl"] .emjey-language-home #template-lu_UGKJa\#8 > :nth-child(2)::before { transform: scaleX(-1); }
    .emjey-language-home #template-lu_UGKJa\#8 > :nth-child(2) .uk-tile {
        background: var(--home-paper) !important; padding: 20px 24px 32px; color: #272827;
    }
    .emjey-language-home #template-lu_UGKJa\#8 > :nth-child(2) .uk-panel { text-align: start !important; }
    .emjey-language-home #template-lu_UGKJa\#8 > :nth-child(2) .el-title { font-size: 14px; letter-spacing: .035em; color: #696153; margin: 0 0 22px; }
    .emjey-language-home #tm-main [data-emjey-news="compact"] { margin: 0; padding: 0; list-style: none; gap: 0; }
    .emjey-language-home #tm-main [data-emjey-news="compact"] > li { padding: 0; margin: 0 !important; }
    .emjey-language-home #tm-main [data-emjey-news="compact"] > li:nth-child(n + 4) { display: none; }
    .emjey-language-home #tm-main [data-emjey-news="compact"] article { padding: 17px 0 !important; border-bottom: 1px solid #d9d5cd; }
    .emjey-language-home #tm-main [data-emjey-news="compact"] > li:first-child article { padding-top: 0 !important; }
    .emjey-language-home #tm-main [data-emjey-news="compact"] .emjey-mod-article-title { font-size: 18px !important; line-height: 1.4 !important; margin: 0 !important; color: #222 !important; }
    .emjey-language-home #tm-main [data-emjey-news="compact"] .emjey-article-date { display: block; font: inherit; font-size: 12px !important; color: #726b60; margin-bottom: 6px; }
    .emjey-language-home #tm-main [data-emjey-news="compact"] .emjey-date-title-sep { display: none; }
    .emjey-language-home #tm-main [data-emjey-news="compact"] .uk-article > div { display: none; }
    .emjey-mobile-home__shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; width: 100%; margin: 0; background: #504e4a; }
    .emjey-mobile-home__shortcuts a { display: flex; min-width: 0; min-height: 52px; align-items: center; justify-content: center; padding: 9px 14px; box-sizing: border-box; background: #282928; color: #e6e0d5; font-size: 13px; line-height: 1.35; text-align: center; text-decoration: none; }
    .emjey-mobile-home__shortcuts a:first-child { color: #e4ba78; }
    .emjey-mobile-home__shortcuts a:last-child:nth-child(odd) { grid-column: 1 / -1; }
    /* Keep the existing rotating photographs as one restrained visual interlude. */
    .emjey-language-home #template-lu_UGKJa\#8 > :nth-child(3) { position: relative; display: block; padding: 30px 24px 38px; background: #2d2d2c !important; }
    .emjey-language-home #template-lu_UGKJa\#8 > :nth-child(3)::before { content: ''; position: absolute; inset: -1px 0 auto; height: 20px; background: var(--home-paper); clip-path: polygon(0 0, 100% 0, 0 100%); }
    [dir="rtl"] .emjey-language-home #template-lu_UGKJa\#8 > :nth-child(3)::before { transform: scaleX(-1); }
    .emjey-language-home #template-lu_UGKJa\#8 > :nth-child(3) .uk-tile { padding: 0 !important; background: transparent !important; }
    .emjey-language-home #template-lu_UGKJa\#8 > :nth-child(3) .uk-tile > .uk-panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
    .emjey-language-home #template-lu_UGKJa\#8 > :nth-child(3) .uk-panel > .uk-panel { margin: 0 !important; }
    .emjey-language-home .mod-randomimage img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; filter: saturate(.78) contrast(1.04); }
    html body.emjey-language-home.emjey-mobile-enhanced #template-lu_UGKJa\#7 { display: none; }
    html body.emjey-language-home #template-lu_UGKJa\#7 { background: var(--home-paper) !important; padding: 0 24px 32px; }
    html body.emjey-language-home #template-lu_UGKJa\#7::before { content: none; }
    .emjey-home-account { border-block: 1px solid #49463f; }
    .emjey-home-account > summary { cursor: pointer; padding-block: 16px; min-height: 48px; box-sizing: border-box; font-size: 15px; list-style: none; }
    .emjey-home-account > summary::-webkit-details-marker { display: none; }
    html body.emjey-language-home #template-lu_UGKJa\#6 { top: 0 !important; padding: 14px 0; background: transparent; color: #222; }
    .emjey-language-home #template-lu_UGKJa\#6 input { font-size: 16px; }
    .emjey-language-home #template-lu_UGKJa\#6 .btn { background: #222; color: #fff; border: 0; border-radius: 0; }
    .emjey-mobile-home__drawer .emjey-home-account #template-lu_UGKJa\#6 { color: #ece8df; }
    .emjey-mobile-home__drawer .emjey-home-account #template-lu_UGKJa\#6 input { background: #f7f4ef; color: #222; }
    .emjey-mobile-home__drawer .emjey-home-account #template-lu_UGKJa\#6 .btn { background: #d6a453; color: #171717; }
    /* Mobile biography owns its artwork and a separate growing caption. The
       desktop builder art stays intact and returns when JS restores the feature. */
    .emjey-language-home #template-lu_UGKJa\#14 { position: relative; isolation: isolate; margin: 0 !important; background: #171818 !important; }
    .emjey-mobile-enhanced #template-lu_UGKJa\#14 > .uk-container { display: none; }
    .emjey-mobile-home__feature { position: relative; display: block; min-width: 0; color: #f6f4ef; text-decoration: none; background: #171818; }
    .emjey-mobile-home__feature-art { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); height: clamp(190px, 48vw, 300px); overflow: hidden; }
    .emjey-mobile-home__feature-art::after { content: ''; position: absolute; inset: -1px 0 auto; height: 12px; background: #2d2d2c; clip-path: polygon(0 0,100% 0,0 100%); pointer-events: none; }
    [dir="ltr"] .emjey-mobile-home__feature-art::after { transform: scaleX(-1); }
    .emjey-mobile-home__feature-photo { background: #333 url('../images/mjbw_up.jpg') right center / auto 100% no-repeat; }
    .emjey-mobile-home__feature-silhouette { background: #333 url('../images/mjfaq.svg') right center / auto 100% no-repeat; }
    [dir="ltr"] .emjey-mobile-home__feature-art > span { transform: scaleX(-1); }
    .emjey-mobile-home__feature-caption { display: flex; flex-direction: column; gap: 10px; padding: 24px 24px 28px; min-width: 0; box-sizing: border-box; border-top: 1px solid #ffffff1c; }
    .emjey-mobile-home__feature-eyebrow { color: #e4ba78; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
    [dir="rtl"] .emjey-mobile-home__feature-eyebrow { letter-spacing: 0; text-transform: none; }
    .emjey-mobile-home__feature strong { margin: 0; overflow-wrap: break-word; font: 400 clamp(24px, 6.5vw, 34px)/1.2 Georgia, serif; }
    [dir="rtl"] .emjey-mobile-home__feature strong { font-family: inherit; line-height: 1.45; }
    .emjey-mobile-home__feature em { margin: 0; max-width: 34ch; color: #dedbd4; font-size: 14px; font-style: normal; line-height: 1.65; }
    .emjey-mobile-home__feature:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
    .emjey-language-home #template-lu_UGKJa\#16 { position: relative; isolation: isolate; margin: 0 !important; background: var(--home-silver) !important; padding: 0 !important; }
    .emjey-language-home #template-lu_UGKJa\#16 .uk-container { display: none; }
    .emjey-language-home #template-lu_UGKJa\#16 .uk-grid { margin: 0; }
    .emjey-language-home #template-lu_UGKJa\#16 .uk-grid > * { padding: 0; width: 100%; }
    html body.emjey-language-home #template-lu_UGKJa\#15,
    html body.emjey-language-home #template-lu_UGKJa\#15 .uk-tile { background: transparent !important; min-height: 0 !important; padding: 0; color: #222; }
    html body.emjey-language-home #template-lu_UGKJa\#15::before { content: none; }
    .emjey-language-home #template-lu_UGKJa\#15 h3 { font-size: 18px; color: #222; }
    .emjey-language-home #template-lu_UGKJa\#15 { display: none !important; }
    .emjey-mobile-home__community { display: flex; min-height: 158px; flex-direction: column; justify-content: center; gap: 8px; padding: 30px 24px 34px; box-sizing: border-box; color: #242424; text-decoration: none; }
    .emjey-mobile-home__community span { color: #6d6250; font-size: 12px; }
    .emjey-mobile-home__community strong { margin: 0; font: 400 26px/1.15 Georgia, serif; }
    [dir="rtl"] .emjey-mobile-home__community strong { font-family: inherit; line-height: 1.45; }
    .emjey-mobile-home__community em { margin: 0; max-width: 34ch; color: #4a4843; font-size: 14px; font-style: normal; line-height: 1.65; }
    .emjey-language-home :is(.emjey-mobile-home,.emjey-mobile-home-footer,.emjey-home-account) :is(a,summary,input,button):focus-visible { outline: 2px solid #c8923e; outline-offset: 4px; }
    @media (max-width: 359px) {
        .emjey-mobile-home__top { gap: 8px; padding-inline: 14px; }
        .emjey-mobile-home__brand { gap: 5px; font-size: 20px; }
        .emjey-mobile-home__brand img { width: 27px; height: 27px; }
        .emjey-mobile-home__menu-toggle { font-size: 12px; }
        .emjey-mobile-home__menu-toggle { gap: 5px; }
        .emjey-mobile-home__menu-icon, .emjey-mobile-home__menu-icon::before, .emjey-mobile-home__menu-icon::after { width: 16px; }
    }
    @media (prefers-reduced-motion: reduce) {
        .emjey-mobile-home__drawer-panel, .emjey-mobile-home__backdrop, .emjey-mobile-home__menu-row::after, .emjey-mobile-home__menu-row a::before { transition: none; }
    }
    @media (min-width: 640px) {
        .emjey-mobile-home__identity { inset-inline: 40px; }
        .emjey-language-home #template-lu_UGKJa\#8 > :nth-child(2) .uk-tile { padding-inline: 40px; }
        .emjey-language-home #tm-main [data-emjey-news="compact"] { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px; }
        .emjey-language-home #tm-main [data-emjey-news="compact"] > li { width: auto; }
    }
}

/* Desktop uses the original lower photo/background section in every language.
 * The old English-only text is still filtered in PHP; the shared graphic footer
 * supplies localized labels and the current year. Phone rules above stay intact. */
html:not(:lang(en)) .emjey-language-home #template-lu_UGKJa\#21 { display: none !important; }
