:root {
  --bg-page: #f5f5f5;
  --bg-0: #ffffff;
  --text: rgba(0, 0, 0, 0.85);
  --text-subtle: rgba(0, 0, 0, 0.55);
  --divider: rgba(0, 0, 0, 0.15);
  --input-divider: rgba(0, 0, 0, 0.42);
  --track: #e4e4e4;
  --action: #0074bd;
  --info: #005f9e;
  --caution: #f8a72d;
  --negative: #d91014;
  --positive: #257b25;

  /* Muted chart palette, no red. Checked as a set for color-blind separation
     (adjacent and all-pairs for the first three) with the dataviz validator. */
  --series-1: #5a9fd6; /* soft blue */
  --series-2: #5f66b8; /* muted indigo */
  --series-3: #dba95a; /* warm amber */
  --series-4: #109486; /* teal */

  --tint: #eef6fc;
  --tint-2: #f2f8fc;
  --bg-alt: #fafafa;
  --action-hover: #00639f;
  --on-action: #fff;
  --tooltip-bg: rgba(0, 0, 0, 0.85);
  --tooltip-text: #fff;
  --hover-edge: rgba(0, 0, 0, 0.3);
  --band: rgba(0, 0, 0, 0.04);
  color-scheme: light;

  --radius: 6px;
  --font-head: "Red Hat Display", system-ui, sans-serif;
  --font-body: "Red Hat Text", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { overscroll-behavior-y: none; scroll-padding-top: 80px; }
body { padding-top: 64px; }
body {
  background: var(--bg-page);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: normal;
  font-feature-settings: "lnum" 1, "tnum" 1;
  -webkit-font-smoothing: antialiased;
}
h1, h2, p, dl, dd { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
.sprite { display: none; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }

/* ---------- Top navigation ---------- */
/* Fixed (not sticky) so it never moves, including during the trackpad
   rubber-band bounce at the top/bottom of the page */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 11px 0 16px;
  background: var(--bg-0);
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.16);
}
.topnav__left { display: flex; align-items: center; gap: 32px; min-width: 0; }
.topnav__logo { display: flex; flex-shrink: 0; }
.topnav__logo img { display: block; }
.topnav__menu { display: flex; gap: 48px; }
.topnav__menu a {
  display: flex; align-items: center; height: 64px; padding: 0 4px;
  font-family: var(--font-head); font-weight: 700; font-size: 14px;
  color: var(--text-subtle); text-decoration: none;
  border-bottom: 3px solid transparent; border-top: 3px solid transparent;
}
.topnav__menu a:hover { color: var(--text); border-bottom-color: var(--action); }

.topnav__search { display: flex; margin-left: auto; }
.topnav__utility { display: flex; align-items: center; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-subtle); border-radius: var(--radius);
}
.icon-btn:hover { color: var(--text); }
.icon-btn--nav { width: 48px; height: 64px; }
#sidebar-toggle { width: 36px; height: 36px; }

.avatar { position: relative; width: 64px; height: 64px; display: grid; place-items: center; }
.avatar img { grid-area: 1 / 1; display: block; transform: translateX(3px); }
.avatar span {
  grid-area: 1 / 1; transform: translateX(3.5px);
  font-family: var(--font-body); font-weight: 600; font-size: 12px; color: #fff;
}

/* Inputs */
.select, .textfield {
  position: relative; display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 10px 0 12px;
  background: var(--bg-0);
  border: 1px solid var(--input-divider);
  border-radius: var(--radius);
  color: var(--text);
}
.select select {
  appearance: none; -webkit-appearance: none;
  position: absolute; inset: 0; width: 100%; height: 100%;
  padding: 0 52px 0 12px;
  font: inherit; font-size: 14px; color: var(--text);
  background: transparent; border: 0; cursor: pointer;
}
.select select:focus-visible { outline: none; }
.select:focus-within { outline: 2px solid var(--action); outline-offset: 1px; }
.select > svg { margin-left: auto; color: var(--text-subtle); pointer-events: none; flex-shrink: 0; }
.select--joined-left { width: 200px; border-radius: var(--radius) 0 0 var(--radius); }
.textfield { width: 261px; gap: 4px; padding: 0 12px; margin-left: -1px; }
.textfield--joined-right { border-radius: 0 var(--radius) var(--radius) 0; }
.textfield svg { color: var(--text-subtle); flex-shrink: 0; }
.textfield input {
  flex: 1; min-width: 0; height: 100%;
  font: inherit; font-size: 14px; color: var(--text);
  border: 0; background: transparent; outline: none;
}
.textfield input::placeholder { color: var(--text); }
.textfield:focus-within { outline: 2px solid var(--action); outline-offset: 1px; z-index: 1; }

