/* Editorial surfaces use the same App Blue glass as the Home catalyst panel. */
@media screen and (forced-colors: none) {
  html[data-home-style="app"] {
    --reader-home-fill: var(--home-panel-glass);
    --reader-glass-fill: var(--reader-home-fill);
    --reader-glass-edge: var(--home-panel-glass-edge);
    --reader-card: var(--reader-home-fill);
    --reader-inset-fill: rgb(8 28 51 / .18);
    --reader-table-fill: rgb(8 23 43 / .48);
    --reader-surface-soft: #dce8f7;
    --reader-soft: #dce8f7;
  }

  html[data-home-style="app"] #main > [data-page="news"] {
    --news-reading-canvas: var(--reader-home-fill);
  }

  html[data-home-style="app"] #main .method-basics-page {
    --mb-panel: var(--reader-home-fill);
  }

  html[data-home-style="app"] #main > [data-page] :is(
    .bt-panel, .bt-tabs > button, .bt-detail, .bt-journey-example,
    .disease-anatomy, .disease-catalog-card, .anatomy-panel, .anatomy-closeup,
    .method-journey, .method-cta, .method-practice-card, .method-overview-card,
    .method-process, .methodology-chapter, .method-company-tile, .method-preflight,
    .method-three, .method-four, .method-core-rules, .method-short,
    .science-card-group .topic-card, .science-topic-dropdown, .sip-surface,
    .research-card, .research-feature-card, .research-feature-heading,
    .company-tile, .simple-company-card, .snapshot-card, .filter-shell,
    .calendar-head, .calendar-controls, .catalyst-calendar-board,
    .desk-panel, .desk-heading, .desk-bottom, .research-update,
    .company-reader-market > :is(.home-xbi-live, .home-watchlist),
    .section-tools :is(.home-xbi-live, .home-watchlist),
    .ribosome-reading-guide, .newsletter-card, .newsletter-policy,
    .about-page .principles, .about-page .disclaimer,
    .watchlist-daily-news, .market-board-summary, .market-board-scroll
  ),
  html[data-home-style="app"] #main > [data-page].article-page > :is(.article-layout, article.shell),
  html[data-home-style="app"] #main > [data-page^="news-"] > :is(.article-content, .inbx-news),
  html[data-home-style="app"] #main > [data-page="news"] :is(.news-room-heading, .news-room-main),
  html[data-home-style="app"] #main > [data-page="news"] .news-market-rail :is(
    .home-xbi-live, .news-quotes-panel, .news-reading-links, .news-rail-calendar
  ) {
    background: var(--reader-home-fill) !important;
    border-color: var(--reader-glass-edge) !important;
    box-shadow: inset 0 1px 0 #d5f9ff30, 0 6px 20px #00153b45 !important;
  }

  /* Profile navigation reuses the legacy market section ID on the rail. */
  html[data-home-style="app"] #main > .company-desk .company-reader-market[id$="-desk-market"] {
    background: transparent;
  }

  /* Text panels share one layer. Tables retain a darker surface for scanning data. */
  html[data-home-style="app"] #main .article-page .article-layout > .prose,
  html[data-home-style="app"] #main .article-page .prose :is(.dd-newcomers, .dd-opening-summary, .newcomer-prose),
  html[data-home-style="app"] #main > [data-page^="company-"] .desk-panel :is(.desk-band, .research-update) {
    background: transparent !important;
    box-shadow: none !important;
  }

  html[data-home-style="app"] #main > :is([data-page^="research-"], [data-page^="dd-fr-"]) {
    --dd-fact-bg: var(--reader-inset-fill);
    --dd-fact-tint: rgb(9 29 56 / .28);
  }

  html[data-home-style="app"] #main [data-page] :is(.prose, .article-content, .desk-panel, .lung-reading)
    table:not(.dd-overview-table),
  html[data-home-style="app"] #main .dd-opening-summary .dd-one-view:has(> table:not(.dd-overview-table)) {
    background: var(--reader-table-fill) !important;
    border-color: var(--reader-glass-edge) !important;
    box-shadow: none !important;
  }

  html[data-home-style="app"] #main .dd-opening-summary .dd-one-view > table:not(.dd-overview-table) {
    background: transparent !important;
  }

  html[data-home-style="app"] #main [data-page] :is(.prose, .article-content, .desk-panel, .lung-reading)
    table:not(.dd-overview-table) thead th {
    background: var(--reader-surface) !important;
  }

  /* Keep grouped content legible through a single glass layer. */
  html[data-home-style="app"] #main > [data-page] :is(
    .bt-panel aside, .bt-grid > div, .bt-chain > div,
    .disease-anatomy .anatomy-group, .method-process li, .method-three-grid > article,
    .method-four li, .method-core-rules li, .method-short-questions p,
    :is(.sp-dashboard, .sp-edition-panel) .sp-card
  ) {
    background: var(--reader-inset-fill) !important;
    box-shadow: none !important;
  }

  html[data-home-style="app"] #main > [data-page]:not([data-page="home"]) :is(
    .bt-panel, .disease-anatomy, .news-room-heading, .news-room-main, .method-basics-page,
    .method-journey, .newsletter-page, .newsletter-policy, .section-center
  ) :is(p, li, figcaption, h1, h2, h3) {
    text-shadow: 0 1px 3px #031425b8;
  }

  html[data-home-style="app"] #main .newsletter-page .newsletter-card > h1 {
    color: var(--reader-surface-ink) !important;
  }

  html[data-home-style="app"] body > .newsletter-teaser {
    background: var(--reader-home-fill);
    border-color: var(--reader-glass-edge);
  }
}

@media (min-width: 1101px) {
  #main [data-page="news"] .section-navigation > summary {
    display: none;
  }
}
