/* Desktop reading layout. The shared canvas is defined in cellular-blue.css. */
html[data-home-style="app"] #main > :is(
  [data-page="research"], [data-page^="research-"], [data-page^="dd-fr-"],
  [data-page="companies"], [data-page^="company-"], [data-page="snapshots"], [data-page="share-price"]
) {
  --reader-soft: #e4edf9;
  --reader-surface-soft: #e4edf9;
  --reader-link: #adf3ff;
  --reader-surface-link: #adf3ff;
  background: transparent !important;
}

html[data-home-style="app"] #main > [data-page="home"] .home-egfr-preview .egfr-quote {
  background: var(--reader-glass-fill);
  color: #edf3fc;
  box-shadow: inset 0 0 0 1px var(--reader-glass-edge);
}

/* Read the background through one continuous company article surface. The
   direct children are the fallback until the navigation script places them. */
html[data-home-style="app"] #main > :is([data-page^="research-"], [data-page^="dd-fr-"]).article-page
  .company-reader-layout > .section-center,
html[data-home-style="app"] #main > :is([data-page^="research-"], [data-page^="dd-fr-"]).article-page
  > :is(.article-head, .article-layout) {
  box-sizing: border-box;
  min-width: 0;
  padding: clamp(18px, 2vw, 28px);
  border: 1px solid var(--reader-glass-edge);
  border-radius: 20px;
  background: var(--reader-glass-fill) !important;
  box-shadow: inset 0 1px 0 #d5f9ff30, 0 8px 24px #00112650;
}

html[data-home-style="app"] #main > :is([data-page^="research-"], [data-page^="dd-fr-"]).article-page
  .company-reader-layout :is(.article-head, .article-layout) {
  background: transparent !important;
  box-shadow: none;
}

html[data-home-style="app"] #main > :is([data-page^="research-"], [data-page^="dd-fr-"]).article-page
  :is(.article-head > p, .prose > p, .prose > section > p) {
  color: #edf3fc !important;
}

html[data-home-style="app"] #main > :is(
  [data-page="research"], [data-page="companies"], [data-page^="company-"], [data-page="snapshots"]
) :is(
  .page-head, .filter-shell, .research-feature-heading, .research-feature-card, .research-card,
  .company-tile, .simple-company-card, .snapshot-card, .desk-panel, .desk-heading, .desk-bottom, .research-update
),
html[data-home-style="app"] #main > [data-page="share-price"]
  :is(.sp-page-heading, .sp-dashboard, .sp-edition-panel, .sp-card:not(.sp-edition-panel .sp-card)) {
  background: var(--reader-glass-fill) !important;
  border: 1px solid var(--reader-glass-edge) !important;
  border-radius: 18px;
  box-shadow: inset 0 1px 0 #d5f9ff30, 0 6px 20px #00153b45 !important;
}

html[data-home-style="app"] #main > :is([data-page="research"], [data-page="companies"]) .page-head,
html[data-home-style="app"] #main > [data-page="research"] .research-feature-heading,
html[data-home-style="app"] #main > [data-page^="company-"] :is(.desk-heading, .desk-bottom, .research-update),
html[data-home-style="app"] #main > [data-page="share-price"] .sp-page-heading {
  padding: clamp(16px, 2vw, 24px);
}

html[data-home-style="app"] #main > [data-page^="company-"] .research-update :is(p, li) {
  color: #edf3fc !important;
}

html[data-home-style="app"] #main > [data-page^="company-"] .research-update h2 {
  margin-top: 0;
}

/* Keep the darker search control from the mobile catalogue. */
html[data-home-style="app"] #main > [data-page="research"] .search-field {
  background: rgba(9,25,47,.96) !important;
  border-color: var(--reader-glass-edge) !important;
}

html[data-home-style="app"] #main > [data-page="research"] .search-field input {
  background: transparent !important;
  color: #f1f7ff !important;
}

html[data-home-style="app"] #main > [data-page="research"] .search-field:focus-within {
  outline: 2px solid #71e9fa;
  outline-offset: 3px;
}

/* The frame and caption are translucent. Image pixels and embedded labels
   retain their original opacity. HTML boards can tint their own surface. */
html[data-home-style="app"] #main > :is(
  [data-page^="research-"], [data-page^="dd-fr-"], [data-page^="company-"], [data-page="snapshots"]
) :is(.dd-figure, figure:has(img)) {
  background: rgba(8,28,51,.24) !important;
  border-color: var(--reader-glass-edge) !important;
  box-shadow: inset 0 1px 0 #d5f9ff30, 0 6px 20px #00153b45 !important;
}

html[data-home-style="app"] #main > [data-page="research-allo"] .allo-board {
  --muted-foreground: #e4edf9;
  --border: var(--reader-glass-edge);
  background: rgba(8,28,51,.30) !important;
}
