/* net-worth-tracker — extracted from inline <style> */
.nw-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-radius: var(--evvy-radius-lg, 12px) var(--evvy-radius-lg, 12px) 0 0;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  margin-bottom: 0;
}
.nw-section-header.assets { background: #198754; }
.nw-section-header.liabilities { background: #dc3545; }
.nw-section-body {
  border: 1px solid var(--evvy-border-color, #DEE2E6);
  border-top: none;
  border-radius: 0 0 var(--evvy-radius-lg, 12px) var(--evvy-radius-lg, 12px);
  padding: 1rem 1.25rem;
}
.nw-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.nw-input-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.875rem;
}
.nw-input-row:last-child { margin-bottom: 0; }
.nw-input-row label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--evvy-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.nw-input-row .nw-input-hint {
  font-size: 0.6875rem;
  color: var(--evvy-text-secondary);
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  opacity: 0.8;
}
.nw-input-row .input-group {
  max-width: 280px;
}
.nw-rate-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  max-width: 280px;
}
.nw-rate-group .input-group { flex: 1; }
.nw-rate-group .nw-rate-input { max-width: 100px; }
.nw-rate-group .nw-rate-label {
  font-size: 0.6875rem;
  color: var(--evvy-text-secondary);
  white-space: nowrap;
}
.nw-subtotal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0;
  border-top: 2px solid var(--evvy-border-color, #DEE2E6);
  margin-top: 0.5rem;
}
.nw-subtotal-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--evvy-text-primary);
}
.nw-subtotal-value {
  font-size: 1.125rem;
  font-weight: 800;
}
.nw-subtotal-value.assets-val { color: #198754; }
.nw-subtotal-value.liabs-val { color: #dc3545; }
.nw-hero-positive { color: #198754; }
.nw-hero-negative { color: #dc3545; }
.nw-chart-section {
  margin-top: 1.25rem;
}
.nw-chart-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--evvy-text-secondary);
  margin-bottom: 0.75rem;
}
.nw-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.nw-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nw-bar-label {
  font-size: 0.75rem;
  font-weight: 600;
  width: 80px;
  text-align: right;
  flex-shrink: 0;
}
.nw-bar-track {
  flex: 1;
  height: 28px;
  background: var(--evvy-border-color, #DEE2E6);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.nw-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
  min-width: 2px;
}
.nw-bar-fill.assets-bar { background: #198754; }
.nw-bar-fill.liabs-bar { background: #dc3545; }
.nw-bar-amount {
  font-size: 0.75rem;
  font-weight: 600;
  width: 100px;
  flex-shrink: 0;
}
.nw-donut-wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
}
.nw-donut-svg {
  flex-shrink: 0;
}
.nw-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.nw-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}
.nw-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}
.nw-legend-label { color: var(--evvy-text-secondary); }
.nw-legend-value { font-weight: 700; color: var(--evvy-text-primary); margin-left: auto; }
.nw-percentile-gauge {
  position: relative;
  height: 48px;
  background: linear-gradient(90deg, #dc3545 0%, #fd7e14 25%, #ffc107 50%, #198754 75%, #0d6efd 100%);
  border-radius: 8px;
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
}
.nw-percentile-marker {
  position: absolute;
  top: -8px;
  width: 3px;
  height: 64px;
  background: var(--evvy-text-primary, #1B1B1B);
  border-radius: 2px;
  transition: left 0.5s ease;
}
.nw-percentile-marker::after {
  content: attr(data-label);
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--evvy-text-primary);
}
.nw-percentile-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.25rem;
  font-size: 0.625rem;
  color: var(--evvy-text-secondary);
}
.nw-percentile-ref {
  position: absolute;
  bottom: -18px;
  font-size: 0.5625rem;
  color: var(--evvy-text-secondary);
  white-space: nowrap;
  transform: translateX(-50%);
}
.nw-needle-card {
  background: var(--bs-body-bg, #fff);
  border: 1.5px solid var(--evvy-border-color, #DEE2E6);
  border-radius: var(--evvy-radius-lg, 12px);
  padding: 0.875rem 1rem;
  margin-bottom: 0.625rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transition: border-color 0.2s ease;
}
.nw-needle-card:first-child { border-color: var(--cluster-dark); }
.nw-needle-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--cluster-dark);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nw-needle-body { flex: 1; }
.nw-needle-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--evvy-text-primary);
  margin-bottom: 0.15rem;
}
.nw-needle-desc {
  font-size: 0.75rem;
  color: var(--evvy-text-secondary);
}
.nw-needle-impact {
  font-size: 0.875rem;
  font-weight: 800;
  color: #198754;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: center;
}
.nw-projection-wrap {
  margin-top: 0.75rem;
  border: 1px solid var(--evvy-border-color, #DEE2E6);
  border-radius: var(--evvy-radius-lg, 12px);
  padding: 1rem;
  overflow: hidden;
}
.nw-projection-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.nw-age-input-section {
  margin-bottom: 1.25rem;
}
[data-bs-theme="dark"] .nw-section-body {
  background: var(--evvy-gray-100, #1E1E1E);
}
[data-bs-theme="dark"] .nw-needle-card {
  background: var(--evvy-gray-100, #1E1E1E);
}
[data-bs-theme="dark"] .nw-bar-track {
  background: color-mix(in srgb, var(--evvy-border-color) 50%, var(--evvy-gray-100, #1E1E1E));
}
[data-bs-theme="dark"] .nw-percentile-gauge {
  opacity: 0.9;
}
[data-bs-theme="dark"] .nw-projection-wrap {
  background: var(--evvy-gray-100, #1E1E1E);
}
@media (max-width: 575.98px) {
  .nw-columns { grid-template-columns: 1fr; }
  .nw-input-row .input-group { max-width: 100%; }
  .nw-rate-group { max-width: 100%; }
  .nw-donut-wrap { flex-direction: column; align-items: flex-start; }
  .nw-bar-label { width: 60px; font-size: 0.6875rem; }
  .nw-bar-amount { width: 80px; font-size: 0.6875rem; }
  .nw-needle-card { flex-wrap: wrap; }
  .nw-needle-impact { width: 100%; text-align: right; margin-top: 0.25rem; }
}
