/* Original SaaS parity: one-click tenant watchlist membership remains a
   compact, keyboard-operable control on every published ticker surface. */
.qe-watchlist-star {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--qe-muted);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 16px;
  justify-content: center;
  line-height: 1;
  min-height: 28px;
  min-width: 28px;
  padding: 3px 6px;
}
.qe-watchlist-star[aria-pressed="true"] { color: var(--qe-accent); }
.qe-watchlist-star:hover, .qe-watchlist-star:focus-visible { background: rgb(223 187 100 / 9%); border-color: var(--qe-accent); color: var(--qe-accent); outline: 2px solid var(--qe-accent); outline-offset: 2px; }
.qe-watchlist-star[aria-busy="true"], .qe-watchlist-star:disabled { cursor: wait; opacity: .58; }
.qe-watchlist-star-status { color: var(--qe-muted); font-size: 11px; margin: 0; }
.qe-watchlist-star-status[data-state="ERROR"], .qe-watchlist-star-status[data-state="UNAVAILABLE"] { color: var(--qe-danger); }
.qe-watchlist-star-status[data-state="UNAUTHORIZED"], .qe-watchlist-star-status[data-state="ENTITLEMENT_REQUIRED"] { color: var(--qe-accent); }
.qe-model-row-actions, .qe-engine-row-actions { align-items: center; display: flex; gap: 6px; white-space: nowrap; }
.qe-screener-row-actions { align-items: center; display: flex; gap: 8px; justify-content: space-between; min-width: 0; }
.qe-screener-row-actions .qe-watchlist-symbol { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 590px) {
  .qe-model-row-actions, .qe-engine-row-actions { gap: 3px; }
  .qe-watchlist-star { min-height: 26px; min-width: 26px; padding-left: 4px; padding-right: 4px; }
}

/* Responsive parity hardening: keep the phone shell usable at the original
   390px reference width without changing the published-only product rules. */
@media (max-width: 768px) {
  body.qe-workspace { padding-top: 78px; }
  .qe-header {
    align-items: center;
    display: grid;
    gap: 4px 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    height: auto;
    min-height: 76px;
    overflow: visible;
    padding: 8px 10px;
  }
  .qe-brand { grid-column: 1; grid-row: 1; max-width: 100%; min-width: 0; }
  .qe-brand > span:last-child { max-width: 100%; min-width: 0; }
  .qe-header > .qe-original-news-strip {
    flex: 0 0 auto;
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    width: 100%;
  }
  .qe-header-status {
    align-self: center;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    max-width: 100%;
  }
  .qe-tools-rail {
    bottom: 38px;
    max-height: calc(100vh - 116px);
    top: 78px;
    transform: translateX(0);
    visibility: visible;
    width: 168px;
  }
  body.qe-rail-collapsed .qe-tools-rail {
    pointer-events: none;
    transform: translateX(-105%);
    visibility: hidden;
  }
  body:not(.qe-rail-collapsed) .qe-tools-rail {
    pointer-events: auto;
    transform: translateX(0);
    visibility: visible;
  }
  .qe-mobile-rail-toggle {
    display: inline-flex !important;
    left: 10px;
    position: fixed;
    top: 84px;
    z-index: 36;
  }
  body:not(.qe-rail-collapsed) .qe-mobile-rail-toggle { left: 178px; }
  .qe-product-tabs {
    align-items: stretch;
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
  }
  .qe-product-tabs button {
    flex: 0 0 148px;
    min-width: 148px;
    scroll-snap-align: start;
    white-space: normal;
  }
  .qe-command-palette {
    align-items: flex-start;
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px 10px 48px;
  }
  .qe-command-palette-card {
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  @supports (height: 100dvh) {
    .qe-command-palette-card { max-height: calc(100dvh - 20px); }
  }
}

@media (max-width: 430px) {
  .qe-header-status { gap: 3px; }
  #qe-profile { max-width: 82px; width: 82px; }
  #qe-command-toggle, #qe-settings-toggle, #qe-keyboard-help-toggle {
    min-width: 30px;
    width: 30px;
  }
  .qe-brand { font-size: 12px; }
}

/* Final phone-shell authority for the original 390px/430px compact layout.
   Keep this after the legacy parity layers above so the rail cannot become a
   narrow in-flow column and the header cannot grow into a second row. */
@media (max-width: 768px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  body.qe-workspace {
    box-sizing: border-box;
    padding-left: 0 !important;
    padding-top: 48px;
  }
  body.qe-rail-collapsed { padding-left: 0 !important; }
  .qe-header {
    align-items: center;
    box-sizing: border-box;
    display: grid;
    gap: 0 6px;
    grid-template-columns: minmax(0, 124px) minmax(0, 1fr) auto;
    grid-template-rows: 48px;
    height: 48px;
    max-height: 48px;
    min-height: 48px;
    overflow: hidden;
    padding: 0 8px;
    width: 100%;
  }
  .qe-brand {
    grid-column: 1;
    grid-row: 1;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }
  .qe-brand > span:last-child { max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .qe-header > .qe-original-news-strip {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    overflow: hidden;
    padding: 0;
    width: auto;
  }
  .qe-header-status {
    align-self: center;
    box-sizing: border-box;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }
  .qe-header-status > #qe-profile { max-width: 82px; width: 82px; }
  .qe-header-status > #qe-command-toggle,
  .qe-header-status > #qe-settings-toggle,
  .qe-header-status > #qe-keyboard-help-toggle { flex: 0 0 30px; min-width: 30px; width: 30px; }
  .qe-tools-rail {
    bottom: 38px;
    max-height: calc(100vh - 86px);
    max-height: calc(100dvh - 86px);
    top: 48px;
    transform: translateX(0);
    visibility: visible;
    width: 168px;
  }
  body.qe-rail-collapsed .qe-tools-rail {
    pointer-events: none;
    transform: translateX(-105%);
    visibility: hidden;
  }
  .qe-mobile-rail-toggle {
    bottom: auto;
    display: inline-flex !important;
    left: 8px;
    position: fixed;
    top: 56px;
    z-index: 36;
  }
  body:not(.qe-rail-collapsed) .qe-mobile-rail-toggle { left: 176px; }
  /* The rail toggle is fixed inside the header band, so the header must
     reserve its width; without this the wordmark renders underneath it. The
     open-rail offset tracks the toggle's own shifted position. */
  .qe-header { padding-left: 78px; }
  body:not(.qe-rail-collapsed) .qe-header { padding-left: 246px; }
  .qe-main {
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    min-width: 0;
    padding: 16px 12px 46px;
    width: 100%;
  }
  .qe-product-tabs {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
  }
  .qe-product-tabs button { flex: 0 0 148px; min-width: 148px; }
  .qe-card, .qe-panel, .qe-command-grid > *, .qe-original-workflow, .qe-original-recommendation { min-width: 0; max-width: 100%; }
  .qe-table-scroll, .qe-ticker-financial-table { max-width: 100%; }
  .qe-screener-dialog-card { overflow-x: hidden; }
  #qe-next-ten-result { min-width: 0; overflow-x: hidden; }
  #qe-next-ten-result .qe-screener-table-scroll {
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }
  #qe-next-ten-result .qe-screener-table {
    min-width: 680px;
    width: max-content;
  }
  .qe-bottom-bar { padding-left: 12px; padding-right: 12px; }
}

@media (max-width: 430px) {
  .qe-header { grid-template-columns: minmax(0, 116px) minmax(0, 1fr) auto; gap: 0 4px; }
  .qe-brand { font-size: 12px; }
  .qe-brand > span:last-child { max-width: 100px; }
  .qe-header-status { gap: 3px; }
  #qe-profile { max-width: 78px !important; width: 78px !important; }
  #qe-command-toggle, #qe-settings-toggle, #qe-keyboard-help-toggle { min-width: 30px; width: 30px; }
  .qe-original-news-state { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .qe-header > .qe-original-news-strip .qe-original-news-toggle {
    display: inline-flex;
    font-size: 0;
    justify-content: center;
    min-height: 30px;
    padding: 4px;
    width: 38px;
  }
  .qe-header > .qe-original-news-strip .qe-original-news-toggle::before { content: "News"; font-size: 9px; }
  .qe-product-tabs button { font-size: 13px; min-height: 64px; padding-inline: 6px; }
  .qe-product-tabs button::after { font-size: 8px; margin-top: 4px; }
}

@media (max-width: 590px) {
  /* Both states need a reachable control: it opens the drawer when collapsed
     and closes it again after the user has inspected the tools. */
  body.qe-rail-collapsed .qe-mobile-rail-toggle,
  body:not(.qe-rail-collapsed) .qe-mobile-rail-toggle { display: inline-flex !important; pointer-events: auto; }
  body.qe-workspace, body.qe-workspace .qe-main { overflow-x: hidden; }
}

/* The fixed index ribbon can overlap the header's news affordance at desktop
   widths. Keep the real control above that non-interactive presentation layer. */
@media (min-width: 769px) {
  #qe-original-news-toggle { position: relative; z-index: 3; }
}

/* Width containment for the desktop two-column portfolio cabinet.  The
   original desktop rhythm is retained, but a panel must never enlarge the
   grid or push its sibling beyond the viewport. */
.qe-command-grid,
.qe-command-grid > *,
#qe-customer-controls,
#qe-customer-controls .qe-alignment,
#qe-customer-controls textarea {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}
#qe-customer-controls textarea { width: 100%; }

/* The original mobile drawer spans from the fixed header to the viewport
   edge; the fixed footer may overlay it but must not shorten the tool list. */
@media (max-width: 768px) {
  .qe-tools-rail {
    bottom: 0 !important;
    max-height: none !important;
  }
}

@media (max-width: 590px) {
  /* Keep the compact rail trigger at the original top-of-shell position. */
  .qe-mobile-rail-toggle {
    bottom: auto;
    top: 56px;
  }
}

/* Final CSS-only parity refinement for the original overlay geometry.  The
   command palette intentionally keeps its 12vh launch position, while the
   original ticker/profile surfaces open as focused panels near the shell top.
   Keep the new published-only controls unchanged; this only adjusts the
   existing overlay frames. */
@media (min-width: 769px) {
  #qe-ticker-dialog,
  #qe-profile-guide {
    align-items: flex-start;
    padding: 30px 16px;
  }

  #qe-settings-panel {
    align-items: center;
    padding: 30px 16px;
  }

  #qe-settings-panel .qe-settings-card {
    max-height: 88vh;
    overflow-y: auto;
  }
}

.qe-popover-card {
  max-width: min(360px, calc(100vw - 24px));
}

@media (max-width: 768px) {
  #qe-ticker-dialog,
  #qe-profile-guide,
  #qe-settings-panel {
    align-items: flex-start;
    padding: 10px;
  }

  #qe-settings-panel .qe-settings-card {
    max-height: calc(100vh - 20px);
  }

  @supports (height: 100dvh) {
    #qe-settings-panel .qe-settings-card {
      max-height: calc(100dvh - 20px);
    }
  }
}

/* The legacy target mount remains available to the existing data/render
   contract, but the recommendation fold is its only user-facing target
   surface. Keep the compatibility node out of layout and accessibility so it
   cannot reappear as a second target/footer render. */
#target-workspace.qe-legacy-target-workspace { display: none !important; }

/* Match the original desktop fold: a compact macro strip, a padded
   recommendation workflow, 48px action cells, and the original two-column
   summary-card origin. Published detail content may expand below that fold. */
@media (min-width: 1100px) {
  .qe-product-tabs { margin-bottom: 12px; }
  .qe-original-workflow {
    min-height: 30px;
  }
  .qe-original-recommendation-card {
    min-height: 83px;
    padding: 12px;
  }
}

/* Final shell pass: keep the original top-bar rhythm while making the index
   ticker part of the news lane. The old absolute ticker could cover the news
   affordance at intermediate desktop widths. */
