/* M.E. Standard UX & Functionality refresh — 1 Oct 2026
   Presentation/interaction only. Does not alter evidence, market authority or publication governance. */

:root{
  --mes-ux-focus:#9ccff0;
  --mes-ux-surface:rgba(4,13,22,.96);
  --mes-ux-line:rgba(185,207,222,.15);
}

#mes-reading-progress{
  position:fixed;inset:0 auto auto 0;z-index:1200;height:2px;width:0;
  background:linear-gradient(90deg,#b89a64,#8fcdf4);pointer-events:none;
  transition:width .08s linear;
}

.mes-network-state{
  position:fixed;right:16px;bottom:16px;z-index:950;display:flex;align-items:center;gap:8px;
  min-height:36px;padding:8px 12px;border:1px solid var(--mes-ux-line);border-radius:999px;
  background:rgba(2,8,14,.93);box-shadow:0 12px 36px rgba(0,0,0,.24);
  color:#9eb0bb;font:700 10px/1.1 Inter,ui-sans-serif,system-ui,sans-serif;letter-spacing:.11em;
  backdrop-filter:blur(14px);
}
.mes-network-state::before{content:"";width:7px;height:7px;border-radius:50%;background:#7ea58c;box-shadow:0 0 0 3px rgba(126,165,140,.12)}
.mes-network-state[data-state="offline"]{color:#d5b0a8;border-color:rgba(210,132,116,.28)}
.mes-network-state[data-state="offline"]::before{background:#c47d70;box-shadow:0 0 0 3px rgba(196,125,112,.12)}
.mes-network-state{transition:opacity .2s ease,transform .2s ease,border-color .2s ease}
.mes-network-state[data-visible="false"]{opacity:0;transform:translateY(8px);pointer-events:none}
.mes-network-state[data-visible="true"]{opacity:1;transform:none}


[data-mes-search="1"].mes-review-search{
  min-width:min(32vw,360px);text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  border:1px solid rgba(185,207,222,.14);border-radius:999px;background:rgba(255,255,255,.025);
  color:#93a7b4;transition:border-color .18s ease,background .18s ease,color .18s ease;
}
[data-mes-search="1"].mes-review-search:hover,
[data-mes-search="1"].mes-review-search:focus-visible{
  color:#dce7ec;border-color:rgba(143,205,244,.36);background:rgba(143,205,244,.055)
}
[data-mes-search="1"].mes-review-search::after{
  content:"/";float:right;margin-left:18px;color:#637b8a;font-size:10px
}

.mes-surface-nav{
  position:sticky;top:0;z-index:640;
  background:rgba(2,8,14,.91);backdrop-filter:blur(16px) saturate(115%);
  border-bottom:1px solid rgba(185,207,222,.09);
}
.mes-surface-nav-inner{scrollbar-width:none}
.mes-surface-nav-inner::-webkit-scrollbar{display:none}

.search-dialog form{max-height:min(78vh,720px)}
.search-field input{min-height:52px;font-size:16px}
.search-live-state{position:sticky;top:0;z-index:2;margin:0;padding:10px 0;background:var(--mes-ux-surface)}
.mes-search-suggestions{display:flex;flex-wrap:wrap;gap:8px;margin:15px 0 4px}
.mes-search-suggestions button{
  min-height:36px;padding:8px 12px;border:1px solid rgba(143,205,244,.18);border-radius:999px;
  background:rgba(143,205,244,.035);color:#9fc4da;font:700 10px/1 Inter,ui-sans-serif,system-ui,sans-serif;
  letter-spacing:.07em;cursor:pointer
}
.mes-search-suggestions button:hover,.mes-search-suggestions button:focus-visible{border-color:rgba(143,205,244,.42);color:#e4f1f7}
.search-result{min-height:68px}
.search-result strong{line-height:1.25}
.search-result small{line-height:1.35}

.front-lead-visual,
.editorial-visual,
.mes-home-interpretation-visual{
  overflow:hidden;background:#06111a;
}
.front-lead-visual img,
.editorial-visual img,
.mes-home-interpretation-visual img{
  width:100%;height:100%;object-fit:cover;transform:scale(1.001);
}
.front-lead-visual img{transition:transform .55s ease,filter .3s ease}
.front-lead:hover .front-lead-visual img{transform:scale(1.018)}
.editorial-visual-badge{
  position:absolute;left:12px;bottom:12px;padding:6px 8px;border:1px solid rgba(255,255,255,.16);
  background:rgba(2,8,14,.82);color:#d4dde2;font:800 8px/1 Inter,ui-sans-serif,system-ui,sans-serif;
  letter-spacing:.14em;backdrop-filter:blur(10px)
}

.front-mini-story{transition:background .18s ease}
.front-mini-story:hover{background:rgba(143,205,244,.025)}
.front-mini-story .editorial-visual-mini{aspect-ratio:16/10}
.front-mini-story h3 a{text-decoration-thickness:1px;text-underline-offset:3px}

.mes-home-interpretation-shell{align-items:stretch}
.mes-home-interpretation-visual{min-height:360px;position:relative}
.mes-home-interpretation-visual::after{
  content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 55%,rgba(2,8,14,.48));
  pointer-events:none
}
.mes-home-interpretation-visual figcaption{position:absolute;z-index:2;left:16px;right:16px;bottom:14px;margin:0;color:#d4dde2;text-shadow:0 1px 7px rgba(0,0,0,.65)}
.mes-home-interpretation-grid article{position:relative}
.mes-home-interpretation-grid article::before{
  content:"";position:absolute;left:0;top:0;width:22px;height:1px;background:rgba(194,163,107,.58)
}

.newsroom-section:has(.empty-state){min-height:140px}
.empty-state{position:relative}
.empty-state::after{
  content:"";display:block;width:min(320px,70%);height:1px;margin-top:14px;
  background:linear-gradient(90deg,rgba(143,205,244,.25),transparent)
}

#mes-back-top{
  position:fixed;right:16px;bottom:62px;z-index:940;width:42px;height:42px;border:1px solid var(--mes-ux-line);
  border-radius:50%;background:rgba(2,8,14,.92);color:#b9ccd6;box-shadow:0 10px 30px rgba(0,0,0,.2);
  cursor:pointer;opacity:0;transform:translateY(8px);pointer-events:none;transition:opacity .18s ease,transform .18s ease,border-color .18s ease
}
#mes-back-top[data-visible="true"]{opacity:1;transform:none;pointer-events:auto}
#mes-back-top:hover,#mes-back-top:focus-visible{border-color:rgba(143,205,244,.42);color:#fff}

button,a,input,select,summary,[tabindex]:not([tabindex="-1"]){scroll-margin-top:110px}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,[tabindex]:focus-visible{
  outline:2px solid var(--mes-ux-focus)!important;outline-offset:3px!important
}

@media(max-width:900px){
  .mes-surface-nav-inner{display:flex;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x proximity}
  .mes-surface-nav-inner a{flex:0 0 auto;min-height:44px;display:grid;place-items:center;scroll-snap-align:start}
  [data-mes-search="1"].mes-review-search{min-width:0;width:100%;max-width:none}
  .mes-home-interpretation-visual{min-height:280px}
}
@media(max-width:820px){
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .mes-surface-nav{display:block!important;min-height:44px!important}
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .mes-surface-nav-inner{display:flex!important;min-height:44px!important;height:44px!important;overflow-x:auto!important;overscroll-behavior-inline:contain;scroll-snap-type:x proximity}
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .mes-surface-nav a{display:grid!important;place-items:center!important;flex:0 0 auto!important;min-height:44px!important;scroll-snap-align:start}
  body[data-mes-surface="newsroom"] #nav.mes-final-header-tools [data-mes-search="1"].mes-review-search{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 44px!important;width:44px!important;min-width:44px!important;max-width:44px!important;min-height:44px!important;padding:0!important;font-size:0!important;color:transparent!important;overflow:visible!important}
  [data-mes-search="1"].mes-review-search::before{content:"SEARCH";font:800 8px/1 Inter,ui-sans-serif,system-ui,sans-serif;letter-spacing:.08em;color:#b8cbd6}
  [data-mes-search="1"].mes-review-search::after{display:none!important}
}
@media(max-width:520px){
  html[data-mes-presentation="intelligence"] body[data-mes-surface="newsroom"] #mes-intelligence-grid>.mes-intel-card{min-height:0!important;height:auto!important}
  html[data-mes-presentation="intelligence"] body[data-mes-surface="newsroom"] #mes-intelligence-grid>.mes-intel-card .mes-intel-card-body{max-height:240px!important;overflow-y:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
  body[data-mes-surface="newsroom"] #nav.mes-final-header-tools .mes-header-action{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 54px!important;width:54px!important;min-width:54px!important;max-width:54px!important;min-height:44px!important;padding:0!important;font-size:0!important;overflow:hidden!important}
  body[data-mes-surface="newsroom"] #nav.mes-final-header-tools .mes-header-action::before{content:"DESK";font:800 8px/1 Inter,ui-sans-serif,system-ui,sans-serif;letter-spacing:.08em;color:inherit}
  body[data-mes-surface="newsroom"] #nav.mes-final-header-tools .mes-mode-toggle{flex:0 0 62px!important;width:62px!important;min-width:62px!important;max-width:62px!important;min-height:44px!important;padding:0!important;font-size:0!important;overflow:hidden!important}
  body[data-mes-surface="newsroom"] #nav.mes-final-header-tools .mes-mode-toggle::before{content:"INTEL";font:800 8px/1 Inter,ui-sans-serif,system-ui,sans-serif;letter-spacing:.08em;color:inherit}
}
@media(max-width:620px){
  .mes-network-state{right:10px;bottom:10px;padding:7px 9px;font-size:9px}
  #mes-back-top{right:10px;bottom:54px}
  .front-mini-story .editorial-visual-mini{aspect-ratio:16/9}
  .mes-home-interpretation-visual{min-height:230px}
}
@media(prefers-reduced-motion:reduce){
  #mes-reading-progress,.front-lead-visual img,#mes-back-top{transition:none!important}
  .front-lead:hover .front-lead-visual img{transform:none}
}

/* Editorial light-mode readability / WCAG contrast correction.
   This intentionally overrides dark Intelligence tokens that leaked into light surfaces. */
html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .mes-editorial-context-head span,
html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .mes-editorial-context-head small{
  color:#174a68!important;
}
html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .mes-editorial-context-head p{
  color:#354d5b!important;
}
html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .mes-final-utility-card header span,
html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .mes-final-featured-analysis>header>span{
  color:#174a68!important;
}
html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .mes-final-utility-card header strong,
html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .mes-final-featured-analysis>header>strong,
html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .mes-final-theme-row strong{
  color:#102534!important;
}
html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .mes-final-utility-card p,
html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .mes-final-analysis>p{
  color:#405765!important;
}
html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .mes-final-utility-card>a,
html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .mes-final-featured-analysis>a{
  color:#164f75!important;
}
html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .mes-final-theme-row span{
  color:#4a5e6a!important;
}
html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .reader-destinations a span{
  color:#694b12!important;
}
html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .mes-editorial-close-grid p{
  color:#4b5d67!important;
}


/* CLS guard: source-image availability must never change desktop hero geometry.
   The no-source state keeps the same flex/min-height/padding as the resolved visual state. */
@media(min-width:821px){
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .front-lead.no-source-visual{
    display:flex!important;
    flex-direction:column!important;
    justify-content:flex-end!important;
    grid-template-columns:none!important;
    grid-auto-rows:auto!important;
    column-gap:0!important;
    align-content:normal!important;
    min-height:430px!important;
    padding:38px 42px 30px!important;
  }
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .front-lead.no-source-visual .front-label-row,
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .front-lead.no-source-visual h2,
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .front-lead.no-source-visual>p,
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .front-lead.no-source-visual .front-lead-tags,
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .front-lead.no-source-visual .front-meta,
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .front-lead.no-source-visual .front-link{
    grid-column:auto!important;
  }
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .front-lead.no-source-visual .front-market-impact-card{
    display:block!important;
    position:absolute!important;
    right:32px!important;
    top:104px!important;
    left:auto!important;
    width:270px!important;
    max-width:30%!important;
    margin:0!important;
    align-self:auto!important;
  }
}


/* Mobile CLS guard: reserve hydrated hero text geometry before feed/intelligence data resolves. */
@media(max-width:520px){
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .front-lead,
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .front-lead.no-source-visual{
    min-height:450px!important;
  }
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] #front-lead-summary{
    min-height:66px!important;
  }
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] #front-lead-tags{
    min-height:28px!important;
    align-content:start!important;
  }
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] #front-lead-meta{
    min-height:44px!important;
    align-content:start!important;
  }
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] #front-lead-link{
    width:auto!important;
    max-width:100%!important;
    min-height:44px!important;
    height:44px!important;
    white-space:nowrap!important;
    flex-wrap:nowrap!important;
  }
}