/* ---------- Sidebar drawer ---------- */
/* Sits under the top nav; on desktop it pushes the page over instead of covering it */
:root { --sidebar-w: 240px; --sidebar-ease: 0.22s cubic-bezier(0.2, 0, 0, 1); }
.sidebar {
  position: fixed; z-index: 15; top: 80px; left: 16px; bottom: 36px; width: var(--sidebar-w);
  display: flex; flex-direction: column; gap: 16px;
  padding: 16px 12px; overflow-y: auto;
  background: var(--bg-0);
  border-radius: 20px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.16);
  transform: translateX(calc(-100% - 24px)) scale(0.98); transform-origin: left top;
  opacity: 0;
  visibility: hidden;
  transition: transform var(--sidebar-ease), opacity 0.16s ease, visibility 0s linear 0.22s;
}
body.sidebar-open .sidebar { transform: none; opacity: 1; visibility: visible; transition: transform var(--sidebar-ease), opacity 0.2s ease; }
.sidebar__group { display: flex; flex-direction: column; }
.sidebar__divider { display: block; width: 100%; height: 1px; flex-shrink: 0; }

.side-item {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  width: 100%; height: 32px; padding: 4px;
  border-radius: 6px; overflow: hidden;
  color: var(--text); text-decoration: none;
}
.side-item { text-align: left; }
.side-item:hover, .side-item[aria-expanded="true"] { background: var(--bg-page); }
.sidebar__empty { font-size: 14px; line-height: 1.4; color: var(--text-subtle); padding: 0 4px; }
.side-item[aria-current="page"] {
  background: rgba(0, 116, 189, 0.05);
}
/* 2px accent bar; every row reserves it so labels line up (Figma Rectangle 5577) */
.side-item::before { content: ""; width: 2px; height: 24px; border-radius: 20px; flex-shrink: 0; }
.side-item[aria-current="page"]::before { background: var(--action); }
.sidebar__group--plain .side-item::before { display: none; }
.sidebar__group--plain .side-item { gap: 8px; }
.side-item__icon { width: 28px; height: 24px; flex-shrink: 0; display: grid; place-items: center; color: var(--text); }
.side-item__icon img { display: block; }
.side-item__label {
  flex: 1; min-width: 0;
  font-family: var(--font-body); font-weight: 600; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.side-item__chev { width: 24px; height: 24px; display: grid; place-items: center; color: var(--text-subtle); flex-shrink: 0; }
/* BlackRock mark: the Figma layer crops the wordmark down to its "B" (11 × 13) */
.brand-crop { display: block; width: 11px; height: 13px; overflow: hidden; transform: translate(0.5px, 0.5px); }
.brand-crop img { display: block; width: 94.92px; height: 13.25px; max-width: none; }

.dashboard, .page-foot { transition: margin-left var(--sidebar-ease); }
@media (min-width: 801px) {
  body.sidebar-open .dashboard,
  body.sidebar-open .page-foot { margin-left: calc(var(--sidebar-w) + 14px); }
}
.scrim { position: fixed; inset: 64px 0 0 0; z-index: 14; background: rgba(0, 0, 0, 0.24); }
@media (prefers-reduced-motion: reduce) {
  .sidebar, body.sidebar-open .sidebar, .dashboard, .page-foot { transition: none; }
}
.no-anim .sidebar, .no-anim .dashboard, .no-anim .page-foot { transition: none !important; }

/* ---------- Dashboard ---------- */
/* Fluid: cards stretch with the window, keeping only the 24px gutter that
   lines up with the footer text */
.dashboard { padding: 32px 24px; }
.dashboard__inner { display: flex; flex-direction: column; gap: 24px; }
.dashboard__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dashboard__head h1 { font-family: var(--font-head); font-weight: 600; font-size: 20px; }
.dashboard__actions { display: flex; gap: 8px; }
.select--dash { width: 240px; }
.select--dash .star { margin-left: auto; color: var(--caution); pointer-events: none; }
.select--dash .star + svg { margin-left: 0; }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: var(--bg-0); border: 1px solid var(--input-divider); border-radius: var(--radius);
  color: var(--action);
}
.btn-icon:hover, .btn-icon[aria-expanded="true"] { background: var(--tint); }
button.select { font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.select__value { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.select--dash .star[hidden] { display: none; }
.select--dash .star[hidden] + svg { margin-left: auto; }
button.select:hover { border-color: var(--text-subtle); }
button.select:focus:not(:focus-visible) { outline: none; }
.btn-icon--active { position: relative; }
.btn-icon--active::after {
  content: ""; position: absolute; top: 5px; right: 5px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--action);
}

/* Dropdown menus (Figma "Dropdown-EXAMPLE") */
.menu-anchor { position: relative; }
.menu {
  position: absolute; z-index: 25; top: calc(100% + 4px); right: 0;
  min-width: 180px; padding: 8px 0;
  display: flex; flex-direction: column;
  background: var(--bg-0);
  border-radius: var(--radius);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08), 0 0 0 0.5px rgba(0, 0, 0, 0.08);
}
.menu[hidden] { display: none; }
.menu--left { left: 0; right: auto; min-width: 100%; }
.menu__item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 12px;
  font-family: var(--font-body); font-size: 14px; color: var(--text);
  text-align: left; white-space: nowrap;
}
.menu__item:hover, .menu__item:focus-visible { background: var(--bg-page); outline: none; }
.menu__item:focus-visible { box-shadow: inset 2px 0 0 var(--action); }
.menu__item[aria-disabled="true"] { opacity: 0.5; cursor: default; }
.menu__item[aria-disabled="true"]:hover { background: none; }
.menu__icon { width: 20px; height: 20px; flex-shrink: 0; display: grid; place-items: center; color: var(--action); }
.menu__icon--danger { color: var(--negative); }
.menu__check { visibility: hidden; }
.menu__item[aria-checked="true"] .menu__check { visibility: visible; }
.menu__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.menu__star { color: var(--caution); flex-shrink: 0; }
.menu__section {
  padding: 8.5px 12px; margin-top: -8px; margin-bottom: 0;
  background: var(--bg-page); border-radius: var(--radius) var(--radius) 0 0;
  font-family: var(--font-head); font-weight: 700; font-size: 12px;
  letter-spacing: 2px; text-transform: uppercase; color: var(--text);
}

