{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "finance-dashboard",
  "type": "registry:component",
  "title": "Finance Dashboard",
  "description": "A banking overview with a total balance card, a gradient debit card, income versus expenses bars, a spending donut, recent transactions and savings goals you can top up.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "dashboards",
    "dashboard",
    "finance",
    "banking",
    "balance",
    "transactions",
    "savings"
  ],
  "docs": "https://hyperblur.dev/effects/finance-dashboard",
  "files": [
    {
      "path": "registry/hyperblur/finance-dashboard.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/finance-dashboard.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport type FinanceRange = \"6M\" | \"12M\";\n\nexport interface FinanceDashboardProps extends React.HTMLAttributes<HTMLDivElement> {\n  accent?: string;\n  brand?: string;\n  owner?: string;\n  range?: FinanceRange;\n  defaultRange?: FinanceRange;\n  onRangeChange?: (range: FinanceRange) => void;\n  defaultHidden?: boolean;\n}\n\nconst css = `\n.hb-dfn {\n  --a: #2f7bff;\n  container: hb-dfn / inline-size;\n  box-sizing: border-box;\n  width: 100%;\n  border: 1px solid #262626;\n  border-radius: 16px;\n  background: #0a0a0a;\n  color: #ededed;\n  font-family: inherit;\n  font-size: 13px;\n  line-height: 1.4;\n  overflow: hidden;\n  position: relative;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-dfn *, .hb-dfn *::before, .hb-dfn *::after { box-sizing: border-box; }\n.hb-dfn button, .hb-dfn input, .hb-dfn select { font: inherit; color: inherit; }\n.hb-dfn button:focus-visible, .hb-dfn input:focus-visible, .hb-dfn select:focus-visible, .hb-dfn [tabindex]:focus-visible {\n  outline: 2px solid var(--a);\n  outline-offset: 2px;\n}\n.hb-dfn-app { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 640px; }\n.hb-dfn-side {\n  display: flex;\n  flex-direction: column;\n  gap: 24px;\n  min-width: 0;\n  padding: 20px 12px 16px;\n  border-right: 1px solid #1f1f1f;\n  background: #0d0d0d;\n}\n.hb-dfn-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; font-size: 14px; font-weight: 600; letter-spacing: -.01em; }\n.hb-dfn-mark {\n  display: grid;\n  place-items: center;\n  flex: none;\n  width: 24px;\n  height: 24px;\n  border-radius: 7px;\n  background: linear-gradient(135deg, var(--a), color-mix(in srgb, var(--a) 45%, #ffffff));\n  color: #ffffff;\n}\n.hb-dfn-nav { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }\n.hb-dfn-nav-label { padding: 12px 8px 6px; color: #6b6b6b; font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }\n.hb-dfn-link {\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  width: 100%;\n  height: 34px;\n  padding: 0 8px;\n  border: 0;\n  border-radius: 8px;\n  background: transparent;\n  color: #a1a1a1;\n  font-size: 13px;\n  text-align: left;\n  cursor: pointer;\n  transition: background .15s ease, color .15s ease;\n}\n.hb-dfn-link:hover { background: #161616; color: #ededed; }\n.hb-dfn-link[aria-current=\"page\"] { background: #1b1b1b; color: #ffffff; }\n.hb-dfn-link[aria-current=\"page\"] .hb-dfn-ico { color: var(--a); }\n.hb-dfn-link-n {\n  margin-left: auto;\n  padding: 1px 7px;\n  border-radius: 999px;\n  background: #1f1f1f;\n  color: #a1a1a1;\n  font-size: 11px;\n  font-variant-numeric: tabular-nums;\n}\n.hb-dfn-side-foot { margin-top: auto; }\n.hb-dfn-main { display: flex; flex-direction: column; min-width: 0; }\n.hb-dfn-top { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 24px; border-bottom: 1px solid #1f1f1f; }\n.hb-dfn-crumb { min-width: 0; overflow: hidden; color: #8f8f8f; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }\n.hb-dfn-crumb strong { color: #ededed; font-weight: 500; }\n.hb-dfn-search { position: relative; width: 260px; margin-left: auto; color: #6b6b6b; }\n.hb-dfn-search .hb-dfn-ico { position: absolute; top: 50%; left: 10px; width: 15px; height: 15px; transform: translateY(-50%); pointer-events: none; }\n.hb-dfn-search input {\n  width: 100%;\n  height: 34px;\n  padding: 0 40px 0 32px;\n  border: 1px solid #242424;\n  border-radius: 8px;\n  background: #111111;\n  color: #ededed;\n  font-size: 13px;\n  transition: border-color .15s ease, background .15s ease;\n}\n.hb-dfn-search input::placeholder { color: #6b6b6b; }\n.hb-dfn-search input:hover { border-color: #333333; }\n.hb-dfn-search input:focus-visible { border-color: var(--a); outline-offset: 0; }\n.hb-dfn-kbd {\n  position: absolute;\n  top: 50%;\n  right: 8px;\n  padding: 1px 6px;\n  border: 1px solid #2a2a2a;\n  border-radius: 5px;\n  background: #171717;\n  color: #8f8f8f;\n  font-size: 11px;\n  transform: translateY(-50%);\n  pointer-events: none;\n}\n.hb-dfn-iconbtn {\n  position: relative;\n  display: grid;\n  place-items: center;\n  flex: none;\n  width: 34px;\n  height: 34px;\n  border: 1px solid #242424;\n  border-radius: 8px;\n  background: #111111;\n  color: #a1a1a1;\n  cursor: pointer;\n  transition: background .15s ease, color .15s ease, border-color .15s ease;\n}\n.hb-dfn-iconbtn:hover { border-color: #333333; background: #171717; color: #ededed; }\n.hb-dfn-dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border: 2px solid #111111; border-radius: 50%; background: var(--a); box-sizing: content-box; margin: -2px; }\n.hb-dfn-av {\n  display: grid;\n  place-items: center;\n  flex: none;\n  width: 28px;\n  height: 28px;\n  border-radius: 50%;\n  color: #ffffff;\n  font-size: 11px;\n  font-weight: 600;\n  letter-spacing: .01em;\n}\n.hb-dfn-content { display: flex; flex-direction: column; gap: 20px; min-width: 0; padding: 24px; }\n.hb-dfn-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }\n.hb-dfn-title { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }\n.hb-dfn-sub { margin: 4px 0 0; color: #8f8f8f; font-size: 13px; }\n.hb-dfn-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }\n.hb-dfn-card {\n  min-width: 0;\n  padding: 16px;\n  border: 1px solid #232323;\n  border-radius: 12px;\n  background: #111111;\n  animation: hb-dfn-rise .55s cubic-bezier(.2, .7, .2, 1) both;\n  animation-delay: calc(var(--d, 0) * 60ms);\n}\n.hb-dfn-card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }\n.hb-dfn-card-t { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: -.005em; }\n.hb-dfn-card-s { margin: 2px 0 0; color: #8f8f8f; font-size: 12px; }\n.hb-dfn-seg { display: inline-flex; padding: 2px; border: 1px solid #262626; border-radius: 8px; background: #0d0d0d; }\n.hb-dfn-seg button {\n  height: 26px;\n  padding: 0 10px;\n  border: 0;\n  border-radius: 6px;\n  background: transparent;\n  color: #8f8f8f;\n  font-size: 12px;\n  font-weight: 500;\n  cursor: pointer;\n  transition: background .15s ease, color .15s ease;\n}\n.hb-dfn-seg button:hover { color: #ededed; }\n.hb-dfn-seg button[aria-pressed=\"true\"] { background: #232323; color: #ffffff; }\n.hb-dfn-btn {\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  gap: 6px;\n  height: 32px;\n  padding: 0 12px;\n  border: 1px solid #2a2a2a;\n  border-radius: 8px;\n  background: #151515;\n  color: #ededed;\n  font-size: 12.5px;\n  font-weight: 500;\n  white-space: nowrap;\n  cursor: pointer;\n  transition: background .15s ease, border-color .15s ease, transform .15s ease;\n}\n.hb-dfn-btn:hover { border-color: #3a3a3a; background: #1c1c1c; }\n.hb-dfn-btn:active { transform: translateY(1px); }\n.hb-dfn-btn[data-p=\"true\"] { border-color: var(--a); background: var(--a); color: #ffffff; }\n.hb-dfn-btn[data-p=\"true\"]:hover { background: color-mix(in srgb, var(--a) 85%, #ffffff); }\n.hb-dfn-btn .hb-dfn-ico { width: 14px; height: 14px; }\n.hb-dfn-ico { display: block; flex: none; width: 16px; height: 16px; }\n.hb-dfn-pill {\n  display: inline-flex;\n  align-items: center;\n  gap: 3px;\n  height: 20px;\n  padding: 0 7px;\n  border-radius: 999px;\n  font-size: 11px;\n  font-weight: 600;\n  font-variant-numeric: tabular-nums;\n  white-space: nowrap;\n}\n.hb-dfn-pill .hb-dfn-ico { width: 11px; height: 11px; stroke-width: 2.4; }\n.hb-dfn-pill[data-t=\"up\"] { background: rgba(74, 222, 128, .12); color: #4ade80; }\n.hb-dfn-pill[data-t=\"down\"] { background: rgba(248, 113, 113, .12); color: #f87171; }\n.hb-dfn-pill[data-t=\"flat\"] { background: #1f1f1f; color: #a1a1a1; }\n.hb-dfn-spark { display: block; width: 100%; height: 36px; color: var(--a); animation: hb-dfn-wipe .9s .15s cubic-bezier(.3, .7, .2, 1) both; }\n.hb-dfn-spark-l { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }\n.hb-dfn-tt {\n  position: absolute;\n  z-index: 3;\n  padding: 7px 10px;\n  border: 1px solid #2c2c2c;\n  border-radius: 8px;\n  background: rgba(22, 22, 22, .96);\n  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, .7);\n  color: #ededed;\n  font-size: 12px;\n  line-height: 1.5;\n  white-space: nowrap;\n  pointer-events: none;\n}\n.hb-dfn-tt b { font-weight: 600; font-variant-numeric: tabular-nums; }\n.hb-dfn-tt-d { color: #8f8f8f; font-size: 11px; }\n@keyframes hb-dfn-rise { from { opacity: 0; transform: translate3d(0, 8px, 0); } to { opacity: 1; transform: none; } }\n@keyframes hb-dfn-wipe { from { clip-path: inset(-6px 100% -6px -6px); } to { clip-path: inset(-6px -6px -6px -6px); } }\n@keyframes hb-dfn-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }\n@keyframes hb-dfn-fade { from { opacity: 0; } to { opacity: 1; } }\n@keyframes hb-dfn-pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .55); } 100% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } }\n@keyframes hb-dfn-arc { from { stroke-dasharray: 0 100; } }\n@container hb-dfn (max-width: 759px) {\n  .hb-dfn-app { grid-template-columns: minmax(0, 1fr); min-height: 0; }\n  .hb-dfn-side { flex-direction: row; align-items: center; gap: 8px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid #1f1f1f; overflow-x: auto; }\n  .hb-dfn-brand { padding: 0; }\n  .hb-dfn-brand span:last-child, .hb-dfn-nav-label, .hb-dfn-link-t, .hb-dfn-link-n, .hb-dfn-side-foot, .hb-dfn-kbd { display: none; }\n  .hb-dfn-nav { flex-direction: row; flex: 1; gap: 4px; }\n  .hb-dfn-link { justify-content: center; width: 36px; padding: 0; }\n  .hb-dfn-top { gap: 8px; padding: 0 16px; }\n  .hb-dfn-crumb { display: none; }\n  .hb-dfn-search { flex: 1; width: auto; margin-left: 0; }\n  .hb-dfn-content { gap: 16px; padding: 16px; }\n  .hb-dfn-title { font-size: 19px; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-dfn *, .hb-dfn *::before, .hb-dfn *::after { animation: none !important; transition: none !important; }\n}\n.hb-dfn-safe { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid #232323; border-radius: 10px; background: #111111; }\n.hb-dfn-safe .hb-dfn-ico { margin-top: 1px; color: var(--a); }\n.hb-dfn-safe strong { display: block; font-size: 12.5px; font-weight: 500; }\n.hb-dfn-safe span { color: #8f8f8f; font-size: 11.5px; line-height: 1.4; }\n.hb-dfn-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }\n.hb-dfn-bal { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; padding: 20px; }\n.hb-dfn-bal-l { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #8f8f8f; font-size: 12px; }\n.hb-dfn-bal-v { margin: 8px 0 0; font-size: 42px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.04em; line-height: 1; }\n.hb-dfn-bal-v small { color: #6b6b6b; font-size: 22px; font-weight: 500; letter-spacing: -.02em; }\n.hb-dfn-bal-d { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: #8f8f8f; font-size: 12px; }\n.hb-dfn-bal .hb-dfn-spark { height: 44px; margin: 0 -4px; }\n.hb-dfn-accts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }\n.hb-dfn-acct { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid #232323; border-radius: 10px; background: #141414; }\n.hb-dfn-acct span { display: flex; align-items: center; gap: 6px; color: #8f8f8f; font-size: 11.5px; }\n.hb-dfn-acct span i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }\n.hb-dfn-acct b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }\n.hb-dfn-cc {\n  position: relative;\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  width: 100%;\n  max-width: 420px;\n  aspect-ratio: 1.586;\n  margin: 0 auto;\n  padding: 20px 22px;\n  border-radius: 18px;\n  background:\n    radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .3), transparent 52%),\n    linear-gradient(135deg, var(--a) 0%, color-mix(in srgb, var(--a) 42%, #4c1d95) 100%);\n  box-shadow: 0 28px 50px -26px var(--a), inset 0 1px 0 rgba(255, 255, 255, .28);\n  color: #ffffff;\n  overflow: hidden;\n  animation: hb-dfn-rise .7s .1s cubic-bezier(.2, .7, .2, 1) both;\n  transition: transform .5s cubic-bezier(.2, .7, .2, 1);\n}\n.hb-dfn-cc:hover { transform: translate3d(0, -4px, 0) rotate(-.6deg); }\n.hb-dfn-cc::before, .hb-dfn-cc::after { content: \"\"; position: absolute; border: 1px solid rgba(255, 255, 255, .16); border-radius: 50%; pointer-events: none; }\n.hb-dfn-cc::before { top: -90px; right: -70px; width: 260px; height: 260px; }\n.hb-dfn-cc::after { top: -40px; right: -20px; width: 160px; height: 160px; }\n.hb-dfn-cc-t { position: relative; display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 600; letter-spacing: -.01em; }\n.hb-dfn-cc-t .hb-dfn-ico { width: 20px; height: 20px; opacity: .85; }\n.hb-dfn-chip-i { position: relative; width: 36px; height: 27px; border-radius: 6px; background: linear-gradient(135deg, #f4dd96, #c79d45); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); overflow: hidden; }\n.hb-dfn-chip-i::before { content: \"\"; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 32%, rgba(0, 0, 0, .18) 32% 34%, transparent 34% 66%, rgba(0, 0, 0, .18) 66% 68%, transparent 68%), linear-gradient(0deg, transparent 44%, rgba(0, 0, 0, .18) 44% 47%, transparent 47% 53%, rgba(0, 0, 0, .18) 53% 56%, transparent 56%); }\n.hb-dfn-cc-n { position: relative; margin: 0; font-size: 17px; font-variant-numeric: tabular-nums; letter-spacing: .14em; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }\n.hb-dfn-cc-b { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }\n.hb-dfn-cc-b small { display: block; color: rgba(255, 255, 255, .65); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; }\n.hb-dfn-cc-b span { font-size: 12.5px; font-weight: 500; letter-spacing: .06em; }\n.hb-dfn-cc-b div + div { text-align: left; }\n.hb-dfn-cc-m { position: relative; display: block; width: 44px; height: 28px; }\n.hb-dfn-cc-m i { position: absolute; top: 0; width: 28px; height: 28px; border-radius: 50%; }\n.hb-dfn-cc-m i:first-child { left: 0; background: rgba(255, 255, 255, .92); }\n.hb-dfn-cc-m i:last-child { right: 0; background: rgba(255, 255, 255, .45); mix-blend-mode: hard-light; }\n.hb-dfn-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }\n.hb-dfn-row-b { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }\n.hb-dfn-legend-k { display: flex; align-items: center; gap: 14px; color: #8f8f8f; font-size: 12px; }\n.hb-dfn-legend-k span { display: inline-flex; align-items: center; gap: 6px; }\n.hb-dfn-legend-k i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }\n.hb-dfn-sum { display: flex; flex-wrap: wrap; gap: 24px; margin: -4px 0 16px; }\n.hb-dfn-sum-i { display: flex; flex-direction: column; gap: 2px; color: #8f8f8f; font-size: 12px; }\n.hb-dfn-sum-i b { color: #ededed; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }\n.hb-dfn-gb { display: grid; grid-template-columns: 36px minmax(0, 1fr); grid-template-rows: 210px auto; column-gap: 8px; }\n.hb-dfn-yl { position: relative; }\n.hb-dfn-yl span { position: absolute; right: 0; color: #6b6b6b; font-size: 11px; font-variant-numeric: tabular-nums; transform: translateY(50%); }\n.hb-dfn-plot { position: relative; }\n.hb-dfn-gl { position: absolute; right: 0; left: 0; height: 1px; background: #1b1b1b; }\n.hb-dfn-cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }\n.hb-dfn-col { display: flex; align-items: flex-end; justify-content: center; gap: 4px; padding: 0; border: 0; border-radius: 6px; background: transparent; cursor: pointer; transition: background .15s ease; }\n.hb-dfn-col:hover, .hb-dfn-col[data-on=\"true\"] { background: rgba(255, 255, 255, .035); }\n.hb-dfn-bar { width: min(34%, 16px); border-radius: 5px 5px 2px 2px; transform-origin: bottom; animation: hb-dfn-grow .8s cubic-bezier(.3, .7, .2, 1) both; animation-delay: calc(var(--i) * 40ms); transition: filter .15s ease; }\n.hb-dfn-bar[data-k=\"in\"] { background: linear-gradient(180deg, var(--a), color-mix(in srgb, var(--a) 50%, #000000)); }\n.hb-dfn-bar[data-k=\"out\"] { background: linear-gradient(180deg, #8791a8, #4a5164); }\n.hb-dfn-col:hover .hb-dfn-bar, .hb-dfn-col[data-on=\"true\"] .hb-dfn-bar { filter: brightness(1.2); }\n.hb-dfn-xl { grid-column: 2; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); padding-top: 10px; color: #6b6b6b; font-size: 11px; text-align: center; }\n.hb-dfn-donut { position: relative; width: 148px; height: 148px; margin: 0 auto 16px; }\n.hb-dfn-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }\n.hb-dfn-donut-t { fill: none; stroke: #1b1b1b; stroke-width: 5; }\n.hb-dfn-donut-s { fill: none; stroke-width: 5; transition: opacity .2s ease, stroke-width .2s ease; animation: hb-dfn-arc .9s cubic-bezier(.3, .7, .2, 1) both; }\n.hb-dfn-donut-s[data-hot=\"true\"] { stroke-width: 6; }\n.hb-dfn-donut-s[data-dim=\"true\"] { opacity: .3; }\n.hb-dfn-donut-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }\n.hb-dfn-donut-c strong { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.03em; line-height: 1.1; }\n.hb-dfn-donut-c span { color: #8f8f8f; font-size: 11px; }\n.hb-dfn-cat { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }\n.hb-dfn-cat li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; margin: 0 -6px; padding: 5px 6px; border-radius: 6px; color: #a1a1a1; font-size: 12.5px; transition: background .15s ease; }\n.hb-dfn-cat li:hover { background: #171717; color: #ededed; }\n.hb-dfn-cat i { width: 8px; height: 8px; border-radius: 3px; }\n.hb-dfn-cat b { color: #ededed; font-weight: 500; font-variant-numeric: tabular-nums; }\n.hb-dfn-cat em { min-width: 36px; color: #6b6b6b; font-size: 12px; font-style: normal; text-align: right; font-variant-numeric: tabular-nums; }\n.hb-dfn-tx { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }\n.hb-dfn-tx li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 0 -8px; padding: 10px 8px; border-top: 1px solid #1b1b1b; border-radius: 8px; transition: background .15s ease; }\n.hb-dfn-tx li:first-child { border-top-color: transparent; }\n.hb-dfn-tx li:hover { background: #151515; }\n.hb-dfn-tx-i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }\n.hb-dfn-tx-n { min-width: 0; }\n.hb-dfn-tx-n strong { display: block; overflow: hidden; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }\n.hb-dfn-tx-n span { color: #6b6b6b; font-size: 12px; }\n.hb-dfn-tx-a { font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }\n.hb-dfn-tx-a[data-in=\"true\"] { color: #4ade80; }\n.hb-dfn-goals { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }\n.hb-dfn-goal { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-top: 1px solid #1b1b1b; }\n.hb-dfn-goal:first-child { padding-top: 0; border-top: 0; }\n.hb-dfn-goal:last-child { padding-bottom: 0; }\n.hb-dfn-goal-r { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 500; }\n.hb-dfn-goal-r span { color: #8f8f8f; font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; }\n.hb-dfn-goal-b { height: 6px; border-radius: 999px; background: #1b1b1b; overflow: hidden; }\n.hb-dfn-goal-b i { display: block; width: var(--w); height: 100%; border-radius: 999px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 60%, #000000), var(--c)); transform-origin: left; animation: hb-dfn-bar .9s cubic-bezier(.3, .7, .2, 1) both; transition: width .5s cubic-bezier(.3, .7, .2, 1); }\n.hb-dfn-goal-f { display: flex; align-items: center; justify-content: space-between; color: #8f8f8f; font-size: 12px; }\n.hb-dfn-mini { height: 24px; padding: 0 9px; border: 1px solid #2a2a2a; border-radius: 6px; background: #151515; color: #ededed; font-size: 11.5px; font-weight: 500; cursor: pointer; transition: background .15s ease, border-color .15s ease; }\n.hb-dfn-mini:hover:not(:disabled) { border-color: #3a3a3a; background: #1c1c1c; }\n.hb-dfn-mini:disabled { color: #6b6b6b; cursor: default; }\n@keyframes hb-dfn-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }\n@container hb-dfn (max-width: 959px) {\n  .hb-dfn-hero, .hb-dfn-row, .hb-dfn-row-b { grid-template-columns: minmax(0, 1fr); }\n}\n@container hb-dfn (max-width: 539px) {\n  .hb-dfn-bal-v { font-size: 34px; }\n  .hb-dfn-accts { grid-template-columns: minmax(0, 1fr); }\n  .hb-dfn-cc { padding: 16px 18px; }\n  .hb-dfn-cc-n { font-size: 14px; }\n}\n`;\n\nfunction hash(n: number) {\n  let x = Math.imul(n + 1, 2654435761) >>> 0;\n  x ^= x >>> 15;\n  x = Math.imul(x, 2246822519) >>> 0;\n  x ^= x >>> 13;\n  return (x >>> 0) / 4294967296;\n}\n\ntype Pt = [number, number];\n\nfunction smooth(pts: Pt[]) {\n  let d = `M${pts[0][0].toFixed(1)} ${pts[0][1].toFixed(1)}`;\n  for (let i = 0; i < pts.length - 1; i++) {\n    const p0 = pts[i - 1] ?? pts[i];\n    const p1 = pts[i];\n    const p2 = pts[i + 1];\n    const p3 = pts[i + 2] ?? p2;\n    const c1x = p1[0] + (p2[0] - p0[0]) / 6;\n    const c1y = p1[1] + (p2[1] - p0[1]) / 6;\n    const c2x = p2[0] - (p3[0] - p1[0]) / 6;\n    const c2y = p2[1] - (p3[1] - p1[1]) / 6;\n    d += `C${c1x.toFixed(1)} ${c1y.toFixed(1)} ${c2x.toFixed(1)} ${c2y.toFixed(1)} ${p2[0].toFixed(1)} ${p2[1].toFixed(1)}`;\n  }\n  return d;\n}\n\nfunction project(values: number[], w: number, h: number, padY: number, lo?: number, hi?: number): Pt[] {\n  const min = lo ?? Math.min(...values);\n  const max = hi ?? Math.max(...values);\n  const span = max - min || 1;\n  return values.map((v, i) => [\n    values.length === 1 ? w / 2 : (i / (values.length - 1)) * w,\n    padY + (1 - (v - min) / span) * (h - padY * 2),\n  ]);\n}\n\nfunction tone(name: string) {\n  let h = 0;\n  for (let i = 0; i < name.length; i++) h = (h * 31 + name.charCodeAt(i)) >>> 0;\n  const hue = h % 360;\n  return `linear-gradient(135deg, hsl(${hue} 62% 52%), hsl(${(hue + 48) % 360} 62% 36%))`;\n}\n\nfunction initials(name: string) {\n  return name\n    .split(\" \")\n    .map((w) => w[0])\n    .slice(0, 2)\n    .join(\"\")\n    .toUpperCase();\n}\n\nconst icons: Record<string, string[]> = {\n  grid: [\"M3 3h7v7H3zM14 3h7v7h-7zM14 14h7v7h-7zM3 14h7v7H3z\"],\n  sliders: [\"M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3M1 14h6M9 8h6M17 16h6\"],\n  bell: [\"M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9\", \"M13.7 21a2 2 0 0 1-3.4 0\"],\n  search: [\"M11 3a8 8 0 1 0 0 16 8 8 0 0 0 0-16z\", \"M21 21l-4.3-4.3\"],\n  dollar: [\"M12 1v22\", \"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6\"],\n  cart: [\"M6 6h15l-2 9H8z\", \"M6 6L5 3H2\", \"M9 20a1 1 0 1 0 0 .01\", \"M18 20a1 1 0 1 0 0 .01\"],\n  card: [\"M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1z\", \"M2 10h20\"],\n  pie: [\"M21 12A9 9 0 1 1 12 3v9z\"],\n  up: [\"M12 19V5M5 12l7-7 7 7\"],\n  down: [\"M12 5v14M19 12l-7 7-7-7\"],\n  chevr: [\"M9 6l6 6-6 6\"],\n  out: [\"M7 17L17 7M8 7h9v9\"],\n  shield: [\"M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z\"],\n  truck: [\"M1 4h13v12H1zM14 8h4l3 3v5h-7z\", \"M5.5 18.5a1.5 1.5 0 1 0 0 .01\", \"M17.5 18.5a1.5 1.5 0 1 0 0 .01\"],\n  home: [\"M3 11l9-8 9 8\", \"M5 10v10h5v-6h4v6h5V10\"],\n  wallet: [\"M3 7a2 2 0 0 1 2-2h13v4\", \"M3 7v11a2 2 0 0 0 2 2h15V9H5a2 2 0 0 1-2-2z\", \"M16 14.5h.01\"],\n  send: [\"M22 2L11 13\", \"M22 2l-7 20-4-9-9-4z\"],\n  target: [\"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z\", \"M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8z\"],\n  eye: [\"M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z\", \"M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z\"],\n  eyeoff: [\"M17.9 17.9A10.9 10.9 0 0 1 12 19C5 19 1 12 1 12a18.5 18.5 0 0 1 5.1-5.9\", \"M9.9 4.2A9.1 9.1 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.2 3.2\", \"M1 1l22 22\"],\n  receipt: [\"M5 3h14v18l-3-2-2 2-2-2-2 2-2-2-3 2z\", \"M9 8h6M9 12h6\"],\n  repeat: [\"M17 2l4 4-4 4\", \"M3 11V9a3 3 0 0 1 3-3h15\", \"M7 22l-4-4 4-4\", \"M21 13v2a3 3 0 0 1-3 3H3\"],\n};\n\nfunction Ico({ n }: { n: string }) {\n  return (\n    <svg className=\"hb-dfn-ico\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n      {(icons[n] ?? []).map((d, i) => (\n        <path key={i} d={d} />\n      ))}\n    </svg>\n  );\n}\n\nfunction Spark({ values, id }: { values: number[]; id: string }) {\n  const line = smooth(project(values, 100, 32, 3));\n  return (\n    <svg className=\"hb-dfn-spark\" viewBox=\"0 0 100 32\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\n      <defs>\n        <linearGradient id={id} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n          <stop offset=\"0\" stopColor=\"currentColor\" stopOpacity=\".26\" />\n          <stop offset=\"1\" stopColor=\"currentColor\" stopOpacity=\"0\" />\n        </linearGradient>\n      </defs>\n      <path d={`${line}L100 32L0 32Z`} fill={`url(#${id})`} />\n      <path className=\"hb-dfn-spark-l\" d={line} />\n    </svg>\n  );\n}\n\ninterface NavItem {\n  id: string;\n  label: string;\n  icon: string;\n  count?: string;\n  section?: string;\n}\nfunction Shell({\n  brand,\n  nav,\n  defaultActive,\n  crumb,\n  placeholder,\n  user,\n  foot,\n  children,\n}: {\n  brand: string;\n  nav: NavItem[];\n  defaultActive: string;\n  crumb: [string, string];\n  placeholder: string;\n  user: string;\n  foot?: React.ReactNode;\n  children: React.ReactNode;\n}) {\n  const [active, setActive] = React.useState(defaultActive);\n  return (\n    <div className=\"hb-dfn-app\">\n      <aside className=\"hb-dfn-side\">\n        <div className=\"hb-dfn-brand\">\n          <span className=\"hb-dfn-mark\" aria-hidden=\"true\">\n            <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n              <path d=\"M4 18L10 6l4 8 2-4 4 8\" />\n            </svg>\n          </span>\n          <span>{brand}</span>\n        </div>\n        <nav aria-label=\"Main\">\n          <ul className=\"hb-dfn-nav\">\n            {nav.map((item) => (\n              <React.Fragment key={item.id}>\n                {item.section ? (\n                  <li className=\"hb-dfn-nav-label\" aria-hidden=\"true\">\n                    {item.section}\n                  </li>\n                ) : null}\n                <li>\n                  <button type=\"button\" className=\"hb-dfn-link\" aria-current={active === item.id ? \"page\" : undefined} aria-label={item.label} onClick={() => setActive(item.id)}>\n                    <Ico n={item.icon} />\n                    <span className=\"hb-dfn-link-t\">{item.label}</span>\n                    {item.count ? <span className=\"hb-dfn-link-n\">{item.count}</span> : null}\n                  </button>\n                </li>\n              </React.Fragment>\n            ))}\n          </ul>\n        </nav>\n        {foot ? <div className=\"hb-dfn-side-foot\">{foot}</div> : null}\n      </aside>\n      <div className=\"hb-dfn-main\">\n        <header className=\"hb-dfn-top\">\n          <div className=\"hb-dfn-crumb\">\n            {crumb[0]} / <strong>{crumb[1]}</strong>\n          </div>\n          <label className=\"hb-dfn-search\">\n            <Ico n=\"search\" />\n            <input type=\"search\" placeholder={placeholder} aria-label={placeholder} />\n            <span className=\"hb-dfn-kbd\">/</span>\n          </label>\n          <button type=\"button\" className=\"hb-dfn-iconbtn\" aria-label=\"Notifications\">\n            <Ico n=\"bell\" />\n            <span className=\"hb-dfn-dot\" />\n          </button>\n          <span className=\"hb-dfn-av\" style={{ background: tone(user), width: 34, height: 34 }} title={user}>\n            {initials(user)}\n          </span>\n        </header>\n        <div className=\"hb-dfn-content\">{children}</div>\n      </div>\n    </div>\n  );\n}\n\nconst RANGE_KEYS: FinanceRange[] = [\"6M\", \"12M\"];\nconst MONTHS = [\"Nov\", \"Dec\", \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\"];\nconst INCOME = [5200, 6100, 5400, 5300, 5600, 5500, 5900, 5700, 6000, 6200, 6100, 6400];\nconst EXPENSES = [3900, 4800, 3700, 3600, 3850, 4100, 4200, 3950, 4300, 4100, 4000, 3700];\nconst BALANCE_RAW = Array.from({ length: 30 }, (_, i) => 41200 + i * 98 + hash(i + 5) * 520);\nconst BALANCE = BALANCE_RAW.map((v, i) => v + (44260.5 - BALANCE_RAW[29]) * (i / 29));\n\nconst CATEGORIES = [\n  { name: \"Housing\", amount: 1450, color: \"var(--a)\" },\n  { name: \"Food & dining\", amount: 820, color: \"#a78bfa\" },\n  { name: \"Shopping\", amount: 560, color: \"#34d399\" },\n  { name: \"Transport\", amount: 410, color: \"#fbbf24\" },\n  { name: \"Subscriptions\", amount: 190, color: \"#fb7185\" },\n  { name: \"Other\", amount: 270, color: \"#6b7280\" },\n];\n\nconst TRANSACTIONS = [\n  { name: \"Lumen Studio\", note: \"Payroll · Oct 28\", amount: 4200, icon: \"dollar\", color: \"#4ade80\" },\n  { name: \"Harbor Market\", note: \"Groceries · Oct 28\", amount: -86.42, icon: \"cart\", color: \"#34d399\" },\n  { name: \"Elm Street Properties\", note: \"Rent · Oct 27\", amount: -1450, icon: \"home\", color: \"#7fb3ff\" },\n  { name: \"Greenline Transit\", note: \"Transport · Oct 26\", amount: -42, icon: \"truck\", color: \"#fbbf24\" },\n  { name: \"Streamly\", note: \"Subscription · Oct 26\", amount: -14.99, icon: \"repeat\", color: \"#fb7185\" },\n  { name: \"Okoro Design\", note: \"Invoice · Oct 25\", amount: 860, icon: \"receipt\", color: \"#4ade80\" },\n];\n\nconst GOALS = [\n  { name: \"Emergency fund\", saved: 8400, target: 12000, color: \"var(--a)\" },\n  { name: \"Japan trip\", saved: 2150, target: 4500, color: \"#a78bfa\" },\n  { name: \"New laptop\", saved: 1320, target: 1800, color: \"#34d399\" },\n];\n\nconst NAV: NavItem[] = [\n  { id: \"overview\", label: \"Overview\", icon: \"grid\", section: \"Banking\" },\n  { id: \"accounts\", label: \"Accounts\", icon: \"wallet\" },\n  { id: \"cards\", label: \"Cards\", icon: \"card\", count: \"2\" },\n  { id: \"transfers\", label: \"Transfers\", icon: \"send\" },\n  { id: \"savings\", label: \"Savings\", icon: \"target\", section: \"Plan\" },\n  { id: \"insights\", label: \"Insights\", icon: \"pie\" },\n  { id: \"settings\", label: \"Settings\", icon: \"sliders\" },\n];\n\nfunction sum(a: number[]) {\n  return a.reduce((t, v) => t + v, 0);\n}\n\nfunction usd(n: number, digits = 2) {\n  return `$${Math.abs(n).toLocaleString(\"en-US\", { minimumFractionDigits: digits, maximumFractionDigits: digits })}`;\n}\n\nexport function FinanceDashboard({\n  accent = \"#2f7bff\",\n  brand = \"Marlow\",\n  owner = \"Dana Reyes\",\n  range,\n  defaultRange = \"6M\",\n  onRangeChange,\n  defaultHidden = false,\n  className = \"\",\n  style,\n  ...rest\n}: FinanceDashboardProps) {\n  const uid = React.useId().replace(/:/g, \"\");\n  const [inner, setInner] = React.useState<FinanceRange>(defaultRange);\n  const [hidden, setHidden] = React.useState(defaultHidden);\n  const [hover, setHover] = React.useState<number | null>(null);\n  const [hot, setHot] = React.useState<number | null>(null);\n  const [added, setAdded] = React.useState<number[]>([0, 0, 0]);\n  const current = range ?? inner;\n  const n = current === \"6M\" ? 6 : 12;\n  const months = MONTHS.slice(12 - n);\n  const income = INCOME.slice(12 - n);\n  const expenses = EXPENSES.slice(12 - n);\n  const top = Math.ceil(Math.max(...income, ...expenses) / 2000) * 2000;\n  const ticks = top / 2000;\n  const totalIn = sum(income);\n  const totalOut = sum(expenses);\n  const spent = sum(CATEGORIES.map((c) => c.amount));\n  const first = BALANCE[0];\n  const checking = 12840.5;\n  const savings = 31420;\n  const total = checking + savings;\n  const mask = (s: string) => (hidden ? \"••••••\" : s);\n  const [whole, cents] = usd(total).slice(1).split(\".\");\n\n  const pick = (r: FinanceRange) => {\n    setInner(r);\n    setHover(null);\n    onRangeChange?.(r);\n  };\n\n  const arcs = CATEGORIES.map((c, i) => {\n    const share = (c.amount / spent) * 100;\n    return {\n      ...c,\n      share,\n      len: Math.max(share - 1.2, 0.5),\n      offset: CATEGORIES.slice(0, i).reduce((t, x) => t + (x.amount / spent) * 100, 0) + 0.6,\n    };\n  });\n\n  const bump = (i: number) =>\n    setAdded((a) => {\n      const next = [...a];\n      next[i] = Math.min(next[i] + 50, GOALS[i].target - GOALS[i].saved);\n      return next;\n    });\n\n  const hp = hover === null ? null : ((hover + 0.5) / n) * 100;\n  const vars = { \"--a\": accent, ...style } as React.CSSProperties;\n\n  return (\n    <div className={`hb-dfn ${className}`} style={vars} {...rest}>\n      <style href=\"hb-finance-dashboard\" precedence=\"default\">\n        {css}\n      </style>\n      <Shell\n        brand={brand}\n        nav={NAV}\n        defaultActive=\"overview\"\n        crumb={[\"Banking\", \"Overview\"]}\n        placeholder=\"Search transactions\"\n        user={owner}\n        foot={\n          <div className=\"hb-dfn-safe\">\n            <Ico n=\"shield\" />\n            <div>\n              <strong>Protected</strong>\n              <span>Deposits insured up to $250,000</span>\n            </div>\n          </div>\n        }\n      >\n        <div className=\"hb-dfn-head\">\n          <div>\n            <h2 className=\"hb-dfn-title\">Good morning, {owner.split(\" \")[0]}</h2>\n            <p className=\"hb-dfn-sub\">Here is how your money moved in October</p>\n          </div>\n          <div className=\"hb-dfn-tools\">\n            <button type=\"button\" className=\"hb-dfn-btn\" aria-pressed={hidden} onClick={() => setHidden((h) => !h)}>\n              <Ico n={hidden ? \"eye\" : \"eyeoff\"} />\n              {hidden ? \"Show balances\" : \"Hide balances\"}\n            </button>\n            <button type=\"button\" className=\"hb-dfn-btn\" data-p=\"true\">\n              <Ico n=\"send\" />\n              Send money\n            </button>\n          </div>\n        </div>\n\n        <div className=\"hb-dfn-hero\">\n          <div className=\"hb-dfn-card hb-dfn-bal\" style={{ \"--d\": 0 } as React.CSSProperties}>\n            <div>\n              <div className=\"hb-dfn-bal-l\">\n                <span>Total balance</span>\n                <span className=\"hb-dfn-pill\" data-t=\"up\">\n                  <Ico n=\"up\" />\n                  {(((total - first) / first) * 100).toFixed(1)}%\n                </span>\n              </div>\n              <p className=\"hb-dfn-bal-v\">\n                {hidden ? (\n                  \"$••••••\"\n                ) : (\n                  <>\n                    ${whole}\n                    <small>.{cents}</small>\n                  </>\n                )}\n              </p>\n              <div className=\"hb-dfn-bal-d\">{mask(`+${usd(total - first, 2)}`)} since Oct 1</div>\n            </div>\n            <Spark values={BALANCE} id={`${uid}b`} />\n            <div className=\"hb-dfn-accts\">\n              <div className=\"hb-dfn-acct\" style={{ \"--c\": \"var(--a)\" } as React.CSSProperties}>\n                <span>\n                  <i />\n                  Checking\n                </span>\n                <b>{mask(usd(checking))}</b>\n              </div>\n              <div className=\"hb-dfn-acct\" style={{ \"--c\": \"#34d399\" } as React.CSSProperties}>\n                <span>\n                  <i />\n                  Savings\n                </span>\n                <b>{mask(usd(savings))}</b>\n              </div>\n            </div>\n          </div>\n\n          <div className=\"hb-dfn-cc\" role=\"img\" aria-label={`Debit card ending in 4821 for ${owner}`}>\n            <div className=\"hb-dfn-cc-t\">\n              <span>{brand}</span>\n              <svg className=\"hb-dfn-ico\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" aria-hidden=\"true\">\n                <path d=\"M8 8.5a5 5 0 0 1 0 7M12 6a9 9 0 0 1 0 12M16 3.5a13 13 0 0 1 0 17\" />\n              </svg>\n            </div>\n            <span className=\"hb-dfn-chip-i\" />\n            <p className=\"hb-dfn-cc-n\">•••• •••• •••• 4821</p>\n            <div className=\"hb-dfn-cc-b\">\n              <div>\n                <small>Card holder</small>\n                <span>{owner.toUpperCase()}</span>\n              </div>\n              <div>\n                <small>Expires</small>\n                <span>09/29</span>\n              </div>\n              <span className=\"hb-dfn-cc-m\">\n                <i />\n                <i />\n              </span>\n            </div>\n          </div>\n        </div>\n\n        <div className=\"hb-dfn-row\">\n          <div className=\"hb-dfn-card\" style={{ \"--d\": 2 } as React.CSSProperties}>\n            <div className=\"hb-dfn-card-h\">\n              <div>\n                <h3 className=\"hb-dfn-card-t\">Income vs expenses</h3>\n                <p className=\"hb-dfn-card-s\">Last {n} months</p>\n              </div>\n              <div className=\"hb-dfn-seg\" role=\"group\" aria-label=\"Range\">\n                {RANGE_KEYS.map((r) => (\n                  <button key={r} type=\"button\" aria-pressed={current === r} onClick={() => pick(r)}>\n                    {r}\n                  </button>\n                ))}\n              </div>\n            </div>\n            <div className=\"hb-dfn-sum\">\n              <div className=\"hb-dfn-sum-i\">\n                Income\n                <b>{mask(usd(totalIn, 0))}</b>\n              </div>\n              <div className=\"hb-dfn-sum-i\">\n                Expenses\n                <b>{mask(usd(totalOut, 0))}</b>\n              </div>\n              <div className=\"hb-dfn-sum-i\">\n                Net saved\n                <b style={{ color: \"#4ade80\" }}>{mask(`+${usd(totalIn - totalOut, 0)}`)}</b>\n              </div>\n              <div className=\"hb-dfn-legend-k\" style={{ marginLeft: \"auto\", alignSelf: \"flex-end\" }}>\n                <span style={{ \"--c\": \"var(--a)\" } as React.CSSProperties}>\n                  <i />\n                  Income\n                </span>\n                <span style={{ \"--c\": \"#8791a8\" } as React.CSSProperties}>\n                  <i />\n                  Expenses\n                </span>\n              </div>\n            </div>\n            <div className=\"hb-dfn-gb\" style={{ \"--n\": n } as React.CSSProperties}>\n              <div className=\"hb-dfn-yl\" aria-hidden=\"true\">\n                {Array.from({ length: ticks + 1 }, (_, k) => (\n                  <span key={k} style={{ bottom: `${((k / ticks) * 100).toFixed(2)}%` }}>\n                    {k === 0 ? \"0\" : `${k * 2}K`}\n                  </span>\n                ))}\n              </div>\n              <div className=\"hb-dfn-plot\" onPointerLeave={() => setHover(null)}>\n                {Array.from({ length: ticks + 1 }, (_, k) => (\n                  <div key={k} className=\"hb-dfn-gl\" style={{ bottom: `${((k / ticks) * 100).toFixed(2)}%` }} />\n                ))}\n                <div className=\"hb-dfn-cols\" key={current}>\n                  {months.map((m, i) => (\n                    <button\n                      key={m}\n                      type=\"button\"\n                      className=\"hb-dfn-col\"\n                      data-on={hover === i}\n                      aria-label={`${m}: income ${usd(income[i], 0)}, expenses ${usd(expenses[i], 0)}`}\n                      onPointerEnter={() => setHover(i)}\n                      onFocus={() => setHover(i)}\n                      onBlur={() => setHover(null)}\n                    >\n                      <span className=\"hb-dfn-bar\" data-k=\"in\" style={{ height: `${((income[i] / top) * 100).toFixed(2)}%`, \"--i\": i } as React.CSSProperties} />\n                      <span className=\"hb-dfn-bar\" data-k=\"out\" style={{ height: `${((expenses[i] / top) * 100).toFixed(2)}%`, \"--i\": i } as React.CSSProperties} />\n                    </button>\n                  ))}\n                </div>\n                {hover !== null && hp !== null ? (\n                  <div className=\"hb-dfn-tt\" style={{ top: 4, left: `${hp.toFixed(2)}%`, transform: hp > 62 ? \"translateX(calc(-100% - 22px))\" : \"translateX(22px)\" }}>\n                    <div className=\"hb-dfn-tt-d\">{months[hover]}</div>\n                    <div>\n                      Income <b>{mask(usd(income[hover], 0))}</b>\n                    </div>\n                    <div>\n                      Expenses <b>{mask(usd(expenses[hover], 0))}</b>\n                    </div>\n                    <div>\n                      Saved <b style={{ color: \"#4ade80\" }}>{mask(usd(income[hover] - expenses[hover], 0))}</b>\n                    </div>\n                  </div>\n                ) : null}\n              </div>\n              <div className=\"hb-dfn-xl\" aria-hidden=\"true\">\n                {months.map((m) => (\n                  <span key={m}>{m}</span>\n                ))}\n              </div>\n            </div>\n          </div>\n\n          <div className=\"hb-dfn-card\" style={{ \"--d\": 3 } as React.CSSProperties}>\n            <div className=\"hb-dfn-card-h\">\n              <div>\n                <h3 className=\"hb-dfn-card-t\">Spending by category</h3>\n                <p className=\"hb-dfn-card-s\">October</p>\n              </div>\n            </div>\n            <div className=\"hb-dfn-donut\">\n              <svg viewBox=\"0 0 42 42\" role=\"img\" aria-label=\"Spending by category\">\n                <circle className=\"hb-dfn-donut-t\" cx=\"21\" cy=\"21\" r=\"15.9155\" />\n                {arcs.map((s, i) => (\n                  <circle\n                    key={s.name}\n                    className=\"hb-dfn-donut-s\"\n                    cx=\"21\"\n                    cy=\"21\"\n                    r=\"15.9155\"\n                    pathLength={100}\n                    data-hot={hot === i}\n                    data-dim={hot !== null && hot !== i}\n                    style={{ stroke: s.color, strokeDasharray: `${s.len.toFixed(2)} ${(100 - s.len).toFixed(2)}`, strokeDashoffset: -s.offset }}\n                  />\n                ))}\n              </svg>\n              <div className=\"hb-dfn-donut-c\">\n                <strong>{mask(hot === null ? usd(spent, 0) : usd(CATEGORIES[hot].amount, 0))}</strong>\n                <span>{hot === null ? \"spent\" : CATEGORIES[hot].name}</span>\n              </div>\n            </div>\n            <ul className=\"hb-dfn-cat\">\n              {arcs.map((s, i) => (\n                <li key={s.name} onMouseEnter={() => setHot(i)} onMouseLeave={() => setHot(null)}>\n                  <i style={{ background: s.color }} />\n                  <span>{s.name}</span>\n                  <b>{mask(usd(s.amount, 0))}</b>\n                  <em>{s.share.toFixed(0)}%</em>\n                </li>\n              ))}\n            </ul>\n          </div>\n        </div>\n\n        <div className=\"hb-dfn-row-b\">\n          <div className=\"hb-dfn-card\" style={{ \"--d\": 4 } as React.CSSProperties}>\n            <div className=\"hb-dfn-card-h\">\n              <div>\n                <h3 className=\"hb-dfn-card-t\">Recent transactions</h3>\n                <p className=\"hb-dfn-card-s\">Across all accounts</p>\n              </div>\n              <button type=\"button\" className=\"hb-dfn-btn\">\n                View all\n                <Ico n=\"chevr\" />\n              </button>\n            </div>\n            <ul className=\"hb-dfn-tx\">\n              {TRANSACTIONS.map((t) => (\n                <li key={t.name}>\n                  <span className=\"hb-dfn-tx-i\" style={{ \"--c\": t.color } as React.CSSProperties}>\n                    <Ico n={t.icon} />\n                  </span>\n                  <div className=\"hb-dfn-tx-n\">\n                    <strong>{t.name}</strong>\n                    <span>{t.note}</span>\n                  </div>\n                  <span className=\"hb-dfn-tx-a\" data-in={t.amount > 0}>\n                    {mask(`${t.amount > 0 ? \"+\" : \"-\"}${usd(t.amount)}`)}\n                  </span>\n                </li>\n              ))}\n            </ul>\n          </div>\n\n          <div className=\"hb-dfn-card\" style={{ \"--d\": 5 } as React.CSSProperties}>\n            <div className=\"hb-dfn-card-h\">\n              <div>\n                <h3 className=\"hb-dfn-card-t\">Savings goals</h3>\n                <p className=\"hb-dfn-card-s\">Add a little each week</p>\n              </div>\n            </div>\n            <ul className=\"hb-dfn-goals\">\n              {GOALS.map((g, i) => {\n                const saved = g.saved + added[i];\n                const ratio = (saved / g.target) * 100;\n                return (\n                  <li className=\"hb-dfn-goal\" key={g.name} style={{ \"--c\": g.color } as React.CSSProperties}>\n                    <div className=\"hb-dfn-goal-r\">\n                      {g.name}\n                      <span>\n                        {mask(usd(saved, 0))} of {mask(usd(g.target, 0))}\n                      </span>\n                    </div>\n                    <div className=\"hb-dfn-goal-b\" role=\"progressbar\" aria-valuenow={Math.round(ratio)} aria-valuemin={0} aria-valuemax={100} aria-label={g.name}>\n                      <i style={{ \"--w\": `${ratio.toFixed(1)}%` } as React.CSSProperties} />\n                    </div>\n                    <div className=\"hb-dfn-goal-f\">\n                      <span>{ratio >= 100 ? \"Goal reached\" : `${ratio.toFixed(0)}% complete`}</span>\n                      <button type=\"button\" className=\"hb-dfn-mini\" disabled={saved >= g.target} onClick={() => bump(i)} aria-label={`Add $50 to ${g.name}`}>\n                        + $50\n                      </button>\n                    </div>\n                  </li>\n                );\n              })}\n            </ul>\n          </div>\n        </div>\n      </Shell>\n    </div>\n  );\n}\n"
    }
  ]
}