/* Phone newsdesk frame: live lead hydration updates content inside a stable viewport. */
@media(max-width:520px){
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .front-lead,
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .front-lead.no-source-visual{
    height:450px!important;
    min-height:450px!important;
    max-height:450px!important;
    overflow:hidden!important;
  }
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] #front-lead-link{
    box-sizing:border-box!important;
    display:flex!important;
    flex:0 0 44px!important;
    width:100%!important;
    max-width:100%!important;
    height:44px!important;
    min-height:44px!important;
    max-height:44px!important;
    margin:10px 0 0!important;
    padding:0 14px!important;
    align-items:center!important;
    overflow:hidden!important;
  }
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] #front-lead-summary{
    box-sizing:border-box!important;
    height:66px!important;
    min-height:66px!important;
    max-height:66px!important;
    overflow:hidden!important;
  }
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] #front-lead-tags{
    box-sizing:border-box!important;
    height:28px!important;
    min-height:28px!important;
    max-height:28px!important;
    overflow:hidden!important;
  }
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] #front-lead-meta{
    box-sizing:border-box!important;
    height:44px!important;
    min-height:44px!important;
    max-height:44px!important;
    overflow:hidden!important;
  }
}


/* Mobile lead headline reserves two lines so verified headline replacement does not reflow the page. */
@media(max-width:520px){
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] #front-lead-title{
    box-sizing:border-box!important;
    display:-webkit-box!important;
    height:70px!important;
    min-height:70px!important;
    max-height:70px!important;
    overflow:hidden!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:2!important;
  }
}