@media (min-width: 769px) {
  .qe-header {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(190px, auto) minmax(0, 1fr) auto;
    overflow: hidden;
  }
  .qe-header > .qe-brand { grid-column: 1; min-width: 0; }
  .qe-header > .qe-original-news-strip {
    grid-column: 2;
    flex: 0 1 auto;
    min-width: 0;
    width: auto;
  }
  .qe-header > .qe-header-status {
    grid-column: 3;
    justify-self: end;
    min-width: 0;
  }
  .qe-header > .qe-original-news-strip .qe-index-ribbon {
    align-items: center;
    flex: 0 0 132px;
    height: 26px;
    margin-left: auto;
    padding: 0 7px;
    position: static;
    transform: none;
    z-index: auto;
  }
  .qe-header > .qe-original-news-strip .qe-original-news-state {
    flex: 1 1 92px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .qe-header > .qe-original-news-strip .qe-original-news-toggle { margin-left: 0; }
  .qe-header-status > button,
  .qe-header-status > select {
    flex: 0 0 auto;
  }
}

@media (min-width: 769px) and (max-width: 1350px) {
  .qe-header > .qe-original-news-strip .qe-original-news-note { display: none; }
}

/* The compact phone header has no room for an index sub-strip. The index
   remains available at the desktop breakpoint and the market-status surface
   continues to expose all published legs below it. */
@media (max-width: 768px) {
  .qe-header > .qe-original-news-strip .qe-index-ribbon { display: none; }
}

/* Original dashboard table treatment: readable labels, tabular numbers, and
   a contained scroll surface for verbose/detail views. */
.qe-table-scroll,
.qe-screener-table-scroll,
.qe-ticker-financial-table {
  background: var(--qe-bg);
  border: 1px solid var(--qe-border);
  border-radius: 7px;
  max-width: 100%;
  overflow-x: auto;
}
/* overflow-x does nothing to an element whose display is `table`, so the rule
   above was inert wherever .qe-ticker-financial-table is the table itself
   rather than a wrapper. Measured at 768px: a 1481px-wide table inside a
   model-table detail, every ancestor overflow-x: visible, and the body not
   scrolling either -- so its right-hand columns could not be reached at all.
   Only the max-width: 430px rule set `display: block` alongside it, which is
   why this was invisible on a phone and broken on a tablet and a laptop.
   Harmless where the class names a wrapper div, which is block already. */
table.qe-ticker-financial-table { display: block; }
.qe-table-scroll table,
.qe-screener-table-scroll table,
.qe-ticker-financial-table table { margin: 0; min-width: 560px; }
.qe-card .regal-data-table th,
.qe-panel .regal-data-table th {
  background: #0d0e13;
  color: var(--qe-muted);
  font: 600 9px/1.25 "IBM Plex Mono", monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.qe-card .regal-data-table td,
.qe-panel .regal-data-table td {
  color: var(--qe-text);
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
.qe-card .regal-data-table tbody tr:hover,
.qe-panel .regal-data-table tbody tr:hover { background: rgb(223 187 100 / 5%); }
/* The 720px floor belongs to the table, not to the scroll box around it.
   On the container it beat the sibling max-width:100% -- min-width always
   wins that conflict -- so on a 375px phone the box was forced to 720px
   inside a 355px section, and body{overflow-x:hidden} clipped the excess
   with no way to reach it: roughly half the model table was unreachable.
   Applied to the table, the container stays within the viewport and scrolls
   the table inside itself, which is what overflow-x:auto was there to do. */
.qe-model-details > table,
.qe-engine-details > table { min-width: 720px; }
.qe-model-row-toggle,
.qe-engine-row-toggle,
.qe-model-row-link,
.qe-engine-row-link {
  background: #16171d;
  border-color: var(--qe-border-strong);
  color: var(--qe-accent);
}
.qe-empty-state {
  background: rgb(6 6 8 / 46%);
  border: 1px dashed var(--qe-border-strong);
  border-radius: 6px;
  color: var(--qe-muted);
  line-height: 1.55;
  margin: 0;
  padding: 11px 12px;
}
[data-freshness="LOADING"] .qe-empty-state,
.qe-loading,
.qe-state-loading { color: var(--qe-muted); }
[data-freshness="STALE"] .qe-empty-state,
.qe-state-stale { color: var(--qe-warn); }
[data-freshness="ERROR"] .qe-empty-state,
[data-freshness="UNAVAILABLE"] .qe-empty-state,
.qe-state-error { color: var(--qe-danger); }

.regal-holdings-panel { display: contents; }
@media (max-width: 768px) {
  /* One phone border contains both the allocation card and the full table. */
  body[data-mobile-app] .regal-holdings-panel {
    display: block; min-width: 0; padding: 0 10px 8px;
    border: 1px solid #dfbb64; border-radius: 8px; background: var(--mobile-surface);
    box-shadow: 0 0 0 1px rgba(223,187,100,.35), 0 0 22px rgba(223,187,100,.10);
  }
  body[data-mobile-app] .regal-holdings-panel #v33-me-2col > .es-eng-card {
    border: 0 !important; box-shadow: none !important; background: transparent !important;
    padding: 6px 0 !important;
  }
}

/* Shared interaction surfaces: gold is reserved for active/focus states and
   every modal keeps the original dark, raised-panel silhouette. */
.qe-tools-rail { background: var(--qe-rail); box-shadow: 10px 0 30px rgb(0 0 0 / 38%); }
.qe-rail-heading { color: #747c88; }
.qe-tools-rail button,
.qe-rail-link { color: #cbd1d9; }
.qe-command-palette {
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  background: rgb(0 0 0 / 74%);
  padding-top: 8vh;
}
.qe-command-palette-card {
  background: var(--qe-card);
  border-color: var(--qe-border-strong);
  border-top: 2px solid var(--qe-accent);
  box-shadow: 0 24px 90px rgb(0 0 0 / 68%);
}


.qe-command-result[aria-selected="true"] {
  background: rgb(223 187 100 / 10%);
  border-color: var(--qe-border-strong);
  outline: 1px solid var(--qe-accent);
}
.qe-settings-tabs { border-bottom-color: var(--qe-border); }
.qe-settings-tab[aria-selected="true"] {
  background: rgb(223 187 100 / 10%);
  border-color: var(--qe-border-strong);
  color: var(--qe-text);
}
.qe-profile-guide-options button:hover,
.qe-profile-guide-options button:focus-visible,
.qe-context-dialog-actions button:hover,
.qe-context-dialog-actions button:focus-visible,
.qe-watchlist-dialog-row:hover { border-color: var(--qe-accent); }
.qe-research-chat-shell {
  border-color: var(--qe-border-strong);
  box-shadow: 0 18px 60px rgb(0 0 0 / 60%);
}
.qe-research-chat-strip { background: var(--qe-rail); }
.qe-research-chat-composer { background: var(--qe-rail); }
.qe-original-workflow { color: var(--qe-muted); }
.qe-original-recommendation-card { background: var(--qe-card); }
.qe-original-recommendation-card h2 { letter-spacing: -.01em; }

@media (max-width: 768px) {
  .qe-header > .qe-original-news-strip .qe-original-news-state { flex: 1 1 auto; }
  .qe-original-workflow,
  .qe-original-recommendation { gap: 8px; }
  .qe-card .regal-data-table th,
  .qe-panel .regal-data-table th { position: static; }
  .qe-table-scroll table,
  .qe-screener-table-scroll table,
  .qe-ticker-financial-table table { min-width: 520px; }
  .qe-command-palette { padding-top: 10px; }
}

/* The reference desktop canvas keeps a fixed cabinet width at the narrow
   desktop breakpoint. This preserves the original two-card proportions and
   lets the browser clip only the far-right edge; the phone/tablet rules above
   still contain every panel and retain horizontal scrolling only where it is
   intentional (tabs/tables). */
@media (min-width: 1100px) and (max-width: 1120px) {
  .qe-main { min-width: 1088px; }
}

/* The desktop reference should not force the whole document wider than the
   viewport.  Keep this after the legacy reference-width rule so containment
   wins at the actual 1100–1120px browser breakpoint. */
@media (min-width: 1100px) and (max-width: 1120px) {
  .qe-main { min-width: 0; }
}

/* Bounded visual-parity slice: preserve the original compact dashboard chrome
   while keeping every additional published context reachable from + more.
   These are presentation-only overrides; no new-spec control is restored. */
@media (min-width: 769px) {
  /* The original rail is a true off-canvas drawer when collapsed. */
  body.qe-rail-collapsed { padding-left: 0; }
  body.qe-rail-collapsed .qe-tools-rail {
    transform: translateX(-105%);
    width: 168px;
  }
  body.qe-rail-collapsed .qe-bottom-bar { padding-left: 18px; }
  body.qe-rail-collapsed .qe-original-news-details { left: 14px; }
  body.qe-rail-collapsed .qe-mobile-rail-toggle {
    bottom: auto;
    display: inline-flex;
    left: 10px;
    position: fixed;
    top: 56px;
    z-index: 36;
  }

  /* Match the original SaaS detail surfaces: ticker is a focused 760px
     dialog, profile guide is the wide two-column chooser, and the command
     palette sits below the top-bar rhythm. */
  .qe-ticker-dialog-card {
    max-width: calc(100vw - 32px);
    min-height: 0;
    width: 760px;
  }
  .qe-screener-dialog-card {
    max-width: calc(100vw - 32px);
    width: 920px;
  }
  .qe-watchlist-dialog-card {
    max-width: calc(100vw - 32px);
    width: 900px;
  }
  #qe-profile-guide .qe-command-palette-card {
    max-width: calc(100vw - 32px);
    width: 680px;
  }
  .qe-command-palette { padding-top: 12vh; }
}

@media (max-width: 768px) {
  /* Phones keep every published context interactive while using the original
     compact multi-column strip; + more still opens the complete context board. */
  /* Dialogs remain content-sized on phones instead of inheriting desktop
     minimums that push the close/action row below the viewport. */
  .qe-ticker-dialog-card,
  .qe-screener-dialog-card,
  .qe-watchlist-dialog-card {
    min-height: 0;
    width: calc(100vw - 20px);
  }
  #qe-profile-guide .qe-command-palette-card {
    max-width: calc(100vw - 20px);
    width: calc(100vw - 20px);
  }
}

@media (max-width: 590px) {
  /* Clear the floating Tools handle from the macro label in the collapsed
     phone drawer state, matching the original shell's reserved left gutter. */
  body.qe-rail-collapsed .qe-bottom-bar { padding-left: 12px; }
}

/* Background navigation must not cover an open context dialog after resize. */
body:has(#qe-context-dialog:not([hidden])) #qe-mobile-rail-toggle { visibility: hidden !important; }

/* Leave the fixed portfolio footer readable beneath both floating controls. */
:root { --voyager-help-bottom: 60px; }

@media (min-width: 1000px) and (max-width: 1120px) {
  /* Keep the original desktop proportions while allowing the shell to shrink
     into the available content box.  The modal has its own wide surface, so
     the background cabinet must not create page-level horizontal scrolling. */
  .qe-main { max-width: 100%; min-width: 0; }
}

/* The screener table is intentionally the only horizontal scroll surface in
   the dialog.  Its fixed intrinsic columns preserve readable published facts,
   while the result viewport contains that width instead of exporting it to
   the document. */
.qe-screener-dialog-card,
#qe-next-ten-result,
#qe-next-ten-result .qe-screener-table-scroll {
  min-width: 0;
  max-width: 100%;
}
.qe-screener-dialog-card { overflow-x: hidden; }
#qe-next-ten-result { overflow-x: hidden; }
#qe-next-ten-result .qe-screener-table-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
}
#qe-next-ten-result .qe-screener-table {
  min-width: 680px;
  width: max-content;
}

/* Product cabinets are reordered during a view switch.  Keep browser scroll
   anchoring from moving the window while that existing async cabinet update
   settles; navigation code owns the scroll position. */
.qe-main { overflow-anchor: none; }

/* Bounded desktop parity slice: keep the top shell and recommendation fold
   on the same measured rhythm as the original dashboard without changing any
   product controls, labels, or runtime behavior. */
@media (min-width: 1100px) {
  .qe-header {
    box-sizing: border-box;
    height: 48px;
    max-width: 100%;
    min-width: 0;
  }
  .qe-header > .qe-brand,
  .qe-header > .qe-original-news-strip,
  .qe-header > .qe-header-status {
    min-width: 0;
  }
  .qe-main {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
  }
  .qe-product-tabs {
    box-sizing: border-box;
    margin-bottom: 12px;
    margin-top: 16px;
    max-width: 100%;
    min-width: 0;
  }
  .qe-product-tabs button {
    height: 73.6px;
    line-height: 1.1;
    min-height: 73.6px;
  }
  .qe-original-workflow,
  .qe-original-recommendation {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
  }
  .qe-original-workflow {
    margin-bottom: 13px;
    margin-top: 18px;
  }
  .qe-original-recommendation {
    margin-bottom: 14px;
    margin-top: 0;
  }
  .qe-original-recommendation-card {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }
}

/* Keep the active desktop recommendation fold aligned with the original
   cabinet while retaining the new portfolio action in the card. */
@media (min-width: 1100px) {
  .qe-brand { font-size: 15px; }
  .qe-product-tabs button {
    display: block;
    letter-spacing: .3px;
    line-height: normal;
    text-align: center;
  }
  .qe-original-recommendation-card {
    height: auto;
    min-height: 270px;
    position: relative;
  }
  #qe-original-model-target { border-color: var(--qe-accent); }
  #qe-original-your-portfolio > h2,
  #qe-original-your-portfolio > p:last-of-type { padding-right: 145px; }
  #qe-original-your-portfolio > button {
    position: absolute;
    right: 12px;
    top: 12px;
  }
}

/* The original dashboard is one recommendation cabinet followed by its one
   verbose model table.  Later summary boards repeat the same
   publication and caused overlapping charts, duplicated status, and a long
   non-original page.  Keep their mounts available to non-dashboard routes,
   but never render them as a second dashboard beneath the original cabinet. */
body[data-workspace-view="engine_picks"] .qe-daily-verdict-status,
body[data-workspace-view="engine_picks"] .qe-market-strip,
body[data-workspace-view="engine_picks"] .qe-profile-projections,
body[data-workspace-view="engine_picks"] .qe-command-grid {
  display: none !important;
}

body[data-workspace-view="engine_picks"] .qe-primary-frame {
  margin-bottom: 18px;
}

body[data-workspace-view="engine_picks"] .qe-original-detail-lane {
  margin-top: 14px;
}

body[data-workspace-view="engine_picks"] #qe-original-model-details {
  max-width: 100%;
  min-width: 0;
}

body[data-workspace-view="engine_picks"] #qe-original-model-details table {
  font-size: 10px;
  table-layout: auto;
  width: 100%;
}

