.net-worth-grid {
  display: grid;
  gap: 18px;
}

.net-worth-headline-panel {
  display: grid;
  gap: 16px;
}

.net-worth-composition-panel,
.net-worth-secondary-links-panel {
  display: grid;
  gap: 12px;
}

.net-worth-composition-panel {
  position: relative;
}

.net-worth-controls {
  align-items: end;
}

.net-worth-hero-card {
  display: grid;
  gap: 8px;
}

.net-worth-summary-text {
  max-width: 70ch;
}

.net-worth-effective-range,
.net-worth-currency-note {
  margin: 0;
}

.net-worth-section-notes {
  margin: 8px 0 0;
}

.net-worth-fx-value {
  margin: 0;
}

.net-worth-fx-value-positive {
  color: var(--tone-positive, #1e7a46);
}

.net-worth-fx-value-negative {
  color: var(--tone-negative, #b2442e);
}

.net-worth-fx-value-neutral {
  color: inherit;
}

.net-worth-fx-breakdown {
  margin-top: 12px;
}

.net-worth-fx-breakdown-main {
  display: grid;
  gap: 2px;
}

.net-worth-composition-groups {
  display: grid;
  gap: 18px;
}

.net-worth-composition-group {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(100, 116, 139, 0.16);
  border-radius: 16px;
}

.net-worth-composition-group-assets {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(241, 245, 249, 0.9));
}

.net-worth-composition-group-liabilities {
  background: linear-gradient(180deg, rgba(255, 251, 250, 0.92), rgba(252, 242, 239, 0.88));
}

.net-worth-composition-category-group {
  display: grid;
  gap: 6px;
  margin-top: 2px;
}

.net-worth-composition-subheading {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.net-worth-composition-group-head,
.net-worth-attribution-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.net-worth-composition-track {
  width: 100%;
  min-height: 20px;
  border-radius: 999px;
  background: #e7edf3;
  overflow: hidden;
}

.net-worth-composition-bar,
.net-worth-liabilities-bar {
  display: flex;
  min-height: 20px;
  border-radius: 999px;
  overflow: hidden;
  transition: width 180ms ease;
}

.net-worth-composition-segment {
  min-width: 0;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.38);
  transition: opacity 120ms ease, filter 120ms ease, transform 120ms ease;
}

.net-worth-composition-segment-active {
  filter: brightness(1.08) saturate(1.04);
  transform: translateY(-1px);
}

.net-worth-composition-segment-muted {
  opacity: 0.45;
}

.net-worth-composition-segment-investments {
  background: #1f6feb;
}

.net-worth-composition-segment-property {
  background: #0f9d7a;
}

.net-worth-composition-segment-bank_cash {
  background: #f59e0b;
}

.net-worth-composition-segment-retirement {
  background: #7c3aed;
}

.net-worth-composition-segment-other_assets {
  background: #64748b;
}

.net-worth-composition-segment-debt_liabilities {
  background: #b4442e;
}

.net-worth-composition-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.net-worth-composition-item {
  border-top: 1px solid rgba(100, 116, 139, 0.12);
  padding-top: 8px;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.net-worth-composition-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.net-worth-composition-item-active {
  background: rgba(255, 255, 255, 0.55);
  border-radius: 10px;
  border-color: rgba(31, 111, 235, 0.18);
  padding: 8px 10px;
  margin: 0 -10px;
}

.net-worth-composition-item-main,
.net-worth-attribution-item-main,
.net-worth-attribution-item-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.net-worth-composition-item-main {
  align-items: start;
}

.net-worth-composition-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.net-worth-composition-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.net-worth-composition-swatch-investments {
  background: #1f6feb;
}

.net-worth-composition-swatch-property {
  background: #0f9d7a;
}

.net-worth-composition-swatch-bank_cash {
  background: #f59e0b;
}

.net-worth-composition-swatch-retirement {
  background: #7c3aed;
}

.net-worth-composition-swatch-other_assets {
  background: #64748b;
}

.net-worth-composition-swatch-debt_liabilities {
  background: #b4442e;
}

.net-worth-composition-metrics {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: end;
  font-size: 0.94rem;
}

.net-worth-composition-tooltip {
  position: absolute;
  z-index: 40;
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.22);
  pointer-events: none;
  max-width: 220px;
}

.net-worth-composition-tooltip small {
  color: rgba(226, 232, 240, 0.86);
}

.net-worth-attribution-item-main {
  flex: 1;
  min-width: 0;
}

.net-worth-attribution-item-meta {
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: end;
}

.net-worth-attribution-bar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 2px 1fr;
  align-items: center;
  width: 220px;
  max-width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #e7edf3;
  overflow: hidden;
}

.net-worth-attribution-zero {
  width: 2px;
  height: 100%;
  background: rgba(71, 85, 105, 0.45);
}

.net-worth-attribution-fill {
  height: 100%;
}

.net-worth-attribution-fill-negative {
  justify-self: end;
}

.net-worth-attribution-fill-positive {
  justify-self: start;
  background: #18794e;
}

.net-worth-attribution-fill-negative {
  background: #b4442e;
}

.net-worth-history-date-cell {
  display: grid;
  gap: 4px;
}

.net-worth-history-note {
  margin: 0;
}

.net-worth-history-change {
  font-size: 0.95rem;
}

.net-worth-history-table {
  table-layout: fixed;
}

.net-worth-history-col-date {
  width: 30%;
}

.net-worth-history-col-value,
.net-worth-history-col-change {
  width: 35%;
}

.net-worth-history-table td:nth-child(2),
.net-worth-history-table td:nth-child(3),
.net-worth-history-table th:nth-child(2),
.net-worth-history-table th:nth-child(3) {
  white-space: nowrap;
}

.dashboard-movement-value-positive {
  color: var(--tone-positive, #1e7a46);
}

.dashboard-movement-value-negative {
  color: var(--tone-negative, #b2442e);
}

.dashboard-movement-value-neutral {
  color: var(--text-muted);
}

.net-worth-history-period-field {
  align-items: flex-end;
}

.net-worth-secondary-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.net-worth-reconciliation-item {
  list-style: none;
  margin-left: -18px;
  padding-top: 4px;
}

.net-worth-reconciliation-value {
  font-size: 0.92rem;
}

@media (max-width: 720px) {
  .net-worth-composition-item-main,
  .net-worth-attribution-item-main,
  .net-worth-attribution-item-meta,
  .net-worth-composition-group-head,
  .net-worth-attribution-total {
    flex-direction: column;
    align-items: start;
  }

  .net-worth-composition-metrics {
    justify-content: start;
  }

  .net-worth-attribution-bar {
    width: 100%;
  }
}