.toast {
  position: fixed; z-index: 70; left: 50%; bottom: 24px; transform: translateX(-50%);
  padding: 10px 16px; border-radius: var(--radius);
  background: var(--tooltip-bg); color: var(--tooltip-text); font-size: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
}

/* 24px between widgets on every side, horizontally and vertically */
/* One 12-column grid so cards can be dragged anywhere. 24px between cards on
   every side. "dense" back-fills gaps a move leaves behind. */
.grid {
  --widget-gap: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: var(--widget-gap);
}
/* 4-column grid: a card spans 2 columns (wide) or 1 (narrow) */
.widget { --span: 2; grid-column: span var(--span); }
.widget--lg { --span: 2; }
.widget--sm { --span: 1; }
.widget--perf { --span: 1; }
.widget--prog { --span: 2; }

/* Widget card */
.widget {
  container: widget / inline-size;
  min-width: 0; height: 368px;
  display: flex; flex-direction: column; gap: 16px;
  padding: 16px;
  background: var(--bg-0);
  border: 0.5px solid var(--divider);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.widget:hover,
.widget:focus-within {
  border-color: var(--hover-edge);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.widget:hover .widget__menu { color: var(--text); }
@media (prefers-reduced-motion: reduce) {
  .widget { transition: none; }
}
.widget__head { display: flex; align-items: center; gap: 16px; height: 24px; flex-shrink: 0; }
.widget__head h2 {
  flex: 1; min-width: 0;
  font-family: var(--font-head); font-weight: 600; font-size: 16px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Drag handle: header is the drag target; the grip shows it and takes the keyboard */
.widget__head { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.widget__grip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; margin-right: -8px; border-radius: var(--radius);
  color: var(--text-subtle); cursor: grab; opacity: 0;
  transition: opacity 0.12s ease;
}
.widget:hover .widget__grip, .widget__grip:focus-visible { opacity: 1; }
.widget__grip:hover { background: var(--bg-page); color: var(--text); }
@media (hover: none) { .widget__grip { opacity: 1; } }

/* While dragging */
body.is-dragging, body.is-dragging * { cursor: grabbing !important; }
body.is-dragging { user-select: none; -webkit-user-select: none; }
body.is-dragging .widget:hover { box-shadow: none; border-color: var(--divider); }
.widget.is-placeholder {
  background: rgba(0, 116, 189, 0.04);
  border: 1.5px dashed rgba(0, 116, 189, 0.5);
  box-shadow: none;
}
.widget.is-placeholder > * { visibility: hidden; }
.widget.is-moving { box-shadow: 0 0 0 2px var(--action); }
.drag-ghost {
  position: fixed !important; z-index: 60; margin: 0; pointer-events: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.1) !important;
  border-color: var(--hover-edge) !important;
  will-change: transform;
}

.widget__menu {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: var(--radius); color: var(--text-subtle);
  opacity: 0; transition: opacity 0.12s ease;
}
/* ⋮ shows only while the card is hovered, focused, or its menu is open */
.widget:hover .widget__menu,
.widget:focus-within .widget__menu,
.widget__menu[aria-expanded="true"] { opacity: 1; }
@media (hover: none) { .widget__menu { opacity: 1; } }
.widget__menu:hover { background: var(--bg-page); color: var(--text); }
.widget__body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.widget__body--stack { gap: 12px; }
.widget__foot {
  display: flex; align-items: center; gap: 24px; flex-shrink: 0; min-height: 16px;
  font-size: 12px; color: var(--text-subtle);
}

.kpi { font-size: 16px; }
.chart { position: relative; flex: 1; min-height: 0; }
.chart svg { display: block; position: absolute; inset: 0; overflow: visible; }
.chart text { font-family: var(--font-body); font-size: 12px; fill: var(--text); font-feature-settings: "lnum" 1, "tnum" 1; }

/* Chart hover: the hovered column gets a soft band, everything else dims */
.chart .band { transition: fill 0.12s ease; }
.chart .mark, .chart .slice, .hbar__bar, .progress__fill { transition: opacity 0.12s ease, transform 0.15s ease; }
.chart .col:hover .band { fill: var(--band); }
.chart svg:has(.col:hover) .col:not(:hover) .mark { opacity: 0.35; }
.chart .guide { opacity: 0; transition: opacity 0.12s ease; pointer-events: none; }
.chart .col--area:hover .guide { opacity: 1; }
.chart .col--area:hover .band { fill: transparent; }
.chart svg:has(.slice:hover) .slice:not(:hover) { opacity: 0.4; }
.chart .slice:hover { transform: scale(1.04); }

.hbars:has(.hbar__track:hover) .hbar__track:not(:hover) .hbar__bar { opacity: 0.35; }
.progress-list:has(.progress:hover) .progress:not(:hover) .progress__fill { opacity: 0.35; }
.progress:hover .progress__label { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .chart .band, .chart .mark, .chart .slice, .chart .guide, .hbar__bar, .progress__fill { transition: none; }
  .chart .slice:hover { transform: none; }
}

.legend {
  list-style: none; margin: 0; padding: 0;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 16px;
  font-size: 12px; flex-shrink: 0;
}
.legend li { display: flex; align-items: center; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); display: inline-block; }
.dot--sm { width: 8px; height: 8px; }
.netkey { position: relative; width: 18px; height: 12px; display: inline-block; }
.netkey::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1.5px dashed var(--text); }
.netkey::after { content: ""; position: absolute; left: 5px; top: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--text); }

