/* Use a viewport layer rather than background-attachment:fixed on mobile:
   iOS stretches fixed body backgrounds to the height of long documents. */
.home-x-mobile-label,
.home-egfr-preview :is(.egfr-mobile-welcome,.egfr-mobile-question) {display:none}

@media (max-width:1100px) {
  /* Keep the desktop speech balloons; mobile follows the app's quieter film card. */
  #main [data-page="home"] .home-egfr-preview .egfr-quote {display:none}
  #main [data-page="home"] .home-egfr-preview .egfr-scene {
    grid-template-columns:11% minmax(0,1fr) 11%;
    grid-template-rows:auto;
    padding-top:0;
  }
  #main [data-page="home"] .home-egfr-preview .egfr-host {display:contents}
  #main [data-page="home"] .home-egfr-preview .egfr-film-stage {grid-row:1}
  #main [data-page="home"] .home-egfr-preview .egfr-host img {
    grid-row:1;
    width:118%;
    max-width:70px;
    align-self:start;
    z-index:1;
  }
  #main [data-page="home"] .egfr-host-ribosome img {grid-column:1;justify-self:start}
  #main [data-page="home"] .egfr-host-lipid img {grid-column:3;justify-self:end}
  #main [data-page="home"] .home-egfr-preview :is(.egfr-mobile-welcome,.egfr-mobile-question) {
    display:block;
    margin:0;
    color:#edf3fc;
    font-size:.875rem;
    font-weight:400;
    line-height:1.5;
  }
  #main [data-page="home"] .home-egfr-preview .egfr-mobile-welcome {
    padding:0 10px 8px;
    text-align:center;
    background:var(--home-vesicle-fill,rgba(8,36,71,.72));
  }
  #main [data-page="home"] .home-egfr-preview .egfr-mobile-question {grid-column:1 / -1}
  html[data-home-style] #main [data-page="home"] .home-welcome-egfr .egfr-motion-control {
    top:auto;
    right:6px;
    bottom:6px;
  }
  body:has([data-page="home"].active) .site-header .header-x-contact {
    grid-column:1 / -1;
    justify-self:end;
    gap:6px;
    width:max-content;
    min-height:44px;
    margin:0 0 0 auto;
    padding:0 6px;
    border-left:0!important;
  }
  body:has([data-page="home"].active) .site-header .header-x-contact .home-x-copy {display:none}
  .site-header .header-x-contact .home-x-mobile-label {display:inline;font-size:.875rem;line-height:1.3}
  .site-header .header-x-contact .home-x-mark {font-size:22px}
}
@media (max-width:1100px) and (forced-colors:none) {
  html[data-home-style="app"] #main [data-page]:not([data-page="home"]) {
    --reader-soft:#edf3fc;
    --reader-surface-soft:#e4edf9;
    --mobile-card:var(--reader-glass-fill);
    --mobile-edge:var(--reader-glass-edge);
  }
  html[data-home-style="app"] #main [data-page]:not([data-page="home"])
    :is(.page-head,.research-feature-card,.research-card,.company-tile,.simple-company-card,.topic-card,.snapshot-card,.desk-panel,.desk-heading,.desk-bottom,.research-update) {
    background:var(--mobile-card)!important;
    border:1px solid var(--mobile-edge)!important;
    border-radius:18px;
    box-shadow:inset 0 1px 0 #d5f9ff30,0 6px 20px #00153b45!important;
  }
  html[data-home-style="app"] #main [data-page]:not([data-page="home"])
    :is(.desk-heading,.desk-bottom,.research-update) {
    box-sizing:border-box;
    padding:20px clamp(16px,3vw,24px)!important;
    margin-block:24px;
    min-width:0;
  }
  html[data-home-style="app"] #main [data-page] :is(.desk-panel,.desk-heading,.desk-bottom,.research-update) :is(p,li) {
    color:#edf3fc!important;
    font-size:1rem;
    line-height:1.7;
  }
  html[data-home-style="app"] #main .research-update h2 {margin-top:0;line-height:1.35}
  html[data-home-style="app"] #main .research-update ul {padding-left:22px}
  html[data-home-style="app"] #main .research-update li + li {margin-top:20px}
  html[data-home-style="app"] #main .research-update a {color:#7aecff!important;text-underline-offset:3px}
  html[data-home-style="app"] #main .desk-panel .kicker {
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
  }
  html[data-home-style="app"] #main [data-page]:not([data-page="home"]) .page-head {
    padding:22px 18px!important;
    margin-top:16px;
    margin-bottom:24px;
    box-sizing:border-box;
  }

  /* The search label and its input form one dark control, including WebKit. */
  html[data-home-style="app"] #main [data-page="research"] .search-field {
    display:flex;
    align-items:center;
    gap:10px;
    min-height:52px;
    padding:10px 14px;
    background:rgba(9,25,47,.96)!important;
    color:#71e9fa!important;
    border:1px solid var(--mobile-edge)!important;
    border-radius:14px;
    box-shadow:inset 0 1px 0 #d5f9ff25!important;
  }
  html[data-home-style="app"] #main [data-page="research"] .search-field svg {flex:none;width:20px;height:20px}
  html[data-home-style="app"] #main [data-page="research"] .search-field input {
    width:100%;
    min-width:0;
    padding:3px 0;
    border:0!important;
    border-radius:0;
    background:transparent!important;
    color:#f1f7ff!important;
    font-size:1rem;
    appearance:none;
    -webkit-appearance:none;
    color-scheme:dark;
  }
  html[data-home-style="app"] #main [data-page="research"] .search-field:focus-within {
    outline:2px solid #71e9fa;
    outline-offset:3px;
  }
  html[data-home-style="app"] #main [data-page="research"] .search-field input:focus-visible {outline:none!important}
  html[data-home-style="app"] #main [data-page="research"].page.inner-page .filter-shell,
  html[data-home-style="app"] #main [data-page="research"] .research-feature-heading {
    background:var(--mobile-card)!important;
    border:1px solid var(--mobile-edge)!important;
    border-radius:18px;
    padding:18px!important;
    box-shadow:inset 0 1px 0 #d5f9ff30!important;
  }
  html[data-home-style="app"] #main [data-page="research"] .research-results-count {
    padding:10px 14px;
    border-radius:10px;
    background:rgba(9,25,47,.94);
    font-size:.875rem;
  }

  /* One continuous reading surface for the company DD, including its title.
     Other article templates retain their existing header/body structure. */
  html[data-home-style="app"] #main .article-page[data-page] {
    --reader-soft:#e4edf9;
    --reader-surface-soft:#d7e3f2;
  }
  html[data-home-style="app"] #main .article-page .company-reader-layout > .section-center,
  html[data-home-style="app"] #main .article-page:not(:has(> .company-reader-layout)) > :is(.article-head,.article-layout) {
    background:var(--mobile-card)!important;
    border:1px solid rgba(169,234,255,.4)!important;
    border-radius:20px;
    padding:20px clamp(16px,3vw,24px)!important;
    box-shadow:inset 0 1px 0 #d5f9ff30,0 8px 24px #00112650!important;
    min-width:0;
    box-sizing:border-box;
  }
  html[data-home-style="app"] #main .article-page:not(:has(> .company-reader-layout)) > .article-head {margin-top:18px;margin-bottom:16px}
  html[data-home-style="app"] #main .article-page .company-reader-layout :is(.article-head,.article-layout) {
    width:100%;
    max-width:none;
    margin:0;
    padding:0!important;
    border:0;
    background:transparent!important;
    box-shadow:none!important;
  }
  html[data-home-style="app"] #main .article-page .company-reader-layout .article-head {padding-bottom:20px!important}
  html[data-home-style="app"] #main .article-page .article-head .back-link {display:inline-block;margin:0 14px 12px 0;font-size:.9375rem}
  html[data-home-style="app"] #main .article-page .article-head .article-ticker {margin-top:14px}
  html[data-home-style="app"] #main .article-page .article-head h1 {font-size:clamp(2rem,6vw,2.5rem);line-height:1.15;margin:12px 0}
  html[data-home-style="app"] #main .article-page .article-head > p {font-size:1.0625rem;line-height:1.65;margin:12px 0 0}
  html[data-home-style="app"] #main .article-page .article-layout {grid-template-columns:minmax(0,1fr);gap:20px}
  html[data-home-style="app"] #main .article-page .article-layout > .prose {min-width:0;max-width:100%}
  /* Wide comparison tables scroll within the reading pane, not the whole page.
     Keep the existing Company-in-One-View responsive fact-card layout. */
  html[data-home-style="app"] #main .article-page .prose table:not(.dd-one-view) {
    display:block;
    width:100%;
    max-width:100%;
    overflow-x:auto;
    overscroll-behavior-x:contain;
  }
  html[data-home-style="app"] #main .article-page .article-layout > .toc {
    position:static;
    display:flex;
    flex-wrap:wrap;
    gap:8px 14px;
    max-height:none;
    margin:0;
    padding:14px 0;
    border-top:1px solid #a9eaff40;
    border-bottom:1px solid #a9eaff40;
    background:transparent!important;
  }
  html[data-home-style="app"] #main .article-page .toc a {font-size:.875rem;line-height:1.5;padding:4px 0}
  html[data-home-style="app"] #main .article-page .toc > span {flex-basis:100%}
  html[data-home-style="app"] #main .article-page .prose > .hero {margin:0 0 16px;padding:0}
  html[data-home-style="app"] #main .article-page .prose > .hero .eyebrow {display:block;font-size:.8125rem;line-height:1.65;letter-spacing:.06em}
  html[data-home-style="app"] #main .article-page :is(.article-head > p,.prose > p,.prose > section > p,.prose > aside > p) {
    color:#edf3fc!important;
    font-size:1.0625rem;
    line-height:1.75;
  }
  html[data-home-style="app"] #main .article-page .prose > section {padding-bottom:28px;margin-bottom:28px}
  html[data-home-style="app"] #main .article-page .prose :is(h2,h3,h4) {scroll-margin-top:100px}
}

