/* Wealth on a desktop screen. Everything inside the media query is scoped to html.assist-wealth; phones and tablets keep
   their own layout. The `body` in each selector outranks the styles modules inject at runtime. */
.hdr-search, .hdr-add, .hb-actions, .pf-thead, .home-upcoming { display: none; }
.nav-label-sec { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 18px 12px 6px; }
.nav-spacer { flex: 1 1 24px; min-height: 12px; }
button.nav-ask { width: 100%; border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; }
body.sidebar-collapsed .nav-label-sec { display: none; }

/* Collection rows, at every width. dashboards/css/profile.css also styles `.pf-row` (boxed, 84px first column) and, once
   loaded by an earlier page, took over these rows; the id keeps them as collection rows. */
html body #pfRows .pf-row { background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none; padding: 16px 46px 16px 4px; margin: 0; }
@media (max-width: 1000px) { html body #pfRows .pf-row { display: flex; align-items: center; gap: 12px; } }

@media (min-width: 1101px) {
  html.assist-wealth body .portal-sidebar .portal-nav { display: flex; flex-direction: column; flex: 1 1 auto; overflow-y: auto; }
  html.assist-wealth body .portal-sidebar .portal-nav > * { flex-shrink: 0; }
  html.assist-wealth body .portal-header { background: var(--surface, #fff); }
  html.assist-wealth body .portal-header > div:first-child { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; }
  html.assist-wealth body .hdr-search { display: flex; align-items: center; gap: 9px; flex: 0 1 400px; height: 38px; padding: 0 14px; margin: 0; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); }
  html.assist-wealth body .hdr-search input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; width: 100%; color: var(--text); }
  html.assist-wealth body .hdr-search:focus-within { border-color: #0049ff; }
  html.assist-wealth body .hdr-add { display: inline-flex; align-items: center; height: 36px; padding: 0 15px; border-radius: 999px; background: #0049ff; color: #fff; font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }

  /* Home, Your Collections, Upcoming and Wish list name themselves in the page, centred. */
  html.assist-wealth body.own-page #portalPageTitle { position: absolute; left: -9999px; }
  html.assist-wealth body.own-page .portal-content { width: 100%; max-width: 1204px; margin: 0 auto; padding: 28px 32px 48px; }

  /* ── Home ── */
  html.assist-wealth body .hb-home .home-aside, html.assist-wealth body .home-aside-reopen { display: none; }
  html.assist-wealth body .hb-home .home-main { width: 100%; max-width: none; margin: 0; }
  html.assist-wealth body .hb-home .home-hero { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 20px; padding: 0; min-height: 0; }
  html.assist-wealth body .hb-home .home-hero-img, html.assist-wealth body .hb-home .home-greet-sub, html.assist-wealth body .hb-home .hb-search { display: none; }
  html.assist-wealth body .hb-home .home-greet { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.025em; }
  html.assist-wealth body .hb-actions { display: flex; gap: 8px; }
  html.assist-wealth body .hb-actions a { height: 36px; display: inline-flex; align-items: center; padding: 0 15px; border-radius: 999px; background: var(--surface-2, #f2f4f7); color: var(--text); font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
  html.assist-wealth body .hb-home .hb-cols { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; column-count: auto; align-items: stretch; }
  html.assist-wealth body .hb-home .home-mid, html.assist-wealth body .hb-home .home-break { display: contents; }
  html.assist-wealth body .hb-home .hb-cols > *, html.assist-wealth body .hb-home .hb-cols .hb-sec, html.assist-wealth body .hb-home .hb-cols .pf-bh { margin: 0; min-width: 0; }
  html.assist-wealth body .hb-home .hb-cols .home-book { grid-column: 1 / span 4; grid-row: 1 / span 2; }
  html.assist-wealth body .hb-home .hb-cols:not(:has(.hb-s-coll)) .home-book { grid-column: 1 / -1; grid-row: auto; }
  html.assist-wealth body .hb-home .hb-cols .home-book .pf-bh { height: 100%; border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; }
  html.assist-wealth body .hb-home .hb-s-coll { grid-column: 5 / span 2; grid-row: 1; }
  html.assist-wealth body .hb-home .hb-s-alloc { grid-column: 5 / span 2; grid-row: 2; }
  html.assist-wealth body .hb-home .hb-s-movers { grid-column: 1 / span 2; grid-row: 3; }
  html.assist-wealth body .hb-home .hb-s-changed { grid-column: 3 / span 2; grid-row: 3; }
  html.assist-wealth body .hb-home .hb-cols .home-pulse { grid-column: 5 / span 2; grid-row: 3; display: flex; flex-direction: column; }
  html.assist-wealth body .hb-home .hb-cols .home-pulse:empty, html.assist-wealth body .hb-home .hb-cols .home-followavg:empty,
  html.assist-wealth body .hb-home .hb-cols .home-market:empty, html.assist-wealth body .hb-home .hb-cols .home-upcoming:empty { display: none; }
  html.assist-wealth body .hb-home .home-pulse > .hb-sec { flex: 1; }
  html.assist-wealth body .hb-home .home-pulse .hb-mk { display: flex; flex-direction: column; overflow: visible; gap: 0; margin: 0; padding: 0; }
  html.assist-wealth body .hb-home .home-pulse .hb-mc { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; width: auto; min-width: 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; padding: 10px 0; }
  html.assist-wealth body .hb-home .home-pulse .hb-mc small { margin: 0 auto 0 0; }
  html.assist-wealth body .hb-home .home-pulse .hb-mc .hb-badge { margin: 0; }
  html.assist-wealth body .hb-home .hb-cols .home-followavg, html.assist-wealth body .hb-home .hb-cols .home-market, html.assist-wealth body .hb-home .hb-cols .home-upcoming { grid-column: 1 / -1; }
  html.assist-wealth body .hb-home .hb-cols .home-upcoming { display: block; }
  html.assist-wealth body .hb-home .hb-cols .home-feed, html.assist-wealth body .hb-home .hb-cols .hb-soft { display: none; }
  html.assist-wealth body .up-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
  html.assist-wealth body .up-strip .up-card { text-decoration: none; animation: none; }
  html.assist-wealth body .up-strip .up-img, html.assist-wealth body .up-strip .up-noimg { aspect-ratio: 1; height: auto; min-height: 0; width: 100%; }

  /* ── Your Collections: heading and button, chart beside categories, then a table and the holdings ── */
  html.assist-wealth body .portal-content:has(> #pfRows) { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); column-gap: 16px; align-content: start; align-items: start; }
  html.assist-wealth body .portal-content:has(> #pfRows) > *, html.assist-wealth body .portal-content:has(> #pfRows) #pfBookBody > * { grid-column: 1 / -1; min-width: 0; }
  html.assist-wealth body .portal-content:has(> #pfRows) #pfBookBody { display: contents; }
  html.assist-wealth body .portal-content:has(> #pfRows) > .pf-page-h { display: block; grid-column: 1; grid-row: 1; align-self: center; margin: 0 0 20px; font-size: 28px; font-weight: 600; }
  html.assist-wealth body .portal-content:has(> #pfRows) > .section-hero-actions { grid-column: 2; grid-row: 1; justify-content: flex-end; align-self: center; margin: 0 0 20px; }
  html.assist-wealth body .portal-content .section-hero-actions .pf-btn-primary { width: auto; min-width: 0; min-height: 36px; height: 36px; border-radius: 999px; font-size: 13.5px; }
  html.assist-wealth body .portal-content:has(> #pfRows) > #pfBook { grid-column: 1; grid-row: 2; border: 0; border-radius: 24px; margin: 0 0 16px; align-self: stretch; }
  html.assist-wealth body .portal-content:has(> #pfRows) #pfBookBody > .pf-bk-cat { grid-column: 2; grid-row: 2; align-self: stretch; border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; margin: 0 0 16px; }
  html.assist-wealth body .pf-bk-cat .pf-bk-h { margin-top: 0; flex-wrap: wrap; }
  html.assist-wealth body .pf-bk-cat .pf-bk-cards { display: flex; flex-direction: column; gap: 8px; overflow: visible; }
  html.assist-wealth body .pf-bk-cat .pf-bk-card { width: 100%; }
  html.assist-wealth body .portal-content .pf-thead { display: grid; grid-template-columns: 1.3fr 1.6fr .7fr .9fr; gap: 16px; padding: 8px 50px 10px 4px; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--muted); }
  html.assist-wealth body .pf-thead span:last-child { text-align: right; }
  html.assist-wealth body #pfRows .pf-chg-l, html.assist-wealth body #pfRows .pf-row-val-l { display: none; }

  /* ── Upcoming and Wish list ── */
  html.assist-wealth body .portal-content .up-head, html.assist-wealth body .portal-content .up-head.up-wish { display: block; margin: 0 0 16px; }
  html.assist-wealth body .portal-content .up-head h2 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.025em; }
  html.assist-wealth body .portal-content .up-head p { display: none; }
  html.assist-wealth body .up-grid, html.assist-wealth body .up-col { gap: 14px; }

  /* Market pulse as a short list, collection rows as table rows, categories as compact lines. */
  html.assist-wealth body .hb-home .home-pulse .hb-mk > .hb-mc { flex-direction: row; text-align: left; }
  html.assist-wealth body .up-strip a.up-card, html.assist-wealth body .up-strip a.up-card p { color: var(--text); }
  html.assist-wealth body .askw-launch { display: none; }
  html.assist-wealth body #pfRows .pf-row { display: grid; grid-template-columns: 1.3fr 1.6fr .7fr .9fr; align-items: center; gap: 16px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none; background: transparent; padding: 14px 50px 14px 4px; margin: 0; }
  html.assist-wealth body #pfRows .pf-row-wrap { margin: 0; }
  html.assist-wealth body #pfRows .pf-row:hover { background: var(--surface-2, #fafbfc); }
  html.assist-wealth body #pfRows .pf-chips-l:has(+ .pf-chips) { display: none; }
  html.assist-wealth body .pf-bk-cat .pf-bk-cards > .pf-bk-card { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; padding: 10px 12px; min-height: 0; }
  html.assist-wealth body .pf-bk-cat .pf-bk-card .pf-bk-ci { grid-column: 1; grid-row: 1 / span 2; margin: 0; }
  html.assist-wealth body .pf-bk-cat .pf-bk-card .pf-bk-cn { grid-column: 2; grid-row: 1; margin: 0; }
  html.assist-wealth body .pf-bk-cat .pf-bk-card .pf-bk-cs, html.assist-wealth body .pf-bk-cat .pf-bk-card .pf-bk-gain { grid-column: 2; grid-row: 2; margin: 0; }
  html.assist-wealth body .pf-bk-cat .pf-bk-card .pf-bk-cv { grid-column: 3; grid-row: 1 / span 2; margin: 0; }
}