/* Summary + totals */
.summary { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; }
.summary__note { max-width: 260px; }
.summary__total { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; white-space: nowrap; }
.summary__total strong { font-weight: 400; font-size: 16px; }

.totals { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; }
.totals > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.totals span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.totals strong { font-weight: 400; font-size: 16px; }
.totals .strong-lg { font-weight: 600; }
.totals__right { align-items: flex-end; text-align: right; }

/* Progress lists */
.progress-list { display: flex; flex-direction: column; gap: 15px; }
/* Cards with a pager give up a little list spacing to make room for it */
.widget:has(.pager) .progress-list { gap: 12px; }
.progress { display: flex; flex-direction: column; gap: 8px; }
.progress__label { display: flex; gap: 4px; font-size: 12px; }
.progress__label span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress__track { position: relative; height: 14px; border-radius: 4px; background: var(--track); overflow: hidden; }
.progress__fill { position: absolute; inset: 0 auto 0 0; border-radius: 4px 0 0 4px; background: var(--c); transition: width 0.35s ease; }

/* Pager: always centered in the card. The footer is a 3-column grid with the
   pager in the middle column; "As of" sits in the left column. */
.widget__foot:has(.pager) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
}
.widget__foot:has(.pager) .as-of { grid-column: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.widget__foot .pager { grid-column: 2; }
/* Narrow cards: "As of" can't fit beside a centered pager, so the pager takes its own row */
@container widget (max-width: 460px) {
  .widget__foot:has(.pager) { grid-template-columns: minmax(0, 1fr); row-gap: 6px; }
  .widget__foot .pager { grid-column: 1; grid-row: 1; justify-self: center; }
  .widget__foot:has(.pager) .as-of { grid-row: 2; }
}
.pager { display: flex; align-items: center; gap: 8px; height: 16px; }
.pager button { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin: -4px 0; border-radius: var(--radius); color: var(--action); }
.pager button:disabled { color: var(--text-subtle); opacity: 0.6; cursor: default; }
.pager button:not(:disabled):hover { background: var(--bg-page); }
.pager .pager__dot { width: 24px; height: 24px; }
.pager .pager__dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--track); }
.pager .pager__dot[aria-current="true"]::before { background: var(--action); }

