/*
 * TrueMO V44 investor sidecar: responsive correction set (21 Nov 2026).
 * Imported ONLY by customer journey client/index.html, never by the public homepage.
 * Root causes: early tablet navigation collision; CSS grid min-content tracks;
 * fund screener flex/filter width; fund detail tabs/title; narrow actions.
 */

/* Let the child, rather than the entire grid track, own horizontal scrolling. */
.grid > *,
.grid.main-aside > *,
.deep-onboard-layout > *,
.life-content > *,
.fund-title > * { min-width: 0; }
.card, .card-pad, .detail-main, .life-root { max-width: 100%; }
.table-wrap {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.table-wrap .table { min-width: 650px; }

/* Forms: no label or native select may dictate the width of the page. */
.filters, .field, .field.wide { max-width: 100%; }
.filters > .field { min-width: 0; }
.field input, .field select, .field textarea, .searchbox {
  min-width: 0;
  max-width: 100%;
}

/* Fund title, metrics and sub-navigation must adapt within their own cards. */
.fund-title > :not(.fund-symbol) { min-width: 0; flex: 1 1 0; }
.fund-title .fund-big { max-width: 100%; overflow-wrap: break-word; }
.fund-title .fund-metrics { min-width: 0; }
.mini-nav, .life-nav {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.mini-nav { gap: 20px; }
.mini-nav a, .life-nav a { flex: 0 0 auto; }

/* The prior 760px breakpoint left 768-820px tablet headers overflowing. */
@media (max-width: 980px) {
  .top-inner { width: calc(100% - 48px); gap: 14px; }
  .topnav, .account-links .smalllink { display: none; }
  .account-links { flex: 0 0 auto; gap: 10px; min-width: 0; }
  .menu-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 22px;
    border: 1px solid transparent;
  }
  .menu-toggle:focus-visible { border-color: #7ab7fc; }
  .mobile-menu.open {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
    border-top: 1px solid var(--line);
    max-height: calc(100dvh - 94px);
    overflow-y: auto;
    background: rgba(255,255,255,.98);
  }
  .mobile-menu a {
    display: flex;
    align-items: center;
    min-height: 44px;
    font-size: 14px;
    font-weight: 620;
    padding: 10px 4px;
  }
}

@media (max-width: 760px) {
  .top-inner { width: calc(100% - 34px); }
  .account-links { gap: 7px; }
  .account-links .chip { font-size: 10px; padding: 5px 8px; }
  .menu-toggle { width: 44px; height: 44px; }
  /* Stacking filter controls inside the card fixes the 650px min-content issue. */
  .filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 13px;
    margin: 22px 0 18px;
  }
  .filters > .field { width: 100%; min-width: 0; }
  .filters > .field.wide { min-width: 0; grid-column: 1 / -1; }
  .filters > .btn { grid-column: 1 / -1; width: 100%; justify-self: stretch; white-space: normal; }
  /* Wide tabular financial detail is meant to scroll in the component, not on the page. */
  .card:has(> .table-wrap)::before {
    content: "Swipe table horizontally to view all columns";
    display: block;
    padding: 11px 16px 6px;
    color: #687a86;
    font-size: 11px;
    line-height: 1.4;
  }
  .mini-nav { gap: 18px; }
  .fund-title { gap: 12px; }
  .fund-title .fund-symbol { width: 45px; height: 45px; min-width: 45px; border-radius: 15px; }
  .fund-title .fund-big { font-size: clamp(25px, 7.8vw, 34px); line-height: 1.18; }
  .life-root > *, .life-content > * { min-width: 0; max-width: 100%; }
  .section-head { flex-wrap: wrap; gap: 18px; }
  .section-head > div { min-width: 0; }
  .buttons { flex-wrap: wrap; min-width: 0; }
  .buttons .btn { min-width: 0; max-width: 100%; white-space: normal; }
}

@media (max-width: 380px) {
  /* The preview chip duplicates the visible demo banner and crowds 320px phones. */
  .account-links > .chip { display: none; }
  .logo img { max-width: 120px; }
  .top-inner { gap: 7px; }
  .filters { grid-template-columns: 1fr; }
  .filters > .field.wide, .filters > .btn { grid-column: auto; }
  .fund-title .fund-big { font-size: 25px; }
}
