/* Home connects each saved property with its monthly housing cost. */
.home-intro { align-items: center; justify-content: space-between; }
.home-intro-copy { margin: 10px 0 0; color: var(--color-secondary); font-size: 15px; line-height: 1.65; word-break: keep-all; }
.home-dashboard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: var(--space-6); align-items: start; }
.home-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid #e1e5eb; border-radius: var(--radius-card); background: #fff; box-shadow: 0 3px 16px #58417b04; }
.home-card-heading { display: flex; align-items: center; gap: 12px; min-width: 0; margin-bottom: 24px; }
.home-card .home-card-title { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.02em; line-height: 1.4; color: #333b49; }
.home-card-icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px; background: #f2edff; color: #7658df; }
.home-card-icon .icon { width: 21px; height: 21px; }
.home-card-count { margin-left: auto; flex-shrink: 0; color: #7b8390; font-size: 12px; font-weight: 700; }
.home-card-content { flex: 1; min-width: 0; }
.home-card-footer { display: flex; justify-content: flex-end; margin-top: 20px; padding: 14px 0 0; border-top: 1px solid #f0eef4; }
.home-card-link { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 44px; min-height: 44px; padding: 8px 12px; margin-right: -12px; border-radius: var(--radius-button); color: #7658df; font-size: 14px; font-weight: 700; line-height: 1.5; text-decoration: none; }
.home-card-link:hover { background: #f5f1fe; color: #6041c4; }
.home-card-link .icon { width: 17px; height: 17px; }
.home-total { margin: 0 0 24px; color: #6f5998; font-family: var(--font-display); font-size: clamp(32px, 3.6vw, 42px); font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.home-total .money-unit { font-size: max(14px, .43em); }
.home-funds-overview { display: grid; grid-template-columns: 144px minmax(0, 1fr); align-items: center; gap: 28px; }
.home-donut { position: relative; display: grid; place-items: center; width: 144px; height: 144px; border-radius: 50%; background: conic-gradient(var(--fund-segments, #eeeaf5 0 100%)); }
.home-donut::before { content: ''; position: absolute; inset: 19px; border-radius: 50%; background: #fff; }
.home-donut.is-empty { background: #eeeaf5; }
.home-donut-segments { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.home-donut-segment { fill: var(--fund-color); cursor: pointer; outline: none; }
.home-donut-segment.is-active { filter: brightness(1.12); stroke: #fff; stroke-width: 2; }
.home-donut-segment:focus-visible { stroke: #44315f; stroke-width: 2; }
.home-donut-center { position: relative; display: grid; justify-items: center; color: #80758e; line-height: 1.45; font-size: 12px; pointer-events: none; }
.home-donut-center strong { color: #65507e; font-size: 28px; font-weight: 800; }
.home-fund-tooltip { position: absolute; z-index: 5; bottom: calc(100% + 12px); left: 0; display: grid; gap: 7px; width: max-content; max-width: min(240px, calc(100vw - 64px)); padding: 12px 14px; border: 1px solid #ded4ee; border-radius: 12px; background: #fff; color: #4e445e; box-shadow: 0 6px 24px #49306124; font-size: 13px; line-height: 1.5; }
.home-fund-tooltip[hidden] { display: none; }
.home-fund-tooltip::after { content: ''; position: absolute; top: 100%; left: 0; width: 100%; height: 14px; }
.home-fund-tooltip-label { display: flex; align-items: baseline; gap: 7px; min-width: 0; overflow-wrap: anywhere; }
.home-fund-tooltip-label::before { content: ''; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--fund-color); }
.home-fund-tooltip-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 10px; font-size: 17px; }
.home-fund-tooltip-value .money-unit { font-size: 12px; }
.home-fund-tooltip-value .home-funds-ratio { font-size: 12px; font-weight: 400; color: #8b8196; }
.home-funds-legend {
  min-width: 0; max-height: 256px; overflow-y: auto; margin: 0; display: grid; gap: 20px;
  scrollbar-color: #9b7bce #f1eef6;
}
/* Show the full legend scroll range, including the top and bottom edges. */
@supports selector(.home-funds-legend::-webkit-scrollbar) {
  .home-funds-legend { scrollbar-color: auto; scrollbar-width: auto; }
  .home-funds-legend::-webkit-scrollbar { width: 14px; height: 14px; }
  .home-funds-legend::-webkit-scrollbar-track {
    margin: 2px; border: 1px solid #a5a1ad; border-radius: 8px; background: #f1eef6;
  }
  .home-funds-legend::-webkit-scrollbar-thumb {
    min-height: var(--control-min); border: 3px solid transparent; border-radius: 8px;
    background: #9b7bce; background-clip: padding-box;
  }
  .home-funds-legend::-webkit-scrollbar-thumb:hover { background-color: #8360bc; }
  .home-funds-legend::-webkit-scrollbar-button { display: none; }
  .home-funds-legend::-webkit-scrollbar-corner { background: #f1eef6; }
}
.home-funds-legend > div { min-width: 0; }
.home-funds-legend > div.is-active { border-radius: 8px; background: #f6f2fc; box-shadow: 0 0 0 5px #f6f2fc; }
.home-funds-legend dt { display: flex; align-items: baseline; gap: 7px; margin-bottom: 5px; color: #777282; font-size: 13px; line-height: 1.5; }
.home-funds-legend dt > span { min-width: 0; overflow-wrap: anywhere; }
.home-funds-legend dt > i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--fund-color); }
.home-funds-legend dd { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 8px; min-width: 0; margin: 0; color: #4e445e; font-size: 19px; font-weight: 800; line-height: 1.4; }
.home-funds-legend dd .money-unit { font-size: 12px; }
.home-funds-legend dd small { color: #8b8196; font-size: 12px; font-weight: 400; white-space: nowrap; }
.home-type-counts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; color: #7a7187; font-size: 12px; }
.home-type-counts > span { padding: 5px 9px; border-radius: 8px; background: #f6f3fb; line-height: 1.5; }
.home-list, .home-cost-chart { list-style: none; padding: 0; margin: 0; }
.home-list > li + li { border-top: 1px solid #f0eef4; }
.home-list-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-width: 0; min-height: 74px; padding: 14px 8px; margin-inline: -8px; border-radius: var(--radius-control); color: inherit; text-decoration: none; }
.home-list-row:hover, .home-cost-row:hover { background: #faf8fe; }
.home-list-copy { display: grid; gap: 5px; flex: 1; min-width: 0; }
.home-list-title { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #434857; font-size: 15px; font-weight: 700; line-height: 1.5; }
.home-list-meta { display: block; color: #83808b; font-size: 12px; font-weight: 400; line-height: 1.55; overflow-wrap: anywhere; }
.home-list-amount { display: grid; gap: 4px; flex: 0 1 auto; min-width: 0; max-width: 54%; color: #6f5998; text-align: right; font-size: 16px; font-weight: 800; line-height: 1.5; }
.home-list-amount .money-amount { justify-content: flex-end; }
.home-list-amount .money-unit { font-size: 12px; }
.home-list-amount > small { font-size: 12px; color: #88818f; font-weight: 400; }
.home-cost-chart { display: grid; gap: 8px; }
.home-cost-row { display: grid; justify-content: stretch; align-items: stretch; gap: var(--gap-inline); min-height: 78px; padding: 10px 8px; margin-inline: -8px; border-radius: var(--radius-control); text-decoration: none; color: inherit; }
.home-cost-label { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; min-width: 0; }
.home-cost-label .home-list-title { flex: 1 1 120px; }
.home-cost-label .home-list-amount { flex-shrink: 0; max-width: 100%; font-size: 15px; }
.home-cost-label .home-list-copy { flex: 1 1 140px; }
.home-property-terms { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--gap-inline); color: var(--color-secondary); font-size: 12px; line-height: 1.6; }
.home-property-terms > span { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1); min-width: 0; }
.home-property-terms .money-unit { font-size: inherit; }
.home-cost-pending { color: var(--color-secondary); font-size: 14px; font-weight: 500; }
.home-cost-track { height: 8px; overflow: hidden; background: #f1edf8; border-radius: 100px; }
.home-cost-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #aa91ec, #7658df); }
.home-chart-note { margin: 16px 0 0; color: #8a8493; font-size: 12px; line-height: 1.65; word-break: keep-all; }
.home-empty { min-height: 190px; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 8px 0; text-align: center; }
.home-empty-character { width: 80px; height: 80px; object-fit: contain; margin-bottom: 12px; }
.home-empty-title { margin: 0; color: #645b71; font-size: 15px; font-weight: 700; line-height: 1.6; }
.home-empty-copy { max-width: 30em; margin: 7px 0 0; color: #8a8493; font-size: 13px; line-height: 1.65; word-break: keep-all; }
.home-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-4); min-height: 240px; height: 100%; padding-block: var(--space-4); text-align: center; }
.home-loading-character { display: block; width: 200px; max-width: 100%; height: 160px; object-fit: contain; }
.home-loading-copy { margin: 0; color: var(--color-secondary); font-size: 14px; font-weight: 600; line-height: 1.65; word-break: keep-all; }
.home-loading-dots { display: inline-block; width: 3ch; text-align: left; font-family: monospace; }
.home-noscript { padding: 24px; border-radius: var(--radius-card); background: #fff; color: #6b6278; }
@media (max-width: 900px) {
  .home-funds-overview { grid-template-columns: 116px minmax(0, 1fr); gap: 18px; }
  .home-donut { width: 116px; height: 116px; }
  .home-donut::before { inset: 16px; }
  .home-funds-legend dd { font-size: 17px; }
}
@media (max-width: 760px) {
  .home-dashboard { grid-template-columns: minmax(0, 1fr); }
  .home-card-heading { margin-bottom: 20px; }
  .home-card .home-card-title { font-size: 17px; }
  .home-total { font-size: clamp(32px, 8vw, 42px); }
  .home-funds-overview { grid-template-columns: 120px minmax(0, 1fr); gap: 24px; }
  .home-donut { width: 120px; height: 120px; }
  .home-funds-legend dd { font-size: 19px; }
  .home-intro-copy { font-size: 14px; }
}
@media (max-width: 380px) {
  .home-card .home-card-title { font-size: 16px; }
  .home-card-heading { gap: 9px; }
  .home-card-icon { width: 34px; height: 34px; flex-basis: 34px; }
  .home-funds-overview { grid-template-columns: 96px minmax(0, 1fr); gap: 18px; }
  .home-donut { width: 96px; height: 96px; }
  .home-donut::before { inset: 13px; }
  .home-donut-center strong { font-size: 24px; }
  .home-funds-legend dd { font-size: 17px; }
  .home-list-row { gap: 10px; }
  .home-list-title { font-size: 14px; }
  .home-list-amount { font-size: 15px; }
}