/* Table */
.table-wrap { flex: 1; min-height: 0; overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { height: 34px; padding: 0 12px; text-align: left; border-bottom: 1px solid var(--divider); white-space: nowrap; }
.table thead th { position: sticky; top: 0; background: var(--bg-0); font-family: var(--font-body); font-weight: 600; color: var(--text); }
.table th button { font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.table th button::after { content: ""; width: 8px; }
.table th[aria-sort="ascending"] button::after { content: "\2191"; color: var(--action); }
.table th[aria-sort="descending"] button::after { content: "\2193"; color: var(--action); }
.table .num { text-align: right; }
.table tbody tr:hover { background: var(--bg-page); }

/* Horizontal bars */
.hbars { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: minmax(120px, 34%) 1fr; align-content: start; row-gap: 9px; column-gap: 16px; padding: 4px 0; }
.hbar__label { font-size: 12px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 16px; }
.hbar__track { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hbar__bar { height: 12px; border-radius: 0 2px 2px 0; background: var(--c); flex-shrink: 0; }
.hbar__value { font-size: 12px; white-space: nowrap; }

/* Performance */
.perf { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 16px; max-width: 350px; width: 100%; margin: 0 auto; padding: 0 16px; }
.perf__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--divider); }
.perf__row:last-child { border-bottom: 0; padding-bottom: 0; }
.perf dt { font-family: var(--font-head); font-weight: 600; font-size: 16px; }
.perf dd { display: flex; align-items: center; gap: 2px; font-family: var(--font-head); font-weight: 700; font-size: 28px; }
.perf .neg { color: var(--negative); }
.perf .pos { color: var(--positive); }

/* Footer */
.page-foot { padding: 7px 24px 16px; font-size: 12px; color: var(--text-subtle); }
.link-btn { font-size: 12px; color: var(--text-subtle); }
.link-btn:hover { color: var(--action); text-decoration: underline; }
.disclosures { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.disclosures__links { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.disclosures__links a { color: var(--text-subtle); }

/* Tooltip */
.tooltip {
  position: fixed; z-index: 50; pointer-events: none;
  padding: 6px 8px; border-radius: 4px;
  background: var(--tooltip-bg); color: var(--tooltip-text);
  font-size: 12px; line-height: 1.4; white-space: nowrap;
}
.tooltip b { font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1400px) {
  .topnav__menu { gap: 24px; }
  .select--joined-left { width: 140px; }
  .textfield { width: 200px; }
}
@media (max-width: 1200px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topnav__menu { display: none; }
}
@media (max-width: 800px) {
  .dashboard { padding: 24px 16px; }
  .page-foot { padding-left: 16px; padding-right: 16px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .widget, .widget--lg, .widget--sm, .widget--perf, .widget--prog { --span: 1; }
  .topnav__search { display: none; }
  .topnav { gap: 8px; }
  .topnav__left { gap: 12px; }
  .icon-btn--nav { width: 40px; }
  .dashboard__actions { width: 100%; }
  .dashboard__actions .menu-anchor:first-child { flex: 1; min-width: 0; }
  .select--dash { width: 100%; }
}
@media (max-width: 420px) {
  .topnav__utility .icon-btn--nav { display: none; }
}

/* ---------- Per-dashboard widgets ---------- */
.widget[hidden], .grid[hidden] { display: none; }

/* KPI tiles: short cards that sit at the top of their row */
.widget--kpi { height: auto; min-height: 150px; }

/* KPI row: every KPI tile shares one row, splitting the width evenly */
.widget-area { display: flex; flex-direction: column; gap: 24px; }
.widget-area[hidden], .kpi-row[hidden] { display: none; }
.kpi-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 24px;
}
.kpi-row > .widget { grid-column: auto; }
@media (max-width: 800px) {
  /* Too narrow to split evenly: keep one row and let it scroll sideways */
  .kpi-row {
    grid-auto-columns: minmax(170px, 1fr);
    overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 -16px; padding: 2px 16px 6px; scroll-padding: 0 16px;
  }
  .kpi-row > .widget { scroll-snap-align: start; }
}
.kpi-tile { justify-content: center; gap: 6px; }
.kpi-tile__value { font-family: var(--font-head); font-weight: 600; font-size: 28px; }
.kpi-tile__note { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-subtle); }
.kpi-tile__note.pos { color: var(--positive); }

.rank {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--tint); color: var(--action); font-size: 12px; font-weight: 600;
}

/* Empty state (Figma 86:10844) */
.empty-dash {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  min-height: max(380px, calc(100vh - 230px)); padding: 48px 24px; text-align: center;
  background: var(--bg-0); border-radius: var(--radius);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.16);
}
.empty-dash[hidden] { display: none; }
.empty-dash h2 { font-family: var(--font-head); font-weight: 600; font-size: 20px; margin: 0 0 -16px; }
.empty-dash p { font-size: 16px; max-width: 640px; }

.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 16px; border-radius: var(--radius);
  font-family: var(--font-head); font-weight: 700; font-size: 14px; white-space: nowrap;
}
.btn-primary { background: var(--action); color: var(--on-action); }
.btn-primary:hover { background: var(--action-hover); }
.btn-secondary { background: var(--bg-0); color: var(--action); border: 1px solid var(--input-divider); }
.btn-secondary:hover { background: var(--tint); }