body[data-workspace-view="engine_picks"] #qe-original-model-details th {
  font-size: 8px;
  letter-spacing: .045em;
  text-transform: uppercase;
  white-space: nowrap;
}

.qe-model-action {
  color: var(--qe-good);
  font: 700 9px/1 "IBM Plex Mono", monospace;
  letter-spacing: .04em;
}

.qe-model-rationale-row td {
  border-top: 0 !important;
  color: var(--qe-muted);
  font-size: 9px;
  padding-bottom: 7px !important;
  padding-left: 58px !important;
  padding-top: 0 !important;
}

.qe-model-rationale-row td[data-risk-disclosure="true"] {
  color: #efc66e;
  font-size: 10px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  padding-bottom: 10px !important;
  white-space: normal;
}

/* Bounded responsive parity slice: match the measured 390px/768px shell
   rhythm while leaving the JS-owned rail state and all published controls
   unchanged. */
@media (max-width: 768px) {
  /* The reference begins the compact macro lane directly under the fixed
     48px header; the content itself still keeps its side gutters. */
  .qe-main {
    padding-inline: 20px;
    padding-top: 0;
  }
}

@media (min-width: 591px) and (max-width: 768px) {
  /* At the intermediate reference width all three product tabs share the
     cabinet width. Keep an open rail from covering that cabinet. */
  .qe-header {
    grid-template-columns: 205px minmax(0, 1fr) auto;
  }
  #qe-settings-toggle {
    font-size: 11px;
    min-width: 75px;
    padding: 4px 8px;
    width: auto;
  }
  .qe-header-status {
    flex: 0 0 229px;
    width: 229px;
  }
  .qe-header-status > #qe-settings-toggle {
    flex: 0 0 75px;
    min-width: 75px;
    width: 75px;
  }
  body:not(.qe-rail-collapsed) .qe-main {
    margin-left: 168px;
    margin-right: 0;
    max-width: calc(100% - 168px);
    width: calc(100% - 168px);
  }
  body:not(.qe-rail-collapsed) .qe-bottom-bar { padding-left: 186px; }
  .qe-product-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    height: 110px;
    margin-top: -65px;
    overflow-x: hidden;
  }
  .qe-product-tabs button {
    flex: none;
    height: 110px;
    min-height: 110px;
    min-width: 0;
    width: auto;
  }
  .qe-bottom-bar {
    height: 25.6px;
    max-height: 25.6px;
    min-height: 25.6px;
    overflow: hidden;
  }
}
@media (max-width: 600px) {
  .qe-context-dialog-card .v33-parity-hero { flex-direction: column; }
  .qe-context-dialog-card .v33-parity-hero-stats { min-width: 0; padding: 12px; }
  .qe-context-dialog-card .v33-parity-horizon { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .qe-context-dialog-card .v33-parity-horizon span { min-width: 0; padding: 3px 6px; text-align: center; overflow-wrap: anywhere; }
}

/* The allocation pie's legend is clipped on a phone.
   The wrapper is a flex row -- a fixed 208px donut beside a legend column with
   min-width 120px -- and the owner asked for exactly that ("make pie chart
   bigger and fill the list of stocks on the right all the way to bottom of
   this panel"), so the desktop layout is left alone. Inside a 291px card body
   that row needs 342px, and the card's own overflow-x is hidden, so the right
   edge of every legend row was cut off with no way to scroll to it: measured
   at 375px, the legend ran to 384 against a 375 viewport.
   Below 480px the two stack instead. !important because the wrapper's layout
   arrives as an inline style, which a plain rule cannot reach. */
@media (max-width: 479px) {
  .es-incard-pie { flex-direction: column !important; align-items: center !important; height: auto !important; }
  .es-incard-pie > svg.es-pie-svg { width: min(208px, 100%) !important; height: auto !important; }
  .es-incard-pie > div { align-self: stretch !important; min-width: 0 !important; width: 100% !important; }
}
.regal-mobile-only { display: none; }
.regal-model-read-error { padding:8px 10px; margin:0 0 8px; border:1px solid #806b37; border-radius:4px; font-size:12px; }
.regal-model-read-error p { margin:0 0 4px; }
.regal-model-read-error button { padding:4px 8px; }
@media (min-width:769px) { body:not([data-mobile-app]) .regal-mobile-only { display:none !important; } }

/* Compact application shell. The boundary is shared with mountAdaptiveNavigation.
   Desktop uses its existing layout; no financial value is created in this layer. */
@media (max-width:768px), (max-width:1024px) and (max-height:500px) and (pointer:coarse) {
  body[data-mobile-app] {
    --mobile-surface: #11161c;
    --mobile-raised: #182029;
    --mobile-line: #303944;
    --mobile-muted: #a5b0bd;
    --mobile-accent: #e3c678;
    --mobile-top: calc(32px + env(safe-area-inset-top));
    --mobile-bottom: calc(42px + env(safe-area-inset-bottom));
    font-size: 14px;
    padding: var(--mobile-top) 0 var(--mobile-bottom) !important;
    background: #0b1015;
  }
  body[data-mobile-app] .regal-mobile-only { display: block; }
  body[data-mobile-app] [hidden] { display: none !important; }
  body[data-mobile-app] :is(button,input,select,textarea) { touch-action: manipulation; }
  body[data-mobile-app] :is(input,select,textarea) { font-size: 16px !important; }
  body[data-mobile-app] button:focus-visible { outline: 2px solid var(--mobile-accent); outline-offset: 2px; }
  body[data-mobile-app] #v33-top.qe-header {
    display: none !important; grid-template-columns: minmax(0,1fr) auto; grid-template-rows: 52px 34px !important;
    height: calc(86px + env(safe-area-inset-top)) !important; max-height: none !important;
    gap: 0 8px !important; padding: env(safe-area-inset-top) 14px 0 !important;
    background: #0c1219; border-bottom: 1px solid var(--mobile-line); align-content: start;
  }
  body[data-mobile-app] #v33-top .qe-brand { grid-column: 1; grid-row: 1; min-width: 0; gap: 8px; }
  body[data-mobile-app] #v33-top .qe-brand-wordmark { display: block !important; font-size: 0; }
  body[data-mobile-app] #v33-top .qe-brand-wordmark strong { display: inline !important; font-size: 16px; letter-spacing: -.02em; color: #f0e7ce; }
  body[data-mobile-app] #v33-top .qe-header-status { grid-column: 2 !important; grid-row: 1 !important; gap: 0; margin: 0; padding: 0; }
  body[data-mobile-app] #v33-top .qe-header-status > * { display: none !important; }
  body[data-mobile-app] #v33-top .qe-header-status > #qe-profile-picker,
  body[data-mobile-app] #v33-top .qe-header-status > #qe-sign-in-toggle:not([hidden]) { display: inline-flex !important; min-height: 44px; align-items: center; padding: 0 10px; font-size: 12px; }
  body[data-mobile-app] #v33-top > .qe-original-news-strip { grid-column: 1/-1 !important; grid-row: 2 !important; overflow: hidden; gap: 6px; padding: 0; font-size: 10px; width: 100%; }
  body[data-mobile-app] #v33-top .qe-index-ribbon { flex: 1 1 auto !important; justify-content: flex-start !important; min-width: 0; padding: 0; font-size: 11px; }
  body[data-mobile-app] #v33-top .qe-index-leg { gap: 5px; }
  body[data-mobile-app] #v33-top .qe-original-news-toggle { margin-left: auto; font-size: 0 !important; height: 32px; padding: 0 6px; }
  body[data-mobile-app] #v33-top .qe-original-news-toggle::before { content: 'News'; font-size: 11px; }
  body[data-mobile-app] #v33-top :is(.qe-original-news-label,.qe-original-news-note,.qe-original-news-state) { display: none !important; }
  body[data-mobile-app] :is(#qe-tools-rail,#qe-mobile-rail-toggle,.qe-footer,.regal-radar-dock[data-state=min]) { display: none !important; }
  body[data-mobile-app] .qe-main { margin: 0 !important; width: 100% !important; max-width: none; padding: 8px !important; min-width: 0; }
  body[data-mobile-app][data-mobile-destination=markets] :is(.qe-main,[id="qe-original-macro-source"]),
  body[data-mobile-app][data-mobile-destination=more] :is(.qe-main,[id="qe-original-macro-source"]) { display: none !important; }
  body[data-mobile-app] #qe-original-macro-source { display:none !important; }
  body[data-mobile-app] #v33-macro-tiles { padding:0 !important; }
  body[data-mobile-app] #v33-macro-row { position: static !important; padding: 4px 0 !important; border: 0 !important; background: transparent !important; }
  body[data-mobile-app] #v33-macro-row > span,
  body[data-mobile-app] #v33-macro-toggle-btn,
  body[data-mobile-app] #v33-macro-mount { display: none !important; }
  body[data-mobile-app] #v33-macro-tiles { display: block !important; }
  body[data-mobile-app] #v33-macro-tiles .regal-strip-tile { display: none !important; }
  body[data-mobile-app] #v33-macro-tiles .regal-strip-tile[data-lead=true] {
    display: flex !important; flex-direction: row !important; align-items: center; justify-content: space-between;
    width: 100%; min-height: 48px; padding: 8px 12px !important; gap: 10px !important;
    background: #141d21 !important; box-shadow: none !important; border-width: 1px !important;
  }
  body[data-mobile-app] .regal-strip-tile .regal-strip-label { flex: 0 0 auto; font-size: 11px !important; }
  body[data-mobile-app] .regal-strip-label::after { display: none; }
  body[data-mobile-app] #v33-macro-tiles .regal-strip-tile span { font-size: 10px !important; }

  /* Primary destinations stay reachable inside full-screen pages as well. */
  body[data-mobile-app] .regal-mobile-nav {
    display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); position: fixed;
    inset: auto 0 0; z-index: 900; min-height: var(--mobile-bottom); padding: 0 3px env(safe-area-inset-bottom);
    border-top: 1px solid var(--mobile-line); background: #0e151e; box-shadow: 0 -6px 24px #0004;
  }
  body[data-mobile-app] .regal-mobile-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; min-height: 36px; border: 0; border-radius: 4px; padding: 1px 0; background: transparent; color: #a5b0bd; font: 600 8.5px/1.1 system-ui,sans-serif; }
  body[data-mobile-app] .regal-mobile-nav button span { white-space: nowrap; }
  body[data-mobile-app] .regal-mobile-nav button[aria-current=page] { color: #f0d78e; background: #e3c67813; }
  body[data-mobile-app] .regal-mobile-nav button:disabled { opacity: .45; }
  body[data-mobile-app] .regal-mobile-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  body[data-mobile-app] .regal-mobile-disclaimer { display:none; }
  body[data-mobile-app][data-mobile-keyboard=true] { --mobile-bottom:0px; }
  body[data-mobile-app][data-mobile-keyboard=true] .regal-mobile-nav { display: none; }
  body[data-mobile-app] .regal-mobile-topbar { display:grid; grid-template-columns:40px repeat(3,minmax(0,1fr)); position:fixed; z-index:910; inset:0 0 auto; height:var(--mobile-top); padding-top:env(safe-area-inset-top); background:#101820; border-bottom:1px solid var(--mobile-line); }
  body[data-mobile-app] .regal-mobile-topbar button { border:0; border-radius:0; padding:3px 8px; min-height:28px; background:transparent; color:#e3c678; font:600 12px/1.3 system-ui,sans-serif; }
  /* 320px: 'Macro Panels' needed 88px in an 86px button and wrapped out of the 31px bar (2026-11-06). */
  @media(max-width:350px) { body[data-mobile-app] .regal-mobile-topbar button { padding:3px 4px; white-space:nowrap; } }
  body[data-mobile-app] .regal-mobile-topbar button + button { border-left:1px solid var(--mobile-line); }
  body[data-mobile-app] .regal-mobile-topbar button[aria-expanded=true] { background:#e3c67818; }
  body[data-mobile-app] .regal-mobile-topbar > .regal-mobile-logo { display:grid;place-items:center;padding:4px;min-width:0;overflow:visible; }
  body[data-mobile-app] .regal-mobile-logo svg { width:24px; height:24px; }
  body[data-mobile-app] .regal-mobile-trade-tabs { display:flex; order:26 !important; gap:0; padding:3px 0 5px; align-items:center; justify-content:center; position:relative; }
  body[data-mobile-app] .regal-mobile-trade-tabs button { min-height:24px; padding:3px 9px; border:1px solid var(--mobile-line); background:#151e27; color:#a5b0bd; font-size:11px; }
  body[data-mobile-app] .regal-mobile-trade-tabs button[data-mobile-route=model] { border-radius:4px; }
  body[data-mobile-app] .regal-mobile-trade-tabs button[data-mobile-route=portfolio] { border-left:1px solid var(--mobile-line); border-radius:4px; }
  body[data-mobile-app] .regal-mobile-trade-tabs button[aria-current=page] { color:#f3dfaa; background:#d6ad5020; border-color:#806b37; }
  body[data-mobile-app] .regal-mobile-trade-tabs .regal-mobile-publication { position:absolute; right:0; width:auto; min-width:0; max-width:calc((100% - 154px)/2); margin:0; border:0; background:none; font-size:9px; padding:2px 0 2px 6px; text-align:right; }
  body[data-mobile-app] .regal-mobile-link > svg { width:16px; height:16px; flex:0 0 16px; color:#d6ad50; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
  body[data-mobile-app] .regal-mobile-macro-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(108px,1fr)); gap:4px; }
  body[data-mobile-app] .regal-mobile-macro-grid .mv-tile { margin:0; padding:5px 6px; min-width:0; min-height:0; border-radius:4px; display:flex; flex-direction:column; gap:2px; }
  body[data-mobile-app] .regal-mobile-macro-grid .mv-tile .lbl { display:flex; align-items:flex-start; gap:3px; min-height:24px; margin:0; font-size:9px; line-height:1.3; }
  body[data-mobile-app] .regal-mobile-macro-grid .lbl svg { width:12px; height:12px; flex:none; }
  body[data-mobile-app] .regal-mobile-macro-grid .mv-tile .val { font-size:15px; line-height:1.2; margin:0; overflow-wrap:anywhere; }
  body[data-mobile-app] .regal-mobile-macro-grid .mv-tile :where(.sub,.eq-impact) { display:none; }
  body[data-mobile-app] .regal-mobile-macro-grid .mv-tile .val svg { display:none !important; }
  body[data-mobile-app] .regal-mobile-macro-grid .mv-tile .regal-mobile-macro-date { display:block; margin-top:auto; font-size:0 !important; }
  body[data-mobile-app] .regal-mobile-macro-grid .regal-mobile-macro-date::after { content:attr(data-mobile-date); font-size:8px; color:#a5b0bd; }
  body[data-mobile-app] .regal-mobile-macro-grid .mv-tile .band { position:static; display:block; padding:0; margin:0; border:0; font-size:8px; line-height:1.2; }
  body[data-mobile-app] .regal-mobile-pages { padding: 8px 10px 16px; }
  body[data-mobile-app] .regal-mobile-page > h1 { display:none; }
  body[data-mobile-app] :is(.regal-mobile-eyebrow,.regal-mobile-intro) { display:none; }
  body[data-mobile-app] .regal-mobile-page > input { width: 100%; }
  body[data-mobile-app] .regal-mobile-tool-group { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; }
  body[data-mobile-app] .regal-mobile-tool-group > h2 { grid-column:1/-1; color: #a5b0bd; font-size: 11px; margin: 16px 0 3px; }
  body[data-mobile-app] .regal-mobile-link { position: relative; display: flex; align-items:center; gap:4px; width: 100%; padding: 4px 22px 4px 8px; text-align: left; margin: 0 0 3px; border: 1px solid var(--mobile-line); border-radius: 4px; background: var(--mobile-surface); color: #e1e7ed; min-height: 30px; font: inherit; }
  body[data-mobile-app] .regal-mobile-link strong { font-size: 12px; font-weight: 600; }
  body[data-mobile-app] .regal-mobile-link > span { display:none; }
  body[data-mobile-app] .regal-mobile-chevron { position: absolute; right: 10px; top:50%; transform:translateY(-50%); color: var(--mobile-accent); font-size: 18px; }
  body[data-mobile-app] .regal-mobile-link:disabled { opacity: .5; }
  body[data-mobile-app] .regal-mobile-link[data-locked=true]::after { content: 'Advanced'; font-size: 10px; color: #c4b181; }
  body[data-mobile-app] .regal-mobile-publication { order: 25 !important; width: 100%; background: transparent; border: 0; color: #a5b0bd; text-align: left; padding: 4px 2px; min-height: 28px; font-size: 10px; }

  /* Existing product selection, abbreviated only at the presentation layer. */
  body[data-mobile-app] #v33-cabinet { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid var(--mobile-line); background: #111820; padding: 4px; border-radius: 11px; gap: 4px !important; }
  body[data-mobile-app] #v33-cabinet > button { min-height: 30px !important; padding: 4px 3px !important; font-size: 0 !important; border: 0 !important; border-radius: 4px !important; }
  body[data-mobile-app] #v33-cabinet > button > div { display: none; }
  body[data-mobile-app] #v33-cabinet > button::before { font: 650 12px/1.2 system-ui,sans-serif; }
  body[data-mobile-app] #v33-cabinet > [data-group=main]::before { content: 'Stock & ETF'; }
  body[data-mobile-app] #v33-cabinet > [data-group=quant]::before { content: 'ETF Quant'; }
  body[data-mobile-app] #v33-cabinet > [data-group=longterm]::before { content: 'Investing'; }
  body[data-mobile-app] #v33-me-2col { display: block !important; }
  body[data-mobile-app] #v33-me-2col > .es-eng-card { min-height: 0 !important; height: auto !important; padding: 6px 12px !important; border-radius: 8px !important; }
  body[data-mobile-app] :is(#v33-me-model-expand,#v33-me-pf-expand) { display: none !important; }
  body[data-mobile-app] :is(#v33-me-model,#v33-me-portfolio) { display: block !important; }
  body[data-mobile-app] :is(#v33-me-model,#v33-me-portfolio) .es-portfolio-list > :not(.es-model-total,.es-model-concentration) { display: none !important; }
  body[data-mobile-app] :is(#v33-me-model,#v33-me-portfolio) .es-model-total { margin: 2px 0 4px; border-top: 0; padding: 0; font-size: 11px; }
  body[data-mobile-app] :is(#v33-me-model,#v33-me-portfolio) .es-model-total :is(strong,b) { font-size: 15px; }
  body[data-mobile-app] .es-model-concentration { display:none; }
  body[data-mobile-app] :is(#v33-me-model-piebtn,#v33-me-pf-piebtn):not([hidden]) { min-height:24px; padding:2px 6px !important; }
  body[data-mobile-app] [data-mobile-redundant=true] { display: none; }
  body[data-mobile-app][data-mobile-destination=model] .regal-mobile-pages,
  body[data-mobile-app][data-mobile-destination=portfolio] .regal-mobile-pages { display: none; }
  body[data-mobile-app] #v33-me-model-count { font-size: 12px; line-height: 1.6; }
  body[data-mobile-app][data-mobile-destination=model] :is(#v33-me-portfolio-card,#regal-portfolio-table) { display: none !important; }
  body[data-mobile-app][data-mobile-destination=model] #regal-model-table { display: block !important; margin-top: 14px; }
  body[data-mobile-app][data-mobile-destination=portfolio] :is(#v33-me-model-card,#regal-model-table,#qe-original-macro-source) { display: none !important; }
  body[data-mobile-app][data-mobile-destination=portfolio] #regal-portfolio-table { display: block !important; margin-top: 14px; }
  body[data-mobile-app] .regal-note { font-size: 11px; line-height: 1.5; }
  body[data-mobile-app] #regal-model-table > .regal-full-table-title { display:none; }
  body[data-mobile-app] .regal-verdicts > h3 { display:none; }
  body[data-mobile-app] :is(#qetf-engine-panel,#ltc-panel) { padding:0 !important; border:0; background:transparent; }
  body[data-mobile-app] :is(#qetf-engine-panel,#ltc-panel) .es-stepn { display:none; }
  body[data-mobile-app] :is(#qetf-engine-panel,#ltc-panel) :is(#qetf-refresh-btn,#ltc-refresh-btn) { display:inline-flex; flex:none !important; width:max-content !important; max-width:100%; min-height:28px; margin:0 0 0 auto; padding:3px 8px !important; font-size:11px; }
  body[data-mobile-app] :is(#qetf-engine-panel,#ltc-panel) > div:first-child { margin-bottom:6px !important; gap:6px !important; }
  body[data-mobile-app] :is(#qetf-model-card,#ltc-model-card) { padding:8px 10px !important; }
  body[data-mobile-app] :is(#qetf-model-summary,#ltc-model-summary) :is(.es-model-sleeve,.es-portfolio-legend) { display:none; }
  body[data-mobile-app] :is(#qetf-model-summary,#ltc-model-summary) .es-model-row { min-height:32px; border-bottom:1px solid var(--mobile-line); }
  body[data-mobile-app] :is(#qetf-model-summary,#ltc-model-summary) .es-model-symbol { font-size:14px; }
  body[data-mobile-app] .regal-mobile-table-heading { display:grid; grid-template-columns:46px minmax(64px,1fr) 36px 36px 60px; gap:3px; padding:3px 6px; color:var(--mobile-muted); font-size:9px; }
  body[data-mobile-app] .regal-mobile-table-heading > :last-child { text-align:right; }
  body[data-mobile-app] .regal-mobile-table-heading[data-kind=portfolio] { grid-template-columns:minmax(52px,1fr) 62px minmax(106px,1.6fr); gap:6px; padding-inline:12px; }

  /* Dense decision rows: ticker, action, weight. Secondary metrics appear only
     when deliberately chosen in the comparison selector; research is one tap. */
  body[data-mobile-app] .qe-model-details { overflow: visible !important; border: 0; }
  body[data-mobile-app] .qe-model-details > table,
  body[data-mobile-app] .regal-verdict-table { display: block; min-width: 0 !important; width: 100% !important; border: 0; }
  body[data-mobile-app] :is(.qe-model-details > table,.regal-verdict-table) > thead { display: none; }
  body[data-mobile-app] :is(.qe-model-details > table,.regal-verdict-table) > tbody { display: grid; gap: 0; border:1px solid var(--mobile-line); border-radius:8px; overflow:hidden; }
  body[data-mobile-app] .qe-model-details tr.qe-model-row-clickable { display: grid; height:auto; min-height:var(--regal-table-row); grid-template-columns:46px minmax(64px,1fr) 36px 36px 60px; align-items: center; gap: 2px 3px; padding: 3px 6px; background: var(--mobile-surface); border:0; border-left:2px solid transparent; border-bottom:1px solid var(--mobile-line); border-radius:0; }
  body[data-mobile-app] .qe-model-details tr.qe-model-row-clickable:last-of-type { border-bottom:0; }
  body[data-mobile-app] .qe-model-details tr.qe-model-row-clickable > td { display: none; padding: 0 !important; border: 0 !important; min-width: 0; width: auto !important; max-width: none; white-space: normal !important; background: transparent !important; }
  body[data-mobile-app] .qe-model-details tr.qe-model-row-clickable > td:nth-child(2) { display: block; grid-row: 1; grid-column: 1; }
  body[data-mobile-app] .qe-model-details tr.qe-model-row-clickable > td:nth-child(2) button { font: 700 11px/1.2 system-ui,sans-serif !important; min-height: 30px; text-align: left !important; padding: 0; color: #e8edf3; }
  body[data-mobile-app] .qe-model-details tr.qe-model-row-clickable > .qe-model-action { display:none; }
  body[data-mobile-app] .qe-model-details :is(td[data-kind=weight],td[data-kind=sector],td[data-kind=bucket],td[data-kind=rank]) { display:block !important; grid-row:1; font-size:0 !important; }
  body[data-mobile-app] .qe-model-details td[data-kind=sector] { grid-column:2; }
  body[data-mobile-app] .qe-model-details td[data-kind=bucket] { grid-column:3; }
  body[data-mobile-app] .qe-model-details td[data-kind=rank] { grid-column:4; text-align:right; }
  body[data-mobile-app] .qe-model-details td[data-kind=weight] { grid-column:5; text-align:right; color:#e9d591; }
  body[data-mobile-app] .qe-model-details :is(td[data-kind=weight],td[data-kind=sector],td[data-kind=bucket],td[data-kind=rank]) > * { display:none !important; }
  body[data-mobile-app] .qe-model-details td[data-kind=sector]::after { content:attr(data-mobile-theme); font:500 10px/1.2 system-ui,sans-serif; }
  body[data-mobile-app] .qe-model-details td[data-kind=bucket]::after { content:attr(data-mobile-class); font:500 10px/1.2 system-ui,sans-serif; }
  body[data-mobile-app] .qe-model-details td[data-kind=rank]::after { content:attr(data-mobile-score); font:600 11px/1.2 system-ui,sans-serif; }
  body[data-mobile-app] .qe-model-details td[data-kind=weight]::after { content:attr(data-mobile-allocation); font:700 11px/1.2 system-ui,sans-serif; }
  body[data-mobile-app] .regal-mobile-table-heading[data-v5-columns=compact],
  body[data-mobile-app] .qe-model-details table[data-v5-columns=compact] tr.qe-model-row-clickable { grid-template-columns:46px minmax(40px,1fr) 38px minmax(64px,1fr) 32px; }
  body[data-mobile-app] .qe-model-details table[data-v5-columns=compact] tr.qe-model-row-clickable > td[data-kind=ticker] { display:block;grid-column:1;grid-row:1; }
  body[data-mobile-app] .qe-model-details table[data-v5-columns=compact] tr.qe-model-row-clickable > td[data-kind=ticker] > .tkr-hit { font:700 11px/1.2 system-ui,sans-serif !important;min-height:30px;padding:0;text-align:left; }
  body[data-mobile-app] .qe-model-details table[data-v5-columns=compact] tr.qe-model-row-clickable > td[data-kind=sector] { grid-column:2; }
  body[data-mobile-app] .qe-model-details table[data-v5-columns=compact] tr.qe-model-row-clickable > td[data-kind=rank] { grid-column:3; }
  body[data-mobile-app] .qe-model-details table[data-v5-columns=compact] tr.qe-model-row-clickable > td[data-kind=weight] { grid-column:4; }
  body[data-mobile-app] .qe-model-details table[data-v5-columns=compact] tr.qe-model-row-clickable > td[data-kind=earnings] { display:block;grid-row:2;grid-column:1/3;font-size:10px; }
  body[data-mobile-app] .qe-model-details table[data-v5-columns=compact] tr.qe-model-row-clickable > td[data-kind=earnings]::before { content:'Earnings · ';color:var(--mobile-muted); }
  body[data-mobile-app] .qe-model-details table[data-v5-columns=compact] tr.qe-model-row-clickable > td[data-kind=multiple] { display:block;grid-row:3;grid-column:3/6;font-size:11px; }
  body[data-mobile-app] .qe-model-details table[data-v5-columns=compact] tr.qe-model-row-clickable > td[data-kind=multiple]::before { content:'Forward P/E · ';color:var(--mobile-muted); }
  body[data-mobile-app] .qe-model-details table[data-v5-columns=compact] tr.qe-model-row-clickable > td[data-kind=favorite] { display:block;grid-row:1;grid-column:5;text-align:right; }
  body[data-mobile-app] .qe-model-details table[data-v5-columns=compact] tr.qe-model-row-clickable > td[data-kind=momentum] { display:block;grid-row:2;grid-column:3/6;font-size:11px; }
  body[data-mobile-app] .qe-model-details table[data-v5-columns=compact] tr.qe-model-row-clickable > td[data-kind=momentum]::before { content:'30d momentum · ';color:var(--mobile-muted); }
  body[data-mobile-app] .qe-model-details table[data-v5-columns=compact] tr.qe-model-row-clickable > td[data-kind=trailing] { display:block;grid-row:3;grid-column:1/3;font-size:11px; }
  body[data-mobile-app] .qe-model-details table[data-v5-columns=compact] tr.qe-model-row-clickable > td[data-kind=trailing]::before { content:'P/E · ';color:var(--mobile-muted); }
  body[data-mobile-app] .qe-model-details table[data-v5-columns=compact] tr.qe-model-row-clickable > td[data-mobile-fund-filler=true] { display:none !important; }
  /* The model's phone rows share a clear column rhythm. Long industry names
     wrap instead of becoming an ellipsis, and fund momentum uses the empty
     earnings area without hiding the actual reading. */
  body[data-mobile-app] #regal-model-table .regal-mobile-table-heading[data-v5-columns=compact],
  body[data-mobile-app] #regal-model-table .qe-model-details table[data-v5-columns=compact] tr.qe-model-row-clickable { grid-template-columns:52px minmax(0,1fr) 36px minmax(60px,max-content) 34px; column-gap:5px; }
  body[data-mobile-app] #regal-model-table .regal-mobile-table-heading[data-v5-columns=compact] > :is(:nth-child(3),:nth-child(4)) { text-align:right; }
  body[data-mobile-app] #regal-model-table .qe-model-details table[data-v5-columns=compact] tr.qe-model-row-clickable { min-height:44px; padding:7px 8px; row-gap:4px; }
  body[data-mobile-app] #regal-model-table .qe-model-details table[data-v5-columns=compact] td[data-kind=sector] { overflow:visible !important; text-overflow:clip !important; white-space:normal !important; overflow-wrap:anywhere; }
  body[data-mobile-app] #regal-model-table .qe-model-details table[data-v5-columns=compact] td[data-kind=sector]::after { line-height:1.35; }
  body[data-mobile-app] #regal-model-table .qe-model-details table[data-v5-columns=compact] :is(td[data-kind=earnings],td[data-kind=trailing]) { text-align:left !important; }
  body[data-mobile-app] #regal-model-table .qe-model-details table[data-v5-columns=compact] tr:has(> td[data-kind=earnings][data-mobile-fund-filler=true]) > td[data-kind=momentum] { grid-column:1/-1; text-align:left !important; }
  body[data-mobile-app] .regal-mobile-table-controls { display:none !important; }
  body[data-mobile-app] #regal-model-table .regal-mobile-table-controls label { flex:0 1 220px; }
  body.qe-workspace[data-mobile-app] #regal-model-table .regal-mobile-table-controls select { min-height:36px !important; }
  body.qe-workspace[data-mobile-app] #regal-model-table .regal-mobile-table-controls button { min-width:32px; min-height:32px !important; }
  body[data-mobile-app] .qe-model-details tr[data-verdict=BUY_NEW],body[data-mobile-app] .qe-model-details tr[data-verdict=ADD] { border-left-color:#8fad9d; }
  body[data-mobile-app] .qe-model-details tr[data-verdict=TRIM] { border-left-color:#dfbb64; }
  body[data-mobile-app] .qe-model-details tr[data-verdict=SELL] { border-left-color:#bf929a; }
  body[data-mobile-app] .qe-model-details tr[data-verdict=HOLD] { border-left-color:#738392; }
  body[data-mobile-app] .qe-model-details tr:is([data-verdict=BUY_NEW],[data-verdict=ADD]) td[data-kind=weight] { color:#a0c5af; }
  body[data-mobile-app] .qe-model-details tr[data-verdict=SELL] td[data-kind=weight] { color:#d2a1a8; }
  body[data-mobile-app] .qe-model-details tr.qe-model-row-clickable > td[data-mobile-secondary=true] { display: flex; grid-row: 2; grid-column: 1/-1; justify-content: space-between; gap: 10px; font-size: 12px; padding: 0 0 7px !important; }
  body[data-mobile-app] .qe-model-details td[data-mobile-secondary=true]::before { content: attr(data-mobile-label); color: #a5b0bd; font-weight: 400; }
  body[data-mobile-app] .qe-model-details tr.qe-model-rationale-row { display: none; }
  body[data-mobile-app] .qe-model-details tr.qe-model-inline-row:not([hidden]) { display: block; height: auto !important; }
  body[data-mobile-app] .qe-model-details tr.qe-model-inline-row > td { display: block; width: 100% !important; max-width: none !important; box-sizing: border-box; }
  body[data-mobile-app] .qe-model-inline-row > td { display: block; padding: 0 !important; border: 0; }
  body[data-mobile-app] .qe-inline-model-grid { grid-template-columns: 1fr !important; }
  body[data-mobile-app] .regal-mobile-table-controls { display: flex; align-items: end; gap: 4px; margin-bottom: 4px; }
  body[data-mobile-app] .regal-mobile-table-controls label { flex: 1; font-size: 0; color: #a5b0bd; display: grid; gap: 0; }
  body[data-mobile-app] .regal-mobile-table-controls select { width: 100%; }
  body[data-mobile-app] .regal-mobile-table-controls button { min-width: 28px; min-height: 28px; border: 1px solid var(--mobile-line); border-radius: 4px; background: #141e28; color: #e3c678; }
  body[data-mobile-app] .regal-verdict-table tbody > tr:not([hidden]) { display: grid; grid-template-columns: minmax(52px,1fr) 62px minmax(106px,1.6fr); align-items:center; gap: 0 6px; padding: 3px 12px; border: 0; border-bottom:1px solid var(--mobile-line); border-radius: 0; background: var(--mobile-surface); }
  body[data-mobile-app] .regal-verdict-table tbody > tr > td { display: block; padding: 0 !important; border: 0; background:transparent !important; white-space: normal; min-width: 0; }
  body[data-mobile-app] .regal-verdict-table tbody > tr > td:nth-child(2) { grid-row: 1; grid-column: 1; }
  body[data-mobile-app] .regal-verdict-table tbody > tr > td:nth-child(2) button { min-height: 28px; font-size: 12px; text-align:left; }
  body[data-mobile-app] .regal-verdict-table tbody > tr > td:first-child { grid-row: 1; grid-column: 2; justify-self: start; }
  body[data-mobile-app] .regal-verdict-table tbody > tr > td:nth-child(3) { grid-row:1; grid-column:3; text-align:right; font-size:11px; }
  body[data-mobile-app] .regal-verdict-table tbody > tr > td:nth-child(5) { grid-row:2; grid-column:1/-1; font-size:11px; text-align:right; }
  body[data-mobile-app] .regal-verdict-table tbody > tr > td:nth-child(5)::before { content:'Ticket · '; color:var(--mobile-muted); }
  body[data-mobile-app] .regal-verdict-table tbody > tr > :is(td:nth-child(4),td:nth-child(6),[data-mobile-placeholder=true]) { display:none; }
  /* Holdings/comparisons have their own evidence columns, not trade tickets. */
  body[data-mobile-app] .regal-verdict-table[data-portfolio-schema] tbody > tr > td:first-child { grid-column:1; }
  body[data-mobile-app] .regal-verdict-table[data-portfolio-schema] tbody > tr > td:nth-child(2) { grid-column:2; text-align:right; }
  body[data-mobile-app] .regal-verdict-table[data-portfolio-schema=comparison] tbody > tr > td:nth-child(4) { display:block;grid-row:2;grid-column:1/3;font-size:11px; }
  body[data-mobile-app] .regal-verdict-table[data-portfolio-schema=comparison] tbody > tr > td:nth-child(4)::before { content:'Gap · ';color:var(--mobile-muted); }
  body[data-mobile-app] .regal-verdict-table[data-portfolio-schema=comparison] tbody > tr > td:nth-child(5) { grid-column:3; }
  body[data-mobile-app] .regal-verdict-table[data-portfolio-schema=comparison] tbody > tr > td:nth-child(5)::before { content:'Value · '; }
  body[data-mobile-app] .regal-verdict-table[data-manual-preview] tbody > tr > td:nth-child(4) { display:block;grid-row:2;grid-column:1/3;font-size:11px; }
  body[data-mobile-app] .regal-verdict-table[data-manual-preview] tbody > tr > td:nth-child(4)::before { content:'Price · ';color:var(--mobile-muted); }
  body[data-mobile-app] .regal-verdict-table[data-manual-preview] tbody > tr > td:nth-child(5) { grid-column:3; }
  body[data-mobile-app] .regal-verdict-table[data-manual-preview] tbody > tr > td:nth-child(5)::before { content:'Value · '; }
  body[data-mobile-app] .regal-verdict-headline { padding:6px 8px; margin:6px 0; }
  body[data-mobile-app] .regal-verdict-headline > p { margin:4px 0; font-size:11px; line-height:1.4; }
  body[data-mobile-app] .regal-sell-disclaimer { padding:6px 8px; gap:4px; margin:6px 0; font-size:11px; }
  body[data-mobile-app] .regal-verdict-meta { display:none; }
  body[data-mobile-app] #regal-portfolio-table > .regal-full-table-title { display:none; }
  body[data-mobile-app] .regal-verdict-filters { display: flex; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; }
  body[data-mobile-app] .regal-verdict-filter { flex: 0 0 auto; min-height: 44px; }

  /* Phone dialogs are pages: one content scroller, clear back control, safe areas. */
  body[data-mobile-app] .qe-command-palette:not([hidden]) { padding: var(--mobile-top) 0 0 !important; inset: 0 !important; align-items: stretch !important; background: #0b1015; height: var(--regal-mobile-viewport,100dvh); }
  body[data-mobile-app] .qe-command-palette > section {
    display: flex !important; flex-direction: column; width: 100% !important; max-width: none !important;
    height: calc(var(--regal-mobile-viewport,100dvh) - var(--mobile-bottom) - var(--mobile-top)) !important; max-height: none !important;
    margin: 0 !important; padding: env(safe-area-inset-top) 0 0 !important; border: 0 !important; border-radius: 0 !important;
    min-width: 0; min-height:0 !important; overflow: hidden !important; background: #0d131a;
  }
  body[data-mobile-app] .qe-command-palette .qe-panel-heading { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-start !important; min-height: 30px; padding: 2px 8px; margin: 0; border-bottom: 1px solid var(--mobile-line); }
  body[data-mobile-app] .qe-command-palette .qe-panel-heading h2 { font-size: 17px; margin: 0; line-height: 1.25; }
  body[data-mobile-app] .qe-command-palette .qe-panel-heading .qe-eyebrow { display: none; }
  body[data-mobile-app] button[data-mobile-back] { order: -1; margin: 0 6px 0 0 !important; min-width: 28px; min-height: 26px; padding: 2px !important; font-size: 0 !important; border: 0 !important; background: transparent !important; color: var(--mobile-accent); }
  body[data-mobile-app] button[data-mobile-back]::before { content: '‹ Back'; font: 600 13px/1 system-ui,sans-serif; }
  body[data-mobile-app] :is(#qe-context-dialog-result,#qe-ticker-dialog-result,#qe-custom-screener,#qe-settings-content,#qe-watchlist-dialog-content,#regal-private-mount) { min-height: 0; max-height: none !important; flex: 1 1 auto; overflow: auto !important; padding: 8px 10px !important; margin: 0 !important; overscroll-behavior: contain; scroll-padding-top: 60px; }
  body[data-mobile-app] .qe-context-dialog-card .regal-context { gap: 14px; }
  body[data-mobile-app] .qe-context-dialog-card .regal-context .v33-parity-tool { padding: 0 !important; border: 0; background: transparent; }
  body[data-mobile-app] .qe-context-dialog-card .regal-tool-lead { font-size: 13px; line-height: 1.55; }
  body[data-mobile-app] .regal-context :is(.regal-stat-tiles,.regal-viz-grid) { display:grid; grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  body[data-mobile-app] .regal-stat-tiles > :last-child:nth-child(odd) { grid-column: 1/-1; }
  body[data-mobile-app] .regal-context :is(.regal-stat-tile,.regal-rot-tile) { min-width: 0; padding: 12px; }
  body[data-mobile-app] .regal-context .regal-stat-tile b { font-size: 17px; }
  body[data-mobile-app] .regal-context :is(.regal-gauge-row,.regal-shocks-grid,.regal-cycle-pairs-box) { grid-template-columns: 1fr; }
  body[data-mobile-app] .regal-context .regal-viz-toggle button,
  body[data-mobile-app] .regal-context .regal-rot-horizon button { min-height: 44px; font-size: 11px; }
  body[data-mobile-app] .regal-context :is(.regal-rank-row,.regal-smart-card) { min-width: 0; font-size: 13px; }
  body[data-mobile-app] .regal-context .regal-ask-card { margin-top: 20px; padding: 14px; }


  body[data-mobile-app] .regal-context .regal-ask-card :is(button,.regal-ask-send) { min-height: 44px; }
  body[data-mobile-app] :is(.regal-context,.regal-ticker) summary { padding: 6px 12px; min-height: 44px; line-height: 1.4; }
  body[data-mobile-app] :is(.regal-context,.regal-ticker) p { line-height: 1.6; }
  body[data-mobile-app] #qe-ticker-dialog-description { display: none; }
  body[data-mobile-app] .qe-ticker-dialog-card > .qe-panel-heading { display:none; }
  body[data-mobile-app] #qe-ticker-dialog-form { display: grid; grid-template-columns: 26px minmax(0,1fr) 52px; gap: 4px; padding: 4px 8px; margin: 0; flex: 0 0 auto; }
  body[data-mobile-app] #qe-ticker-dialog-form label { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  body[data-mobile-app] #qe-ticker-dialog-form :is(input,button) { min-height: 30px; height:30px; padding:3px 6px; font-size: 13px; }
  body[data-mobile-app] #qe-ticker-dialog-form #qe-ticker-dialog-close { min-width:24px; margin:0 !important; }
  body[data-mobile-app] #qe-ticker-dialog-form #qe-ticker-dialog-close::before { content:'‹'; font-size:20px; }
  body[data-mobile-app] #qe-ticker-dialog-recent { display: none; }
  body[data-mobile-app] #qe-ticker-dialog-recent p { display: none; }
  body[data-mobile-app] #qe-ticker-dialog-recent .qe-ticker-actions { flex-wrap: nowrap; }
  body[data-mobile-app] #qe-ticker-dialog-recent button { min-height: 36px; }
  body[data-mobile-app] .regal-mobile-ticker-tabs { position: sticky; top: -4px; z-index: 4; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 2px; padding: 0; margin-bottom: 4px; background: #0d131a; }
  body[data-mobile-app] .regal-mobile-ticker-tabs button { min-height: 26px; padding: 3px 2px; font-size: 11px; border: 0; border-bottom:1px solid var(--mobile-line); border-radius:0; color: #a5b0bd; background: transparent; }
  body[data-mobile-app] .regal-mobile-ticker-tabs button[aria-current=page] { border-bottom:2px solid #e3c678; color: #f0d78e; }
  body[data-mobile-app] #qe-ticker-dialog-result .regal-ticker { gap: 6px; }
  body[data-mobile-app] #qe-ticker-dialog-result .qe-card { padding: 6px 8px; border-radius: 6px; background: var(--mobile-surface); }
  body[data-mobile-app] .regal-ticker-head .regal-hero { flex-direction:row; align-items:center; gap:8px; padding:6px 8px; }
  body[data-mobile-app] .regal-ticker-head .regal-hero-left { display:grid; gap:3px; min-width:0; }
  body[data-mobile-app] .regal-ticker-head .regal-hero-price { justify-items:end; text-align:right; flex:0 0 auto; }
  body[data-mobile-app] .regal-ticker-head .regal-hero-name { display:block; max-width:none; white-space:normal; overflow-wrap:anywhere; }
  body[data-mobile-app] .regal-hero-symbol { font-size: 21px; line-height:1.15; }
  body[data-mobile-app] .regal-hero-name { font-size: 11px; line-height:1.25; }
  body[data-mobile-app] .regal-hero-price .regal-hero-close { font-size: 21px; line-height:1.15; }
  body[data-mobile-app] .regal-hero-chips { gap: 5px; }
  body[data-mobile-app] .regal-hero-chips .regal-hero-chip { white-space: normal; font-size: 10px; line-height: 1.4; }
  body[data-mobile-app] .regal-ticker :is(.regal-ticker-grid,.stats-grid,.regal-financial-pair) { display: grid; grid-template-columns: 1fr; gap: 6px; }
  body[data-mobile-app] .regal-ticker dl > div { gap: 10px; padding: 0; align-items:center; min-height:36px; }
  body[data-mobile-app] .regal-metric-help { min-height:36px; padding:4px 0; }
  body[data-mobile-app] .regal-ticker dt > p:empty { display:none; }
  body[data-mobile-app] .regal-ticker [data-mobile-metrics] .regal-ticker-grid > section { border:0; border-top:1px solid var(--mobile-line); border-radius:0; padding:4px 0 !important; }
  body[data-mobile-app] .regal-ticker [data-mobile-metrics] .regal-ticker-grid > section h3 { color:var(--mobile-muted); font-size:12px; margin-bottom:4px; }
  body[data-mobile-app] #qe-ticker-dialog-recent:empty { display:none; }
  body[data-mobile-app] .regal-ticker dl > div > dt { max-width: 60%; font-size: 12px; }
  body[data-mobile-app] .regal-ticker dl > div > dd { font-size: 14px; }
  body[data-mobile-app] .regal-ticker .qe-card > h3 { font-size: 15px; }
  body[data-mobile-app] .regal-verdict-card { display:flex; gap:8px; padding:8px 10px; }
  body[data-mobile-app] .regal-verdict-body { margin:0; }
  body[data-mobile-app] .regal-verdict-badge { min-width:0; padding:6px 8px; font-size:12px; }
  body[data-mobile-app] .regal-ticker .regal-engine-tiles { grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; border:1px solid var(--mobile-line); border-radius:6px; }
  body[data-mobile-app] .regal-ticker .regal-engine-tile { padding:5px 6px; gap:2px; border:0; border-right:1px solid var(--mobile-line); border-radius:0; }
  body[data-mobile-app] .regal-ticker .regal-engine-tile:last-child { border:0; }
  body[data-mobile-app] .regal-engine-tile span[data-mobile-label] { font-size:0; }
  body[data-mobile-app] .regal-engine-tile span[data-mobile-label]::before { content:attr(data-mobile-label); font-size:10px; letter-spacing:0; text-transform:none; }
  body[data-mobile-app] .regal-ticker .regal-engine-tile strong { font-size:12px; overflow-wrap:anywhere; }
  body[data-mobile-app] .regal-thesis [data-kind=thesis] p { font-size: 13px; }
  body[data-mobile-app] .regal-mobile-scroll { max-width: 100%; overflow: auto; overscroll-behavior-inline: contain; }
  body[data-mobile-app] .regal-mobile-scroll > table { margin: 0; }
  body[data-mobile-app] .qe-model-row-toggle { display: none !important; }
  body[data-mobile-app] .qe-ticker-hero > h3 { display: none; }
  body[data-mobile-app] .qe-ticker-hero [data-mobile-repeat=true] { display:none; }
  body[data-mobile-app] #qe-ticker-dialog-result .qe-ticker-hero { display:flex; flex-wrap:wrap; align-items:center; gap:6px; padding:4px 10px; }
  body[data-mobile-app] .qe-ticker-hero .regal-ticker-actions { order:-1; flex:1; gap:6px; }
  body[data-mobile-app] .qe-ticker-hero .regal-ticker-actions button { min-height:26px; font-size:10px; padding:3px 6px; }
  body[data-mobile-app] .qe-ticker-hero .qe-ticker-provenance-sources:not([open]) { margin:0; }
  body[data-mobile-app] .qe-ticker-hero .qe-ticker-provenance-sources[open] { flex-basis:100%; }
  body[data-mobile-app] #qe-original-news-details { top:var(--mobile-top); left:0; right:0; max-height:calc(var(--regal-mobile-viewport,100dvh) - var(--mobile-top) - var(--mobile-bottom)); width:100%; }
  body[data-mobile-app][data-signed-out=true] { padding-bottom: 0 !important; }
  body[data-mobile-app][data-signed-out=true] #v33-top .qe-brand-wordmark { display: block !important; }
  /* Signed out, the phone top bar is never built, so the header that holds
     Sign in is the only way back to the panel after Close (2026-10-27). */
  body[data-mobile-app][data-signed-out=true] #v33-top.qe-header { display: grid !important; grid-template-rows: 52px !important; height: calc(52px + env(safe-area-inset-top)) !important; }
  body[data-mobile-app][data-signed-out=true] #v33-top > .qe-original-news-strip { display: none !important; }
  body[data-mobile-app][data-signed-out=true] { padding-top: calc(60px + env(safe-area-inset-top)) !important; }
  body[data-mobile-app] #qe-settings-panel:not([hidden]) { display:flex; padding:var(--mobile-top) 0 0; inset:0; align-items:stretch; }
  body[data-mobile-app] #qe-settings-panel > .qe-settings-card { display:flex; flex-direction:column; width:100%; max-width:none; height:calc(var(--regal-mobile-viewport,100dvh) - var(--mobile-bottom) - var(--mobile-top)); max-height:none; margin:0; border:0; border-radius:0; padding:env(safe-area-inset-top) 0 0; overflow:hidden; }
  body[data-mobile-app] .qe-original-settings-head { flex:none; justify-content:flex-start; min-height:32px; padding:3px 10px; margin:0; border-bottom:1px solid var(--mobile-line); }
  body[data-mobile-app] .qe-original-settings-head h2 { font-size:15px; }
  body[data-mobile-app] #qe-settings-panel .qe-settings-card > .actions-row { display:none; }
  body[data-mobile-app] #qe-settings-panel .set-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; margin:0 0 6px; }
  body[data-mobile-app] #qe-settings-panel .set-tabs button { min-height:28px; padding:3px 4px; font-size:11px; }
  body[data-mobile-app][data-workspace-view=research_chat] .qe-main { display:block !important; }
  body[data-mobile-app][data-workspace-view=research_chat] .regal-mobile-pages { display:none; }
  body[data-mobile-app][data-workspace-view=research_chat] #qe-research-chat { position:fixed; inset:var(--mobile-top) 0 0; transform:none; width:100%; max-width:none; height:calc(var(--regal-mobile-viewport,100dvh) - var(--mobile-bottom) - var(--mobile-top)); padding:0; margin:0; border:0; border-radius:0; }
  body[data-mobile-app] .qe-research-chat-shell { height:100%; min-height:0; max-width:none; border:0; border-radius:0; }
  body[data-mobile-app] .qe-research-chat-strip { padding:8px 10px; }
  body[data-mobile-app] .qe-research-chat-strip h2 { font-size:16px; }
  body[data-mobile-app] #qe-research-chat-scope { display:none; }
  body[data-mobile-app] :is(.qe-research-chat-budget,.qe-chat-spendbar,.qe-research-chat-how) { margin:0; padding:6px 10px; font-size:11px; }
  body[data-mobile-app] .qe-research-chat-how summary { padding:4px 0; min-height:32px; }
  body[data-mobile-app] .qe-research-chat-messages { min-height:0; padding:8px 10px; }
  body[data-mobile-app] .qe-research-chat-composer { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"input send" "input cancel"; gap:4px 6px; padding:6px 8px; }
  body[data-mobile-app] .qe-research-chat-composer textarea { grid-area:input; max-height:120px; }
  body[data-mobile-app] .qe-research-chat-composer > p:not([role=alert]) { display:none; }
  body[data-mobile-app] .qe-command-palette > section:not(:has(#qe-context-dialog-result,#qe-ticker-dialog-result,#qe-custom-screener,#qe-watchlist-dialog-content,#regal-private-mount)) { overflow:auto !important; }
  body[data-mobile-app] :is(#qe-profile-guide,#qe-keyboard-help,#qe-sign-in-panel,#qe-command-palette) > section > :not(.qe-panel-heading) { margin-left:14px; margin-right:14px; }
  body[data-mobile-app] #qe-watchlist-dialog > .qe-watchlist-dialog-card { overflow:auto !important; }
  body[data-mobile-app] #qe-watchlist-dialog .qe-panel-heading { position:sticky; top:0; z-index:4; background:#0d131a; }
  body[data-mobile-app] .qe-watchlist-dialog-card > :not(.qe-panel-heading) { flex:none; margin:6px 10px !important; }
  body[data-mobile-app] #qe-watchlist-dialog-content { flex:none; overflow:visible !important; padding:0 !important; }
  body[data-mobile-app] #qe-watchlist-dialog #qe-watchlist-dialog-content { width:auto; margin:0 10px !important; }
  body[data-mobile-app] #qe-watchlist-dialog-summary { display:none; }
  body[data-mobile-app] #qe-watchlist-form { display:grid; grid-template-columns:minmax(0,1fr) 56px; gap:8px; padding:4px 0; }
  body[data-mobile-app] #qe-watchlist-form label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  body[data-mobile-app] #qe-watchlist-form :is(input,button) { min-height:30px; padding:3px 8px; }
  body[data-mobile-app] .qe-watchlist-next-ten { min-width:0; }
  body[data-mobile-app] .qe-watchlist-next-ten > h3 { margin:8px 0 4px; }
  body[data-mobile-app] .qe-watchlist-next-ten > .qe-screener-dialog-description { display:none; }
  body[data-mobile-app] #qe-custom-screener .qe-screen-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 10px; }
  body[data-mobile-app] #qe-custom-screener .qe-screen-field { min-width:0; }
  body[data-mobile-app] #qe-custom-screener .qe-screen-field > span { min-height:14px; line-height:1.2; font-size:10px; }
  body[data-mobile-app] #qe-custom-screener .qe-screen-field :is(input,select) { width:100%; min-width:0; }

  /* Tool readings share a compact hierarchy: date, state, values, comparisons.
     Definitions remain on desktop and in existing source/help surfaces. */
  body[data-mobile-app] #qe-context-dialog > .qe-context-dialog-card { height:calc(var(--regal-mobile-viewport,100dvh) - var(--mobile-bottom) - var(--mobile-top)) !important; max-height:calc(var(--regal-mobile-viewport,100dvh) - var(--mobile-bottom) - var(--mobile-top)) !important; }
  body[data-mobile-app] .regal-context :is(.regal-tool-lead,.regal-gauge-note,.regal-context-method,.regal-theme-renamed) { display:none; }
  body[data-mobile-app] .qe-context-dialog-card .regal-context { gap:8px; }
  body[data-mobile-app] .regal-context :is(.regal-gauge-card,.regal-rot-hero,.regal-research-card,.regal-smart-detail) { padding:10px; border-radius:8px; gap:8px; }
  body[data-mobile-app] .regal-context :is(.regal-stat-tile,.regal-rot-tile) { padding:8px; }
  body[data-mobile-app] .regal-context .regal-gauge-head { gap:6px; margin-bottom:8px; }
  body[data-mobile-app] .regal-context .regal-gauge-card .regal-gauge-bar { height:22px; }
  body[data-mobile-app] .regal-context .regal-gauge-facts { margin-top:8px; gap:6px 12px; }
  body[data-mobile-app] .regal-context .regal-context-lines { gap:6px; }
  body[data-mobile-app] .regal-context .regal-viz-header { margin-top:12px !important; gap:6px; }
  body[data-mobile-app] .regal-context .regal-rot-hero { margin-bottom:8px; }
  body[data-mobile-app] .regal-context .regal-rot-verdict { font-size:18px; margin:8px 0 4px; }
  body[data-mobile-app] .regal-context .regal-rot-sentence { margin:4px 0 8px; font-size:12px; }
  body[data-mobile-app] .regal-context .regal-rot-tile strong { font-size:19px; }
  body[data-mobile-app] .regal-context .regal-rot-tile > span { font-size:9px; }
  body[data-mobile-app] .regal-context .regal-rot-scale { display:none; }
  body[data-mobile-app] .regal-context .regal-ask-card { padding:0; margin-top:12px; border:0; background:transparent; }
  body[data-mobile-app] .regal-ask-card > :not(.regal-mobile-ask) { display:none; }
  body[data-mobile-app] .regal-ask-card > .regal-mobile-ask { display:block; width:100%; min-height:44px; padding:8px 12px; text-align:left; color:#dfbb64; background:#151d25; border:1px solid var(--mobile-line); border-radius:6px; }
  body[data-mobile-app] .regal-smart-watchlist :is(th,td):nth-child(n+4):nth-child(-n+8) { display:none; }
  body[data-mobile-app] .regal-smart-watchlist .regal-mobile-only { display:table-cell; }
  body[data-mobile-app] .regal-smart-watchlist table { table-layout:fixed; }
  body[data-mobile-app] .regal-smart-watchlist :is(th,td):first-child { width:36px; }
  body[data-mobile-app] .regal-smart-watchlist td button { min-height:26px; padding:2px 5px; }
  body[data-mobile-app] .regal-smart-watchlist .regal-mobile-scroll { overflow:visible; }
  body[data-mobile-app] .regal-cycle-phase-card { display:none; }
  body[data-mobile-app] .regal-cycle-pairs { table-layout:fixed; width:100%; }
  body[data-mobile-app] .regal-cycle-pairs :is(th,td) { padding:7px 5px; font-size:10px; }
  body[data-mobile-app] .regal-cycle-pairs :is(th,td):first-child { width:40%; }
  body[data-mobile-app] .regal-cycle-pairs-box { padding:8px; }
  body[data-mobile-app] .regal-context .regal-heat-row { padding:6px 8px; min-height:36px; }
  body[data-mobile-app] .regal-context .regal-congress-row { gap:2px 6px; padding:5px 6px; }
  body[data-mobile-app] .regal-context .regal-heat-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  body[data-mobile-app] .regal-heat-grid > :last-child:nth-child(odd) { grid-column:1/-1; }
  body[data-mobile-app] .regal-context .regal-heat-cell { min-width:0; padding:8px; }
  body[data-mobile-app] .regal-context .regal-heat-legend > span:not(:has(i)) { display:none; }
  body[data-mobile-app] #qe-context-dialog-heading[data-mobile-title] { font-size:0 !important; }
  body[data-mobile-app] #qe-context-dialog-heading[data-mobile-title]::after { content:attr(data-mobile-title); font:700 15px/1.3 system-ui,sans-serif; }
  body[data-mobile-app] .qe-screen-table { min-width:320px !important; width:100% !important; }
  body[data-mobile-app] .qe-screen-table :is(th,td) { display:none; }
  body[data-mobile-app] .qe-screen-table :is(th,td):is(:nth-child(2),:nth-child(4),:nth-child(5),[data-mobile-comparison=true],[data-mobile-companion=true]) { display:table-cell; padding:3px 4px; font-size:11px; }
  body[data-mobile-app] .qe-screen-table .qe-screen-symbol { min-height:28px; font-size:12px; }
  body[data-mobile-app] .qe-screen-table td:nth-child(2)>small { font-size:9px; }
  body[data-mobile-app] .qe-screen > p:first-child { display:none; }

  /* Dense mobile rhythm: small controls, shared edges, full facts retained. */
  body[data-mobile-app] :is(.regal-context,.regal-ticker) :is(h3,h4,h5) { margin-top:0; margin-bottom:4px; }
  body[data-mobile-app] :is(.regal-context,.regal-ticker) p { margin-top:4px; margin-bottom:4px; line-height:1.4; }
  body[data-mobile-app] details { margin:2px 0 !important; padding:0 !important; }
  body[data-mobile-app] details > summary { min-height:24px !important; padding:2px 8px !important; margin:0 !important; gap:6px !important; font-size:11px !important; line-height:1.3; }
  body[data-mobile-app] details > summary::before { width:12px !important; height:12px !important; flex-basis:12px !important; font-size:13px !important; }
  body[data-mobile-app] details[open] > :not(summary) { margin-left:8px; margin-right:8px; }
  body[data-mobile-app] .regal-ticker dl > div { min-height:28px; gap:6px; }
  body[data-mobile-app] .regal-metric-help { min-height:28px; padding:2px 0; }
  body[data-mobile-app] .regal-ticker dl > div[data-mobile-prose=true] { display:grid; grid-template-columns:1fr; gap:1px; padding:4px 0; }
  body[data-mobile-app] .regal-ticker dl > div[data-mobile-prose=true] :is(dt,dd) { max-width:none; text-align:left; }
  body[data-mobile-app] .regal-ticker dl > div[data-mobile-prose=true] dd { font-size:12px; line-height:1.4; }
  body[data-mobile-app] .regal-mobile-number { font-size:0 !important; }
  body[data-mobile-app] .regal-mobile-number::after { content:attr(data-mobile-value); font-size:var(--mobile-number-font,12px); line-height:1.2; }
  body[data-mobile-app] .regal-thesis-source { font-size:0 !important; margin:3px 0; }
  body[data-mobile-app] .regal-thesis-source > * { display:none; }
  body[data-mobile-app] .regal-thesis-source::after { content:attr(data-mobile-source); font-size:10px; line-height:1.3; }
  body[data-mobile-app] .regal-thesis-block { padding:6px 8px; margin:4px 0; }
  body[data-mobile-app] .regal-ticker .regal-verdict-card { display:grid; grid-template-columns:auto 1fr auto; gap:2px 6px; padding:5px 8px; }
  body[data-mobile-app] .regal-verdict-body { display:contents; }
  body[data-mobile-app] .regal-verdict-badge { grid-column:1; grid-row:1; padding:3px 5px; font-size:10px; white-space:nowrap; }
  body[data-mobile-app] .regal-verdict-line { grid-column:2; grid-row:1; margin:0; font-size:11px; }
  body[data-mobile-app] .regal-verdict-line[data-mobile-allocation] { font-size:0; }
  body[data-mobile-app] .regal-verdict-line[data-mobile-allocation]::after { content:attr(data-mobile-allocation); font-size:12px; font-weight:600; }
  body[data-mobile-app] .regal-verdict-conviction { grid-column:3; grid-row:1; padding:3px 5px; font-size:10px; }
  body[data-mobile-app] .regal-verdict-readout { grid-column:1/-1; margin:0; font-size:11px; }
  body[data-mobile-app] .regal-verdict-readout[data-mobile-readout] { font-size:0; }
  body[data-mobile-app] .regal-verdict-readout[data-mobile-readout]::after { content:attr(data-mobile-readout); font-size:11px; line-height:1.3; }
  body[data-mobile-app] .regal-sell-disclaimer { grid-column:1/-1; display:flex; justify-content:flex-start; align-items:center; gap:8px; padding:0 !important; border:0; border-radius:0; background:none; margin:2px 0; min-height:24px; }
  body[data-mobile-app] .regal-sell-disclaimer > span { font-size:0; }
  body[data-mobile-app] .regal-sell-disclaimer > span::after { content:'SELL = outside model'; font-size:10px; }
  body[data-mobile-app] .regal-sell-disclaimer button { min-height:24px; padding:0 4px; margin:0; font-size:0; }
  body[data-mobile-app] .regal-sell-disclaimer button::after { content:'Meaning'; font-size:10px; }
  body[data-mobile-app] :is(.regal-viz-toggle,.regal-rot-horizon) button,
  body[data-mobile-app] .regal-ask-card > .regal-mobile-ask,
  body[data-mobile-app] .regal-verdict-filter { min-height:28px !important; padding:3px 8px; }
  body[data-mobile-app][data-mobile-destination=more] .regal-mobile-pages { position:fixed;inset:var(--mobile-top) 0 var(--mobile-bottom);padding:8px;overflow:hidden auto; }
  body[data-mobile-app] .regal-mobile-all-tools { min-height:100%;display:flex;flex-direction:column; }
  body[data-mobile-app] .regal-mobile-all-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(7,minmax(72px,1fr));gap:6px;flex:1 1 0;min-height:540px; }
  /* The grid took the whole fixed page: Legal & data sat under the bottom bar and the Feedback chip covered Settings & Access (375 px, Nov 6). A 72px footer holds the link beside the chip, so the grid ends above it; a short screen scrolls instead of squeezing tiles below 72px (320x568: Geopolitical Shocks needs 69px). */
  body[data-mobile-app] .regal-mobile-all-tools > .regal-mobile-legal { flex:none;display:flex;align-items:center;align-self:flex-start;min-height:72px;margin:0;padding:0 4px; }
  body[data-mobile-app] .regal-mobile-all-grid .regal-mobile-link { margin:0;min-height:0;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:5px;padding:4px;text-align:center; }
  body[data-mobile-app] .regal-mobile-all-grid .regal-mobile-link strong { font-size:11px;line-height:1.2;overflow-wrap:break-word;hyphens:auto; }
  body[data-mobile-app] .regal-mobile-all-grid .regal-mobile-chevron { display:none; }
  body[data-mobile-app] .regal-mobile-all-grid .regal-mobile-link > svg { width:26px; height:26px; flex:0 0 26px; }
  @media(max-width:350px) { body[data-mobile-app] .regal-mobile-all-grid .regal-mobile-link > svg { width:22px; height:22px; flex-basis:22px; } }
  body[data-mobile-app] .regal-mobile-link[data-mobile-pinned=true] { border-color:#796331;background:#282417; }
  body[data-mobile-app] .regal-mobile-link[data-mobile-pinned=true]::after { content:'Pinned';color:#dfbb64;font-size:9px; }
  body[data-mobile-app] .regal-mobile-link[data-mobile-utility=true] { background:transparent; }
  /* Landscape phones only: a short but narrow viewport (a small pane, a phone
     with the keyboard up) got six 56px columns and broke words mid-way. */
  @media(max-height:500px) and (min-width:560px) { body[data-mobile-app] .regal-mobile-all-grid { grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(4,minmax(80px,1fr));gap:4px;min-height:332px; } }
  body[data-mobile-app] .regal-radar svg { max-height:190px; }
  body[data-mobile-app] .regal-ticker .msp-donut-legend .row { min-height:26px; padding:3px 6px; font-size:11px; }
  body[data-mobile-app] .regal-factor-detail { min-height:0; padding:4px 6px; font-size:11px; }
  body[data-mobile-app] .regal-mobile-guide { font-size:12px; line-height:1.4; }
  body[data-mobile-app] :is(#regal-lookthrough,#regal-slot-lookthrough,#regal-earnings-calendar,#regal-slot-history) { scroll-margin-top:40px; }
  body[data-mobile-app] .regal-ticker dt > p { display:none; }
  body[data-mobile-app] :is(.regal-mobile-ticker-tabs,#v33-cabinet,.regal-mobile-topbar,.regal-mobile-nav,.regal-mobile-trade-tabs,#qe-settings-panel .set-tabs),
  body[data-mobile-app] #qe-ticker-dialog-result .qe-card:not(:has(canvas,svg,iframe,table,input,select,textarea)) { touch-action:pan-y pinch-zoom; }

  /* Compact utility tables and forms. Original cells and exact values stay in the DOM. */
  body[data-mobile-app] .regal-mobile-allocation,
  body[data-mobile-app] .regal-verdict-table:not([data-manual-preview]) tbody > tr > td:nth-child(3) { font-size:0 !important; }
  body[data-mobile-app] .regal-mobile-allocation > *,
  body[data-mobile-app] .regal-verdict-table:not([data-manual-preview]) tbody > tr > td:nth-child(3) > * { display:none; }
  body[data-mobile-app] .regal-mobile-allocation::after,
  body[data-mobile-app] .regal-verdict-table:not([data-manual-preview]) tbody > tr > td:nth-child(3)::after { content:attr(data-mobile-allocation); font-size:12px; font-weight:600; white-space:nowrap; }
  body[data-mobile-app] .es-model-total .regal-mobile-allocation::after { font-size:14px; }
  body[data-mobile-app] .regal-verdict-table tbody > tr { min-height:32px; }
  body[data-mobile-app] .regal-verdict-table tbody > tr > td:nth-child(5):not([data-mobile-placeholder=true]) { font-size:10px; padding:2px 0 !important; }
  body[data-mobile-app] .regal-thesis { gap:4px !important; }
  body[data-mobile-app] .regal-thesis > [data-kind=thesis] h4 { display:none; }
  body[data-mobile-app] .regal-ticker .regal-thesis-grid { grid-template-columns:1fr; gap:4px; }
  body[data-mobile-app] .regal-ticker .regal-hero-price { gap:3px; }
  body[data-mobile-app] .regal-ticker .regal-hero-price small { font-size:9px; }
  body[data-mobile-app] .regal-ticker :is(select,input:not([type=range])) { min-height:30px; height:30px; padding:3px 6px; }
  body[data-mobile-app] .regal-ticker .stat-label { min-height:26px; padding:2px 0; }
  body[data-mobile-app] .regal-ticker .stat-row { gap:6px; padding:3px 0; }
  body[data-mobile-app] .regal-mobile-macro-grid button.mv-tile { text-align:left; align-items:stretch; background:#0d1218; font:inherit; color:inherit; }
  body[data-mobile-app] .regal-mobile-macro-grid .mv-tile .val { min-height:20px; }
  body[data-mobile-app] #qe-custom-screener { padding:6px 10px !important; }
  body[data-mobile-app] #qe-custom-screener .qe-screen-form { margin:0 0 6px; padding:8px; }
  body[data-mobile-app] #qe-custom-screener .qe-screen-actions { gap:6px; margin-top:8px; }
  body[data-mobile-app] #qe-custom-screener .qe-screen-actions button { min-height:28px; padding:3px 10px; }
  body[data-mobile-app] #qe-custom-screener .qe-screen-field > span[data-mobile-label] { font-size:0; }
  body[data-mobile-app] #qe-custom-screener .qe-screen-field > span[data-mobile-label]::after { content:attr(data-mobile-label); font-size:10px; }


  body[data-mobile-app] .qe-screen-table { table-layout:fixed; }
  body[data-mobile-app] .qe-screen-table :is(th,td):nth-child(2) { width:70px; }
  body[data-mobile-app] .qe-screen-table :is(th,td):nth-child(4) { width:auto; white-space:normal; }
  body[data-mobile-app] .qe-screen-table :is(th,td):nth-child(5) { width:42px; }
  body[data-mobile-app] .qe-screen-table :is([data-mobile-comparison=true],[data-mobile-companion=true]) { width:61px; text-align:right; }
  body[data-mobile-app] .qe-screen-table .qe-screen-theme > small { display:none; }
  body[data-mobile-app] .qe-screen-table th { font-size:9px !important; white-space:normal; }
  body[data-mobile-app] #qe-watchlist-dialog-content > .qe-watchlist-dialog-state { margin:4px 0 8px; font-size:11px; }
  body[data-mobile-app] #qe-settings-panel :is(input:not([type=range],[type=checkbox]),select) { min-height:30px; height:30px; padding:3px 6px; }
  body[data-mobile-app] #qe-settings-panel .qe-original-settings-head button { min-height:28px; height:28px; }
  body[data-mobile-app] #qe-settings-panel .set-tab[data-mobile-label] { font-size:0; }
  body[data-mobile-app] #qe-settings-panel .set-tab[data-mobile-label]::after { content:attr(data-mobile-label); font-size:11px; }
  body[data-mobile-app] #qe-settings-content { padding:6px 10px; }
  body[data-mobile-app] #qe-settings-content p { margin:6px 0; line-height:1.4; }
  body[data-mobile-app] #qe-settings-content button { min-height:28px; padding:4px 8px; }
  body[data-mobile-app] .qe-profile-guide-options { gap:6px; margin-top:8px; }
  body[data-mobile-app] .qe-profile-guide-options button { min-height:44px; padding:6px 8px; line-height:1.25; }
  body[data-mobile-app] .qe-profile-guide-options button span { font-size:10px; }
  body.qe-workspace[data-mobile-app] #qe-profile-guide .qe-command-palette-card { padding:12px !important; }
  body.qe-workspace[data-mobile-app] #qe-profile-guide .qe-command-palette-card > * { margin-left:0 !important; margin-right:0 !important; }
  body.qe-workspace[data-mobile-app] #qe-profile-guide .qe-muted { margin-block:6px; font-size:12px; line-height:1.35; }
  body.qe-workspace[data-mobile-app] #qe-profile-guide .qe-profile-guide-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:0; }
  body.qe-workspace[data-mobile-app] #qe-profile-guide .qe-profile-guide-options > button { margin:0 !important; padding:10px !important; display:flex; flex-direction:column; align-items:stretch; text-align:left; min-width:0; }
  body.qe-workspace[data-mobile-app] #qe-profile-guide .qe-profile-guide-options > button > strong { font-size:13px; line-height:1.3; }
  body.qe-workspace[data-mobile-app] #qe-profile-guide .qe-profile-guide-options > button > span { font-size:11px; line-height:1.3; margin:3px 0 8px; }
  body.qe-workspace[data-mobile-app] #qe-profile-guide .regal-profile-estimates { margin:auto 0 0; font-size:11px; gap:4px; }
  body.qe-workspace[data-mobile-app] #qe-profile-guide .regal-profile-estimates > div { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px; }
  body[data-mobile-app] #qe-research-chat-send { grid-area:send; }
  body[data-mobile-app] #qe-research-chat-cancel { grid-area:cancel; }
  body[data-mobile-app] .qe-research-chat-composer button { min-height:26px; margin:0; padding:3px 8px; font-size:11px; }
  body[data-mobile-app] .qe-research-chat-composer [role=alert] { grid-column:1/-1; }
  body[data-mobile-app] #qe-research-chat-close { font-size:0; min-width:28px; }
  body[data-mobile-app] #qe-research-chat-close::after { content:'×'; font-size:16px; }
  body[data-mobile-app] .regal-verdicts { margin:6px 0; }
  body[data-mobile-app] .regal-verdict-filters { margin:6px 0; }
  body[data-mobile-app] .qe-next-ten table { width:100%; min-width:0 !important; table-layout:fixed; }
  body[data-mobile-app] .qe-next-ten :is(th,td) { padding:3px 4px; font-size:10px; white-space:normal; }
  body[data-mobile-app] .qe-next-ten :is(th,td):first-child { width:30px; }
  body[data-mobile-app] .qe-next-ten :is(th,td):nth-child(2) { width:48px; }
  body[data-mobile-app] .qe-next-ten :is(th,td):last-child { width:28px; }
  body[data-mobile-app] .qe-next-ten :is(th button,td button) { min-height:26px; padding:2px; font-size:inherit; }
  body[data-mobile-app] .qe-next-ten th { font-size:9px; }
  body[data-mobile-app] .qe-next-ten ~ p:empty { display:none; }
  body[data-mobile-app] #regal-risk-radar[data-state=open] { top:var(--mobile-top); bottom:var(--mobile-bottom); left:8px; right:8px; width:auto; max-height:none; z-index:900; padding:6px; background:var(--mobile-surface); border:1px solid var(--mobile-line); border-radius:6px; overflow:hidden; pointer-events:auto; }
  body[data-mobile-app] #regal-risk-radar .regal-radar-panel { min-height:0; max-height:100%; gap:6px; }
  body[data-mobile-app] #regal-risk-radar .regal-radar-bar { position:sticky; top:0; z-index:1; }
  body[data-mobile-app] #regal-risk-radar .regal-radar-card { padding:6px 8px; }
  body[data-mobile-app] #regal-risk-radar .regal-radar-min { min-height:26px; min-width:26px; }
  body[data-mobile-app] .regal-exposure-stats { gap:6px; margin:6px 0 10px; }
  body[data-mobile-app] .regal-exposure-stats > div { padding:6px 8px; }
  body[data-mobile-app] .regal-exposure-stats span { font-size:10px; min-height:24px; }
  body[data-mobile-app] .regal-exposure-stats strong { font-size:16px; margin-top:2px; }
  body[data-mobile-app] .regal-exposure-leaders { gap:4px 10px; margin:6px 0 10px; }
  body[data-mobile-app] .regal-exposure-leaders > div { padding:3px 6px; font-size:12px; min-height:28px; }
  body[data-mobile-app] .regal-exposure-leaders > :last-child:nth-child(odd) { grid-column:1/-1; }
  body[data-mobile-app] .regal-earnings-boards { gap:8px; }
  body[data-mobile-app] .regal-earnings-boards > section { padding:6px; }
  body[data-mobile-app] .regal-earnings-boards > section h4 { font-size:11px; margin:6px 0; }
  body[data-mobile-app] .regal-earnings-boards .regal-earnings-table :is(th,td) { padding:4px 3px; font-size:10px; }
  body[data-mobile-app] .regal-earnings-boards .regal-earnings-table th { font-size:9px; white-space:normal; }
  body[data-mobile-app] .regal-earnings-scroll:not(.is-expanded) .regal-earnings-table { table-layout:fixed; }
  body[data-mobile-app] .regal-earnings-scroll:not(.is-expanded) :is(th,td):first-child { width:66px; }
  body[data-mobile-app] .regal-earnings-scroll:not(.is-expanded) :is(th,td):nth-child(2) { width:60px; } /* 44px split "TICKER" (2026-10-27) */
  body[data-mobile-app] .regal-earnings-verdict { white-space:normal; font-size:10px; }
  body[data-mobile-app] .regal-earnings-table .tkr-hit { min-height:24px; }
  body[data-mobile-app] #regal-private-mount .regal-review-details { padding:8px; }
  body[data-mobile-app] .regal-review-details p { margin:4px 0 8px; font-size:12px; line-height:1.4; }
  body[data-mobile-app] .regal-review-details :is(th,td) { padding:4px 6px; font-size:11px; }
  body[data-mobile-app] .qe-quant-facts { gap:0 8px; margin:6px 0 0; grid-template-columns:minmax(90px,.9fr) minmax(0,1.3fr); }
  body[data-mobile-app] .qe-quant-facts :is(dt,dd) { padding:4px 0; min-height:26px; font-size:11px; line-height:1.35; }
  body[data-mobile-app] .qe-quant-facts dt { font-size:9px; }
  body[data-mobile-app] :is(#qetf-engine-panel,#ltc-panel) > div:first-child { display:flex !important; flex-direction:row !important; flex-wrap:wrap !important; align-items:center; }
  body[data-mobile-app] :is(#qetf-engine-panel,#ltc-panel) > div:first-child > .es-quant-h { display:inline; flex:1; font-size:12px; }
  body[data-mobile-app] :is(#qetf-engine-panel,#ltc-panel) > div:first-child > span:empty { display:none; }
  body[data-mobile-app] #ltc-panel > div:first-child > span:not([id],.es-quant-h) { display:none; }
  body[data-mobile-app] #ltc-status { flex-basis:100%; }

}

@media(max-width:768px), (max-width:1024px) and (max-height:500px) and (pointer:coarse) {
 body[data-mobile-app] .regal-ticker .regal-radar svg { max-height:none !important;height:auto !important;width:100%; }
 body[data-mobile-app] .regal-factor-axis-buttons { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px; }
 body[data-mobile-app] .regal-factor-axis-buttons button { min-height:32px;padding:4px 6px;font-size:13px;text-align:left;white-space:normal; }
 body[data-mobile-app] .regal-ticker-head .regal-hero-chips { display:flex;flex-wrap:wrap; }
 body[data-mobile-app] .regal-radar-min { min-height:32px;padding:4px 8px;font-size:12px; }
 body[data-mobile-app] .regal-radar-dismiss { width:32px;height:32px;min-width:32px;min-height:32px;font-size:18px; }
}

\r\n