/* Embedded market rails leave the mobile reading flow. Personal follow controls,
   the full watchlist and Share Price remain available in their dedicated pages. */
@media (max-width:1100px) {
  #main [data-page]:not([data-page="my-watchlist"]):not([data-page="our-watchlist"])
    :is(.home-tools,.company-tools,.section-tools,.news-market-rail,.company-reader-market,.home-sidebar,.home-biotech-market,.home-watchlist,.home-our-watchlist) {
    display:none!important;
  }
}

@media screen and (forced-colors:none) {
  html[data-home-style="app"] #main > :is(.lung-guide,[data-page^="diseases-"],.bt-journey-page) {
    --reader-soft:#edf3fc;
    --reader-surface-soft:#edf3fc;
    --reader-link:#adf3ff;
    --reader-surface-link:#adf3ff;
    --primer-bg:var(--reader-home-fill);
    --primer-card:rgba(8,28,51,.18);
  }
  html[data-home-style="app"] #main > :is(.lung-guide,[data-page^="diseases-"],.bt-journey-page)
    :is(.lung-reading,.lung-toc,.ms-safety,.alz-company,.bt-journey-care-grid > section,
        .bt-journey-approaches > section,.bt-journey-example,.bt-journey-gap,.bt-journey-cta,
        .bt-journey-company,.bt-disease-panel,.disease-primer,.pc-company-block,
        .disease-program,.article-head,.article-layout,.lpa-analysis) {
    background:var(--reader-home-fill)!important;
    border-color:var(--reader-glass-edge)!important;
  }
  html[data-home-style="app"] #main > :is(.lung-guide,[data-page^="diseases-"],.bt-journey-page)
    :is(.lung-reading,.bt-disease-panel) :is(.bt-journey-company,.bt-journey-care-grid > section) {
    background:rgba(8,28,51,.18)!important;
  }
  html[data-home-style="app"] #main > :is(.lung-guide,[data-page^="diseases-"],.bt-journey-page)
    :is(.lung-reading,.lung-toc,.disease-primer,.bt-journey) :is(p,li,h2,h3,h4,summary,a) {
    text-shadow:0 1px 3px #031425b8;
  }
  html[data-home-style="app"] #main > :is([data-page^="research-"],[data-page^="dd-fr-"]).article-page
    :is(.article-head,.prose) :is(p,li,h1,h2,h3,h4,figcaption) {
    text-shadow:0 1px 3px #031425b8;
  }
}