/* Add widget panel (Figma 86:10974) */
.add-panel {
  position: fixed; z-index: 45; top: 0; right: 0; bottom: 0;
  width: min(450px, 100vw);
  display: flex; flex-direction: column;
  background: var(--bg-0);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.12);
  animation: panel-in 0.22s cubic-bezier(0.2, 0, 0, 1);
}
.add-panel[hidden] { display: none; }
@keyframes panel-in { from { transform: translateX(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .add-panel { animation: none; } }
.add-panel__head { display: flex; align-items: center; gap: 16px; padding: 32px; }
.add-panel__head h2 { flex: 1; font-family: var(--font-head); font-weight: 600; font-size: 20px; }
.add-panel__x { width: 28px; height: 28px; }
.add-panel__body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding-bottom: 24px; }
.add-panel__section {
  height: 32px; display: flex; align-items: center; padding: 0 32px; flex-shrink: 0;
  background: var(--bg-page); color: var(--text-subtle);
  font-family: var(--font-head); font-weight: 700; font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
}
.add-panel__list { display: flex; flex-direction: column; gap: 8px; padding: 0 32px; }
.add-item {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; width: 100%;
  background: var(--bg-0); border: 1px solid var(--divider); border-radius: 6px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.16);
  font-family: var(--font-body); font-weight: 600; font-size: 14px; color: var(--text); text-align: left;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.add-item:hover, .add-item:focus-visible { background: var(--tint-2); }
.add-item__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-item__state { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; font-size: 12px; color: var(--action); }
/* Figma states: widgets already on the dashboard are semibold, the rest regular */
.add-item[aria-pressed="false"] { font-weight: 400; }
.add-panel__foot {
  display: flex; justify-content: flex-end; gap: 8px; padding: 16px 32px; flex-shrink: 0;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.16);
}

/* Flash a widget that was just added */
@keyframes widget-added { from { box-shadow: 0 0 0 3px rgba(0, 116, 189, 0.45); } to { box-shadow: 0 0 0 3px rgba(0, 116, 189, 0); } }
.widget.is-new { animation: widget-added 1.4s ease-out; }
@media (prefers-reduced-motion: reduce) { .widget.is-new { animation: none; outline: 2px solid var(--action); } }

.menu--floating { position: fixed; top: 0; left: 0; right: auto; z-index: 40; }

/* Hover preview beside the Add widget panel (Figma "Add widget" Hover state + Popover) */
.widget-preview {
  position: fixed; z-index: 46; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 16px; border-radius: var(--radius);
  background: var(--bg-0);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.16);
  animation: preview-in 0.12s ease-out;
}
.widget-preview[hidden] { display: none; }
@keyframes preview-in { from { opacity: 0; transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .widget-preview { animation: none; } }
.widget-preview::after {
  content: ""; position: absolute; right: -6px; top: var(--caret-y, 50%);
  width: 12px; height: 12px; background: var(--bg-0);
  transform: translateY(-50%) rotate(45deg);
  box-shadow: 2px -2px 3px rgba(0, 0, 0, 0.08);
}
.widget-preview__title { font-family: var(--font-body); font-weight: 600; font-size: 14px; text-transform: uppercase; }
.widget-preview__frame { overflow: hidden; border-radius: 3px; flex-shrink: 0; }
.widget-preview__frame .widget { box-shadow: none; transition: none; }
.widget-preview__note { font-style: italic; font-size: 14px; color: var(--text-subtle); }

.btn-tertiary {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 16px; border-radius: var(--radius);
  font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--action); white-space: nowrap;
}
.btn-tertiary:hover { background: var(--tint); }

/* ---------- Launch Pad flyout (Figma 86:176578) ---------- */
.launchpad {
  position: fixed; z-index: 16; width: 466px; height: 460px;
  display: flex; flex-direction: column; padding: 16px 0;
  background: var(--bg-0); border: 0.25px solid var(--divider); border-radius: 6px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  animation: lp-in 0.14s ease-out;
}
.launchpad[hidden] { display: none; }
.launchpad:focus { outline: none; }
@keyframes lp-in { from { opacity: 0; transform: translateX(-6px); } }
@media (prefers-reduced-motion: reduce) { .launchpad { animation: none; } }
.launchpad__top { display: flex; flex-direction: column; gap: 16px; padding: 0 16px; flex-shrink: 0; }
.launchpad__title { font-family: var(--font-head); font-weight: 600; font-size: 16px; }
.launchpad__search { width: 100%; margin: 0; border-radius: var(--radius); }
.launchpad__search input::placeholder { color: var(--text-subtle); }
.launchpad__scroll {
  flex: 1; min-height: 0; overflow-y: auto; padding: 16px;
  scrollbar-width: thin; scrollbar-color: var(--input-divider) transparent;
}
.launchpad__scroll::-webkit-scrollbar { width: 11px; }
.launchpad__scroll::-webkit-scrollbar-thumb { background: var(--input-divider); border-radius: 50px; border: 2px solid var(--bg-0); background-clip: padding-box; }
/* 3 across, as in the design (134px tiles); the 124px floor leaves room for a classic scrollbar */
.launchpad__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 16px; }
.launchpad__none { padding: 24px 0; text-align: center; font-size: 14px; color: var(--text-subtle); }
.launchpad__foot { display: flex; justify-content: flex-end; padding: 16px 16px 0; flex-shrink: 0; }