/* Mobile supporting-story stability: reserve the hydrated story rail before the feed resolves.
   This prevents the context rail below it from jumping when source cards replace the loading state. */
@media(max-width:520px){
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] #front-mini-stories.front-mini-stories:not(.is-empty){
    box-sizing:border-box!important;
    min-height:192px!important;
  }
}


/* 9 Oct 2026 — restrained fail-closed edition state; qualified leads remain unchanged. */
html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .front-lead.no-source-visual{
  height:auto!important;max-height:none!important;min-height:275px!important;padding:27px 32px!important;
  display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:flex-start!important;
  background:linear-gradient(125deg,#fff 0%,#f6f3ec 100%)!important;
}
html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .front-lead.no-source-visual #front-lead-title{
  height:auto!important;min-height:0!important;max-height:none!important;display:block!important;
  font-size:clamp(27px,3vw,43px)!important;line-height:1.1!important;max-width:680px!important;margin:12px 0 0!important;
}
html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .front-lead.no-source-visual #front-lead-summary{
  max-width:640px!important;min-height:0!important;max-height:none!important;display:block!important;
  margin:12px 0!important;line-height:1.6!important;
}
html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .front-lead.no-source-visual .front-market-impact-card,
html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .front-lead.no-source-visual .front-intelligence-quote{
  display:none!important;
}
html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .front-lead.no-source-visual .front-link{
  position:relative!important;inset:auto!important;min-height:40px!important;margin-top:12px!important;align-self:flex-start!important;
}
@media(max-width:620px){
  body[data-mes-surface="newsroom"] .site-header .nav-wrap{
    width:calc(100% - 20px)!important;min-height:64px!important;height:auto!important;padding:8px 0!important;
    display:grid!important;grid-template-columns:minmax(0,1fr) max-content!important;align-items:center!important;
    gap:6px!important;flex-wrap:nowrap!important;
  }
  body[data-mes-surface="newsroom"] .site-header .brand{
    min-width:0!important;width:auto!important;max-width:100%!important;overflow:hidden!important;
  }
  body[data-mes-surface="newsroom"] .site-header .brand-copy{
    min-width:0!important;
  }
  body[data-mes-surface="newsroom"] #nav.mes-review-tools,
  body[data-mes-surface="newsroom"] #nav.mes-final-header-tools{
    position:static!important;display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
    width:max-content!important;max-width:none!important;min-width:0!important;gap:5px!important;margin:0!important;
    padding:0!important;align-items:center!important;justify-content:flex-end!important;
  }
  body[data-mes-surface="newsroom"] #nav.mes-final-header-tools .mes-header-subscribe,
  body[data-mes-surface="newsroom"] #nav.mes-final-header-tools .mes-final-datetime{display:none!important}
  body[data-mes-surface="newsroom"] #nav.mes-final-header-tools .mes-review-search{flex:0 0 44px!important}
  body[data-mes-surface="newsroom"] #nav.mes-final-header-tools .mes-header-action{flex:0 0 54px!important}
  body[data-mes-surface="newsroom"] #nav.mes-final-header-tools .mes-mode-toggle{flex:0 0 62px!important}
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .front-lead.no-source-visual{
    min-height:245px!important;padding:21px 17px!important;
  }
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .front-lead.no-source-visual #front-lead-title{
    font-size:clamp(26px,7vw,34px)!important;line-height:1.13!important;
  }
  html[data-mes-presentation="editorial"] body[data-mes-surface="newsroom"] .front-lead.no-source-visual #front-lead-summary{
    font-size:13px!important;
  }
}