.lp-tile {
  display: flex; align-items: center; justify-content: center; height: 56px; padding: 10px;
  background: #fff; border-radius: 6px; text-decoration: none; overflow: hidden;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.16), 0 0 0 0.5px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.12s ease;
}
.lp-tile[hidden] { display: none; }
.lp-tile:hover, .lp-tile:focus-visible { box-shadow: 0 0 0 1.5px var(--action), 0 0 6px rgba(0, 116, 189, 0.25); outline: none; }
.lp-tile img { display: block; object-fit: cover; max-width: none; flex-shrink: 0; }
.lp-crop { position: relative; display: block; width: 92px; height: 22px; overflow: hidden; }
.lp-crop img { position: absolute; width: 106.36%; height: 133.33%; left: -3.25%; top: -16.67%; }
.lp-pershing { position: relative; display: block; width: 88px; height: 27.7px; }
.lp-pershing span { position: absolute; left: 68.5px; top: 7.8px; font: 700 10.4px/1.2 Lato, var(--font-body); color: #58575c; }
.lp-cetera { position: relative; display: block; width: 97px; height: 33px; }
.lp-cetera img { position: absolute; left: 13px; top: 0; }
.lp-cetera span { position: absolute; left: 0; right: 0; top: 25px; text-align: center; font: 700 8px/8px Lato, var(--font-body); color: rgba(0, 0, 0, 0.85); }

@media (max-width: 800px) {
  /* No room beside a 240px menu on a phone: the flyout becomes a sheet along the bottom */
  .launchpad { left: 8px !important; right: 8px; top: auto !important; bottom: 8px; width: auto; height: min(460px, 72vh) !important; }
  .launchpad__grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
}

/* ---------- Customize sidebar panel (Figma 86:49743) ---------- */
.cs-body { gap: 0; padding-bottom: 0; }
.cs-band {
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
  height: 36px; padding: 0 32px; background: var(--bg-page);
}
.cs-band__title { font-family: var(--font-head); font-weight: 700; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.cs-band + .cs-group, .cs-group:first-of-type { margin-top: 16px; }
.cs-link {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-family: var(--font-body); font-weight: 600; font-size: 12px; color: var(--action);
}
.cs-link:hover { text-decoration: underline; }
.cs-group { flex-shrink: 0; border-radius: var(--radius); }
.cs-group.is-target { outline: 1.5px dashed rgba(0, 116, 189, 0.55); outline-offset: -1.5px; background: rgba(0, 116, 189, 0.03); }
.cs-group__head {
  display: flex; align-items: center; justify-content: space-between; height: 40px;
  padding: 0 32px 0 14px; background: var(--bg-alt);
}
.cs-group__toggle {
  display: inline-flex; align-items: center; gap: 14px; height: 100%; flex: 1; min-width: 0;
  font-family: var(--font-body); font-weight: 600; font-size: 14px; text-align: left;
}
.cs-chev { color: var(--text-subtle); flex-shrink: 0; transition: transform 0.15s ease; }
.cs-group__toggle[aria-expanded="false"] .cs-chev { transform: rotate(-90deg); }
.cs-group__body { padding: 16px 32px; }
.cs-group__body[hidden] { display: none; }
.cs-list { list-style: none; margin: 0; padding: 0; position: relative; display: flex; flex-direction: column; gap: 8px; }
.cs-row { display: flex; align-items: center; gap: 16px; }
.cs-row__card {
  flex: 1; min-width: 0; height: 43px; display: flex; align-items: center; gap: 8px; padding: 0 12px;
  background: var(--bg-0); border: 1px solid var(--divider); border-radius: 6px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.16);
  user-select: none; -webkit-user-select: none;
}
.cs-row__name { flex: 1; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-zone="active"] .cs-row__name { font-weight: 600; }
.cs-grip {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex-shrink: 0;
  border-radius: var(--radius); color: var(--text-subtle); cursor: grab; touch-action: none;
}
button.cs-grip:hover { background: var(--bg-page); color: var(--text); }
.cs-circle { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 50%; color: var(--action); }
.cs-circle:hover { background: var(--tint); }
.cs-empty { padding: 8px 0; text-align: center; font-size: 14px; color: var(--text-subtle); }
.cs-row.is-dragging .cs-row__card { opacity: 0.35; }
.cs-drop { position: absolute; left: 0; right: 40px; height: 2px; margin-top: -1px; border-radius: 1px; background: var(--action); pointer-events: none; }
.cs-ghost {
  position: fixed !important; left: 0; top: 0; z-index: 70; margin: 0; pointer-events: none; cursor: grabbing;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}
.cs-foot { border-top: 0; }

/* ---------- Added widgets (Figma WDP + UMP widget sets) ---------- */
.table--links a { color: var(--action); text-decoration: none; }
.table--links a:hover { text-decoration: underline; }
.table--bare td:first-child { overflow: hidden; text-overflow: ellipsis; max-width: 0; width: 100%; }
.table--bare td.num { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.table thead th { color: var(--text-subtle); }
.table__total td { font-weight: 700; }
.table--wide { min-width: 640px; }
.row-menu, .row-info { display: inline-grid; place-items: center; width: 24px; height: 24px; color: var(--action); border-radius: var(--radius); }
.row-menu:hover, .row-info:hover { background: var(--bg-page); }
.hbars--axis { align-content: stretch; row-gap: 6px; }
.hbars--axis .hbar__bar { height: 14px; border-radius: 0 3px 3px 0; }
.hbar__axis { display: flex; justify-content: space-between; padding-top: 8px; font-size: 12px; border-top: 1px solid var(--divider); }
.hbar__axis span { flex: 1; text-align: center; }
.hbar__axis span:first-child { text-align: left; }
.hbar__axis span:last-child { text-align: right; }
.help { display: inline-flex; margin-left: 6px; color: var(--action); }
.recon__head { display: flex; align-items: center; font-family: var(--font-head); font-size: 16px; }
.recon__bar { height: 12px; border-radius: 6px; background: var(--track); overflow: hidden; }
.recon__bar i { display: block; height: 100%; background: #00808a; border-radius: 6px; }
.recon__counts { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-subtle); }
.recon__counts a, .recon__list a { color: var(--action); text-decoration: none; font-weight: 600; }
.recon__counts a { font-weight: 400; }
.recon__list { list-style: none; margin: 0; padding: 0; }
.recon__list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; border-bottom: 1px solid var(--divider); font-weight: 600; font-size: 14px; }
.recon__list li span { display: inline-flex; align-items: center; min-width: 0; }

/* Add widget panel: rows can be dragged to reorder */
.add-item { cursor: grab; user-select: none; -webkit-user-select: none; }
.add-item__grip { flex-shrink: 0; color: var(--text-subtle); opacity: 0; margin-left: -4px; transition: opacity 0.12s ease; }
.add-item:hover .add-item__grip, .add-item:focus-visible .add-item__grip { opacity: 1; }
@media (hover: none) { .add-item__grip { opacity: 1; } }
.add-item.is-dragging { box-shadow: 0 0 0 2px var(--action), 0 4px 12px rgba(0, 0, 0, 0.16); background: var(--tint-2); z-index: 1; position: relative; }
.is-reordering, .is-reordering .add-item { cursor: grabbing; }

/* ---------- Dark theme ---------- */
:root[data-theme="dark"] {
  --bg-page: #111215;
  --bg-0: #1b1d22;
  --bg-alt: #17181c;
  --text: rgba(255, 255, 255, 0.88);
  --text-subtle: rgba(255, 255, 255, 0.62);
  --divider: rgba(255, 255, 255, 0.14);
  --input-divider: rgba(255, 255, 255, 0.4);
  --track: #34373f;
  --action: #5db3ec;
  --action-hover: #86c7f2;
  --on-action: #0a1822;
  --info: #7cc0f0;
  --caution: #f8b857;
  --negative: #ff7b7e;
  --positive: #66c76f;
  --tint: rgba(93, 179, 236, 0.14);
  --tint-2: rgba(93, 179, 236, 0.1);
  --tooltip-bg: #e9ebf0;
  --tooltip-text: #15171a;
  --hover-edge: rgba(255, 255, 255, 0.34);
  --band: rgba(255, 255, 255, 0.06);
  color-scheme: dark;
}
:root[data-theme="dark"] .sidebar__divider { filter: invert(1); }
:root[data-theme="dark"] .brand-crop img { filter: invert(1); }
:root[data-theme="dark"] .topnav__logo img { content: url("assets/envestnet-logo-dark.svg"); }
:root[data-theme="dark"] img[src$="env-mark.svg"] { content: url("assets/env-mark-dark.svg"); }
:root[data-theme="dark"] .topnav,
:root[data-theme="dark"] .sidebar { box-shadow: 0 0 0 0.5px var(--divider); }
:root[data-theme="dark"] .scrim { background: rgba(0, 0, 0, 0.55); }

/* Theme switch: show the icon for the theme you would switch to */
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* Launch Pad tiles in dark mode: dark surface, logos flipped to light monochrome
   (screen blend drops the white boxes baked into the JPEG logos) */
:root[data-theme="dark"] .lp-tile { background: #2a2d34; box-shadow: 0 0 0 0.5px var(--divider); }
:root[data-theme="dark"] .lp-tile img { filter: grayscale(1) invert(1) brightness(1.9) contrast(1.15); mix-blend-mode: screen; }
:root[data-theme="dark"] .lp-pershing span,
:root[data-theme="dark"] .lp-cetera span { color: rgba(255, 255, 255, 0.85); }
:root[data-theme="dark"] .lp-tile:hover,
:root[data-theme="dark"] .lp-tile:focus-visible { box-shadow: 0 0 0 1.5px var(--action), 0 0 6px rgba(93, 179, 236, 0.3); }
