    /* ── Categories Page ── */
    .categories-content {
      padding: 8px var(--content-px) 0;
    }
    .cat-group-label {
      font-size: 10px;
      font-weight: 400;
      text-transform: uppercase;
      letter-spacing: var(--ls-wide);
      color: rgba(255,255,255,0.15);
      font-family: var(--font-mono);
      padding: 16px 0 8px;
    }
    [data-theme="light"] .cat-group-label { color: rgba(0,0,0,0.25); }
    .cat-section {
      margin-bottom: 16px;
    }
    .cat-section-header {
      display: flex;
      align-items: baseline;
      padding: 12px 16px 6px;
    }
    .cat-section-dot {
      width: 8px;
      height: 8px;
      border-radius: 4px;
      flex-shrink: 0;
      margin-right: 8px;
      position: relative;
      top: -1px;
    }
    .cat-section-name {
      font-size: 14px;
      font-weight: 400;
      color: var(--text-1);
      flex: 1;
    }
    .cat-section-count {
      font-size: 12px;
      color: var(--text-3);
      font-family: var(--font-mono);
    }
    .cat-items {
      background: var(--card-bg-solid);
      border-radius: 14px;
      overflow: hidden;
      box-shadow:
        var(--shadow-md);
    }
    [data-theme="light"] .cat-items {
      box-shadow: var(--shadow-sm);
    }
    .cat-row {
      display: flex;
      align-items: center;
      padding: 12px 16px;
      border-bottom: 1px solid rgba(255,255,255,0.04);
      gap: 12px;
    }
    .cat-row:last-child { border-bottom: none; }
    .cat-row-name {
      flex: 1;
      font-size: 14px;
      color: var(--text-1);
    }
    .cat-row-delete {
      width: 28px;
      height: 28px;
      border-radius: 10px;
      border: none;
      background: rgba(255,69,58,0.1);
      color: var(--red);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      flex-shrink: 0;
    }
    .cat-row-delete:active { opacity: 0.6; }
    .cat-row-locked {
      font-size: 9px;
      color: var(--text-3);
      text-transform: uppercase;
      letter-spacing: var(--ls-caps);
      padding: 4px 8px;
      border-radius: 6px;
      background: rgba(255,255,255,0.04);
    }
    .cat-add-row {
      display: flex;
      align-items: center;
      padding: 12px 16px;
      gap: 8px;
      border-top: 1px solid rgba(255,255,255,0.04);
    }
    .cat-add-row svg {
      width: 16px;
      height: 16px;
      stroke: var(--emerald);
      stroke-width: 2;
      stroke-linecap: round;
      fill: none;
      flex-shrink: 0;
    }
    .cat-add-input {
      flex: 1;
      background: transparent;
      border: none;
      color: var(--text-1);
      font-size: 14px;
      font-family: var(--font-sans);
      outline: none;
      padding: 0;
    }
    .cat-add-input::placeholder { color: var(--text-3); opacity: 0.4; }

    /* ══════════════════════════════════════
       BUDGET PAGE
       ══════════════════════════════════════ */
    .budget-content {
      padding: 8px var(--content-px) 0;
    }
    /* Fixed month bar + remaining on mobile */
    @media (max-width: 767px) {
      .budget-month-wrapper {
        position: fixed;
        top: var(--header-h, 44px);
        left: 0;
        right: 0;
        z-index: 101;
        background: var(--bg);
        padding: 4px var(--content-px) 0;
        transition: top var(--duration-normal) var(--ease-out);
      }
      .budget-month-wrapper::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        height: 30px;
        background: linear-gradient(to bottom, var(--bg), transparent);
        pointer-events: none;
      }
      .budget-month-wrapper .budget-remaining {
        margin: 8px 0 4px;
      }
      .budget-month-spacer {
        display: block;
        height: 95px;
      }
    }
    .budget-month-bar {
      display: flex;
      gap: 4px;
      align-items: center;
    }
    .budget-year-select {
      appearance: none;
      -webkit-appearance: none;
      background: var(--glass-bg);
      border: 1px solid var(--glass-border);
      border-radius: 10px;
      padding: 6px 10px;
      font-family: var(--font-mono);
      font-size: 12px;
      font-weight: 400;
      color: var(--text-1);
      margin-right: 4px;
      flex-shrink: 0;
    }
    .budget-months-scroll {
      display: flex;
      gap: 4px;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      flex: 1;
    }
    .budget-months-scroll::-webkit-scrollbar { display: none; }
    .budget-month-pill {
      padding: 6px 10px;
      border-radius: 10px;
      border: 1px solid var(--glass-border);
      background: transparent;
      color: var(--text-3);
      font-size: 12px;
      font-weight: 400;
      cursor: pointer;
      white-space: nowrap;
      flex-shrink: 0;
      transition: all var(--duration-normal) ease;
      -webkit-tap-highlight-color: transparent;
      font-family: var(--font-sans);
    }
    .budget-month-pill.active {
      background: rgba(255,255,255,0.08);
      color: var(--text-1);
      border-color: rgba(255,255,255,0.1);
    }
    [data-theme="light"] .budget-month-pill.active {
      background: rgba(0,0,0,0.06);
      border-color: rgba(0,0,0,0.1);
    }
    .budget-section {
      margin-bottom: 24px;
    }
    .budget-section-header {
      display: flex;
      align-items: center;
      padding: 0 var(--content-px) 10px;
    }
    .budget-section-header .cat-section-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      margin-right: 10px;
      flex-shrink: 0;
    }
    .budget-section-name {
      font-size: 16px;
      font-weight: 600;
      color: var(--text-1);
      flex: 1;
      letter-spacing: var(--ls-tight);
    }
    .budget-section-total {
      font-size: 16px;
      color: var(--text-1);
      font-family: var(--font-mono);
      font-weight: 600;
      letter-spacing: var(--ls-tight);
    }
    .budget-items {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    /* Each category group is its own card */
    .budget-cat-card {
      background: var(--card-bg-solid);
      border-radius: 14px;
      overflow: hidden;
      box-shadow: var(--shadow-md);
    }
    [data-theme="light"] .budget-cat-card {
      box-shadow: var(--shadow-sm);
    }
    .budget-cat-card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 16px 0;
    }
    .budget-cat-card-name {
      font-size: 11px;
      font-weight: 600;
      letter-spacing: var(--ls-wide);
      text-transform: uppercase;
      color: var(--text-2);
    }
    .budget-cat-card-total {
      font-size: 11px;
      font-family: var(--font-mono);
      color: var(--text-2);
      font-weight: 500;
    }
    /* Add row card */
    .budget-add-card {
      background: var(--card-bg-solid);
      border-radius: 14px;
      overflow: hidden;
      box-shadow: var(--shadow-md);
    }
    [data-theme="light"] .budget-add-card {
      box-shadow: var(--shadow-sm);
    }
    /* Budget item row */
    .budget-row {
      display: flex;
      align-items: center;
      padding: 14px 16px;
      gap: 12px;
      position: relative;
    }
    .budget-row + .budget-row {
      border-top: 1px solid var(--divider);
    }
    .budget-row-info {
      flex: 1;
      min-width: 0;
    }
    .budget-row-name {
      font-size: 14px;
      color: var(--text-1);
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: var(--lh-none);
    }
    /* Amount — styled as a tappable value, not a form input */
    .budget-row-amount {
      width: 96px;
      text-align: right;
      background: var(--hover-bg);
      border: none;
      border-radius: 8px;
      padding: 8px 12px;
      font-family: var(--font-mono);
      font-size: 14px;
      font-weight: 500;
      color: var(--text-1);
      outline: none;
      -moz-appearance: textfield;
      flex-shrink: 0;
      transition: background var(--duration-fast) var(--ease-out),
                  box-shadow var(--duration-fast) var(--ease-out);
    }
    .budget-row-amount::-webkit-outer-spin-button,
    .budget-row-amount::-webkit-inner-spin-button { -webkit-appearance: none; }
    .budget-row-amount::placeholder {
      color: var(--text-3);
      opacity: 0.6;
      font-weight: 400;
    }
    .budget-row-amount:focus {
      background: rgba(10,132,255,0.08);
      box-shadow: inset 0 0 0 1.5px rgba(10,132,255,0.4);
    }
    [data-theme="light"] .budget-row-amount {
      background: rgba(0,0,0,0.03);
    }
    [data-theme="light"] .budget-row-amount:focus {
      background: rgba(10,132,255,0.06);
      box-shadow: inset 0 0 0 1.5px rgba(10,132,255,0.3);
    }
    /* Delete — hidden until row interaction */
    .budget-row-delete {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      border: none;
      background: transparent;
      color: var(--text-3);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      opacity: 0.3;
      transition: opacity var(--duration-fast) var(--ease-out),
                  color var(--duration-fast) var(--ease-out),
                  background var(--duration-fast) var(--ease-out);
      flex-shrink: 0;
      -webkit-tap-highlight-color: transparent;
    }
    .budget-row-delete:active {
      opacity: 1;
      color: #fff;
      background: var(--red);
    }
    /* Section footer — hidden, total in header */
    .budget-section-footer {
      display: none;
    }
    /* Allocation summary card at top of budgets tab */
    .budget-alloc-bar {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      width: 100%;
      padding: 8px 12px;
      border-radius: 10px;
      background: var(--card-bg-solid);
      box-sizing: border-box;
    }
    .budget-alloc-amount {
      font-family: var(--font-mono);
      font-size: 14px;
      font-weight: 600;
      letter-spacing: var(--ls-tight);
      line-height: var(--lh-none);
    }
    .budget-alloc-label {
      font-size: 12px;
      font-weight: 500;
      letter-spacing: var(--ls-slight);
    }
    /* Empty section state */
    .budget-empty-section {
      padding: 32px 16px;
      text-align: center;
      font-size: 13px;
      line-height: var(--lh-normal);
      color: var(--text-3);
    }
    .budget-empty-section span {
      display: block;
      font-size: 20px;
      margin-bottom: 8px;
    }
    /* Inline add row */
    .budget-add-inline {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 10px 12px 10px 16px;
    }
    .budget-add-input {
      flex: 1;
      min-width: 0;
      background: transparent;
      border: none;
      outline: none;
      font-size: 14px;
      color: var(--text-1);
      font-family: var(--font-sans);
      padding: 6px 0;
    }
    .budget-add-input::placeholder {
      color: var(--text-3);
      opacity: 0.4;
    }
    .budget-add-cat {
      flex-shrink: 0;
      max-width: 110px;
      background: transparent;
      border: 1px solid var(--divider);
      border-radius: 6px;
      color: var(--text-3);
      font-size: 12px;
      padding: 6px 8px;
      font-family: var(--font-sans);
      -webkit-appearance: none;
      appearance: none;
      cursor: pointer;
      transition: border-color var(--duration-fast) var(--ease-out);
    }
    .budget-add-cat:focus {
      border-color: var(--blue);
      color: var(--text-2);
    }
    .budget-add-btn {
      flex-shrink: 0;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: transparent;
      border: 1.5px solid var(--divider);
      color: var(--text-3);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: all var(--duration-fast) var(--ease-out);
    }
    .budget-add-btn:active {
      background: var(--emerald);
      border-color: var(--emerald);
      color: #fff;
      transform: scale(0.9);
    }
    /* Budget scope overlay */
    .budget-scope-overlay {
      position: fixed;
      inset: 0;
      z-index: 300;
      background: rgba(0,0,0,0.5);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      opacity: 0;
      transition: opacity var(--duration-normal) var(--ease-out);
    }
    .budget-scope-overlay.visible { opacity: 1; }
    .budget-scope-overlay.visible .budget-scope-sheet {
      transform: scale(1);
      opacity: 1;
    }
    .budget-scope-sheet {
      background: var(--card-bg-solid);
      border-radius: 16px;
      padding: 20px;
      width: 100%;
      max-width: 280px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      box-shadow: var(--shadow-xl);
      transform: scale(0.95);
      opacity: 0;
      transition: transform var(--duration-normal) var(--ease-spring),
                  opacity var(--duration-normal) var(--ease-out);
    }
    .budget-scope-title {
      font-size: 14px;
      font-weight: 600;
      color: var(--text-1);
      text-align: center;
      padding-bottom: 4px;
    }
    .budget-scope-opt {
      background: var(--hover-bg);
      border: none;
      border-radius: 10px;
      padding: 14px 16px;
      font-size: 14px;
      font-family: var(--font-sans);
      color: var(--text-1);
      text-align: center;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: background var(--duration-fast) var(--ease-out);
    }
    .budget-scope-opt:active {
      background: var(--blue);
      color: #fff;
    }
    .budget-scope-cancel {
      background: transparent;
      border: none;
      padding: 12px 16px;
      font-size: 14px;
      font-family: var(--font-sans);
      color: var(--text-3);
      text-align: center;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }
    /* Overview cards */
    .budget-ov-card {
      background: var(--card-bg-solid);
      border-radius: 14px;
      padding: 16px;
      box-shadow:
        var(--shadow-md);
    }
    [data-theme="light"] .budget-ov-card {
      box-shadow: var(--shadow-sm), 0 2px 8px rgba(0,0,0,0.04);
    }
    .budget-ov-card .progress-bar { margin-bottom: 0; }
    .budget-ov-items-toggle {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 0 2px;
      font-size: 12px;
      color: var(--text-3);
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }
    .budget-ov-items-toggle svg {
      transition: transform var(--duration-normal) ease;
    }
    .budget-ov-items-toggle svg.rotated {
      transform: rotate(180deg);
    }
    .budget-ov-item {
      display: flex;
      align-items: center;
      padding: 8px 0;
      border-bottom: 1px solid rgba(255,255,255,0.03);
    }
    .budget-ov-item:last-child { border-bottom: none; }
    .budget-ov-item-info {
      flex: 1;
      min-width: 0;
    }
    .budget-ov-item-name {
      font-size: 14px;
      color: var(--text-1);
    }
    .budget-ov-item-parent {
      font-size: 10px;
      color: var(--text-3);
      margin-left: 6px;
    }
    .budget-ov-item-right {
      text-align: right;
      flex-shrink: 0;
    }
    .budget-ov-item-amount {
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--text-2);
    }
    .budget-ov-item-pct {
      font-size: 9px;
      color: var(--text-3);
      margin-left: 4px;
    }
    /* Remaining allocation banner */
    .budget-remaining {
      padding: 16px 16px;
      margin-bottom: 16px;
      border-radius: 14px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .budget-remaining.positive {
      background: rgba(48,209,88,0.08);
      border: 1px solid rgba(48,209,88,0.15);
    }
    .budget-remaining.negative {
      background: rgba(255,69,58,0.08);
      border: 1px solid rgba(255,69,58,0.15);
    }
    .budget-remaining.zero {
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.06);
    }
    .budget-remaining-label {
      font-size: 12px;
      font-weight: 400;
    }
    .budget-remaining-amount {
      font-family: var(--font-mono);
      font-size: 16px;
      font-weight: 400;
    }
    /* Budget filters layout */
    .budget-filters {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    /* Sticky remaining bar inside filter area */
    .budget-remaining-sticky {
      width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 12px;
      border-radius: 10px;
      font-size: 12px;
      box-sizing: border-box;
      transition: all var(--duration-normal) ease;
    }
    .budget-remaining-sticky:empty {
      display: none;
    }
    .budget-remaining-sticky.positive {
      background: rgba(48,209,88,0.1);
      border: 1px solid rgba(48,209,88,0.15);
    }
    .budget-remaining-sticky.negative {
      background: rgba(255,69,58,0.1);
      border: 1px solid rgba(255,69,58,0.15);
    }
    .budget-remaining-sticky.zero {
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.06);
    }
    [data-theme="light"] .budget-remaining-sticky.zero {
      background: rgba(0,0,0,0.03);
      border-color: rgba(0,0,0,0.06);
    }
    .budget-remaining-sticky .budget-remaining-label {
      font-size: 11px;
    }
    .budget-remaining-sticky .budget-remaining-amount {
      font-size: 13px;
    }
    /* Add/remove row buttons */
    .budget-row-delete {
      width: 24px;
      height: 24px;
      border-radius: 6px;
      border: none;
      background: rgba(255,69,58,0.1);
      color: var(--red);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      flex-shrink: 0;
      -webkit-tap-highlight-color: transparent;
    }
    .budget-row-delete:active { opacity: 0.6; }

    /* Inline add row */
    .budget-add-inline {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
      margin-top: 4px;
      border-top: 1px solid var(--divider);
    }
    .budget-add-input {
      flex: 1;
      min-width: 0;
      background: transparent;
      border: none;
      outline: none;
      font-size: 14px;
      color: var(--text-1);
      font-family: var(--font-sans);
      padding: 6px 0;
    }
    .budget-add-input::placeholder { color: var(--text-3); opacity: 0.5; }
    .budget-add-cat {
      flex-shrink: 0;
      width: 100px;
      background: var(--hover-bg);
      border: 1px solid var(--divider);
      border-radius: 6px;
      color: var(--text-2);
      font-size: 12px;
      padding: 4px 6px;
      font-family: var(--font-sans);
      -webkit-appearance: none;
      appearance: none;
      cursor: pointer;
    }
    .budget-add-btn {
      flex-shrink: 0;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: var(--hover-bg);
      border: 1px solid var(--divider);
      color: var(--text-2);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: background var(--duration-fast) var(--ease-out);
    }
    .budget-add-btn:active { background: var(--emerald); color: #fff; }

    .budget-fab {
      position: fixed;
      bottom: 90px;
      right: 20px;
      width: 48px;
      height: 48px;
      border-radius: 50%;
      background: var(--emerald);
      color: #fff;
      border: none;
      font-size: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      box-shadow: var(--shadow-sm);
      z-index: 100;
      -webkit-tap-highlight-color: transparent;
      transition: transform var(--duration-normal) var(--ease-out), opacity var(--duration-normal);
    }
    .budget-fab:active { transform: scale(0.9); }
    @media (max-width: 767px) {
      .budget-fab { bottom: 120px; }
    }

    /* ══════════════════════════════════════
       AUDIT FIXES — Accessibility & UX
       ══════════════════════════════════════ */

    /* 1. Respect reduced motion preferences (WCAG 2.1) */
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        animation-fill-mode: forwards !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
      }
      /* Elements that animate from opacity:0 need to be visible */
      .brand-mark svg,
      .brand-mark svg path,
      .advisor-result-card,
      .holding-card {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
      }
      ::view-transition-old(root),
      ::view-transition-new(root) {
        animation: none !important;
      }
    }

    /* 2. Focus-visible styles for keyboard navigation */
    *:focus-visible {
      outline: 2px solid var(--emerald);
      outline-offset: 2px;
      border-radius: 6px;
    }
    .tab:focus-visible,
    .pill-track-btn:focus-visible,
    .chart-seg-btn:focus-visible,
    .holdings-sort-btn:focus-visible,
    .nav-item:focus-visible {
      outline-offset: -2px;
      border-radius: 10px;
    }
    /* Remove default outline for mouse/touch users */
    *:focus:not(:focus-visible) {
      outline: none;
    }

    /* 3. Touch interaction improvements */
    button, a, select, input, .tab, .txn-list-row, .holding-card, .pill-track-btn {
      touch-action: manipulation;
    }

    /* ══════════════════════════════════════════════════════════
       HOME PAGE
       ══════════════════════════════════════════════════════════ */
    #homePage {
      min-height: 100dvh;
      padding-bottom: 100px;
    }
    .home-header {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 100;
    }
    .home-header-main {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: clamp(10px, 3vw, 16px) var(--content-px) 12px;
      padding-top: calc(clamp(10px, 3vw, 16px) + env(safe-area-inset-top, 0px));
      transition: opacity 0.2s ease;
    }
    .home-header-sticky {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 6px var(--content-px) 12px;
      padding-top: calc(6px + env(safe-area-inset-top, 0px));
      opacity: 0;
      pointer-events: none;
      transform: translateY(-8px);
      transition: opacity 0.5s ease, transform 0.5s var(--ease-out);
      background: var(--bg);
      overflow: hidden;
      font-size: 14px;
      font-weight: 400;
      color: var(--text-1);
      letter-spacing: var(--ls-tight);
      border-bottom-left-radius: 16px;
      border-bottom-right-radius: 16px;
    }
    .home-header-sticky::before {
      content: '';
      position: absolute;
      inset: 0;
      background:
        radial-gradient(circle at 50% -10%, #7c3aed 0%, transparent 40%),
        radial-gradient(circle at 50% 0%, #2563eb 0%, transparent 55%),
        radial-gradient(circle at 20% 50%, #4f46e5 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, #0284c7 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, #1e40af 0%, transparent 50%);
      opacity: 0.55;
      pointer-events: none;
      z-index: 1;
      filter: blur(4px);
    }
    .home-header-sticky::after {
      display: none;
      pointer-events: none;
      z-index: 2;
    }
    .home-header-sticky.visible {
      opacity: 1;
      transform: translateY(0);
      pointer-events: auto;
    }
    [data-theme="light"] .home-header-sticky {
      background: #0b0e1a;
      color: rgba(255,255,255,0.95);
    }
    [data-theme="light"] .home-header-sticky .home-sticky-name {
      color: rgba(255,255,255,0.95);
    }
    [data-theme="light"] .home-header-sticky::before {
      background:
        radial-gradient(circle at 50% -10%, #7c3aed 0%, transparent 40%),
        radial-gradient(circle at 50% 0%, #2563eb 0%, transparent 55%),
        radial-gradient(circle at 20% 50%, #4f46e5 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, #0284c7 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, #1e40af 0%, transparent 50%);
      opacity: 0.55;
    }
    [data-theme="light"] .home-header-sticky::after {
      background: linear-gradient(to bottom, transparent, var(--bg));
    }
    .home-logo-sm {
      width: 24px;
      height: 24px;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .home-sticky-name {
      font-size: 14px;
      font-weight: 400;
      color: var(--text-1);
      letter-spacing: var(--ls-tight);
    }
    @media (max-width: 767px) {
      .home-header-sticky {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
      }
    }
    .home-header-spacer {
      height: calc(60px + env(safe-area-inset-top, 0px));
    }
    .home-header-left {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .home-logo {
      width: 40px;
      height: 40px;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .home-greeting {
      display: flex;
      flex-direction: column;
      gap: 0;
    }
    .home-greeting-text {
      font-size: 12px;
      color: var(--text-3);
      letter-spacing: var(--ls-wide);
      text-transform: uppercase;
      font-weight: 400;
      line-height: var(--lh-none);
    }
    .home-greeting-name {
      font-size: 20px;
      font-weight: 400;
      color: var(--text-1);
      letter-spacing: var(--ls-tight);
      line-height: var(--lh-tight);
    }
    .home-header-right {
      display: flex;
      align-items: center;
    }
    .home-settings-btn {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      border: none;
      background: var(--glass-bg);
      color: var(--text-2);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: background var(--duration-fast) ease;
    }
    .home-settings-btn:hover {
      background: var(--hover-bg);
    }
    .home-settings-btn svg {
      width: 20px;
      height: 20px;
    }
    .home-content {
      padding: 8px var(--content-px) 0;
    }

    /* Net Worth */
    .home-net-worth {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      text-align: left;
      padding: 20px 0 24px;
    }
    .home-net-worth-label {
      font-size: 13px;
      font-weight: 400;
      color: var(--text-2);
      letter-spacing: var(--ls-wide);
      text-transform: uppercase;
      line-height: var(--lh-none);
      margin-bottom: 6px;
    }
    .home-net-worth-value {
      font-size: 42px;
      font-weight: 400;
      color: var(--text-1);
      letter-spacing: var(--ls-tight);
      line-height: var(--lh-tight);
    }
    .home-net-worth-change {
      font-size: 13px;
      font-weight: 400;
      color: var(--emerald);
      font-family: var(--font-mono);
      margin-top: 4px;
    }
    .home-net-worth-change.negative {
      color: var(--red);
    }

    /* Quick Actions */
    .home-quick-actions {
      display: flex;
      gap: 12px;
      margin-bottom: 24px;
    }
    .home-quick-btn {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      padding: 8px 4px;
      background: none;
      border: none;
      border-radius: 0;
      cursor: pointer;
      transition: transform var(--duration-fast) var(--ease-spring);
      -webkit-tap-highlight-color: transparent;
    }
    .home-quick-btn:active {
      transform: scale(0.92);
    }
    .home-quick-btn:hover {
      background: none;
    }
    .home-quick-icon {
      width: 52px;
      height: 52px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--card-bg-solid);
      border: 1px solid var(--glass-border);
      border-radius: 16px;
      transition: background var(--duration-fast) ease;
    }
    .home-quick-btn:hover .home-quick-icon {
      background: var(--card-bg-solid-hover);
    }
    .home-quick-icon svg {
      width: 22px;
      height: 22px;
      stroke: var(--text-2);
    }
    .home-quick-label {
      font-size: 11px;
      font-weight: 400;
      color: var(--text-2);
      letter-spacing: var(--ls-slight);
    }

    /* Glance Cards */
    .home-glance-cards {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-bottom: 24px;
    }
    .home-glance-card {
      background: var(--card-bg-solid);
      border: 1px solid var(--glass-border);
      border-radius: 16px;
      padding: 16px;
      cursor: pointer;
      transition: transform var(--duration-fast) var(--ease-out),
                  box-shadow var(--duration-fast) ease;
      box-shadow: var(--shadow-sm);
      position: relative;
      overflow: hidden;
    }
    .home-glance-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      border-radius: 16px 16px 0 0;
      opacity: 0.7;
    }
    .home-glance-portfolio::before {
      background: linear-gradient(90deg, var(--emerald), var(--blue));
    }
    .home-glance-budget::before {
      background: linear-gradient(90deg, var(--amber), var(--red));
    }
    .home-glance-card:active {
      transform: scale(0.97);
    }
    .home-glance-icon {
      width: 32px;
      height: 32px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 12px;
      background: var(--surface-subtle);
    }
    .home-glance-icon svg {
      width: 18px;
      height: 18px;
      color: var(--text-2);
    }
    .home-glance-label {
      font-size: 10px;
      color: var(--text-3);
      text-transform: uppercase;
      letter-spacing: var(--ls-wide);
      font-weight: 400;
      margin-bottom: 4px;
    }
    .home-glance-value {
      font-size: 22px;
      font-weight: 400;
      color: var(--text-1);
      letter-spacing: var(--ls-tight);
      line-height: var(--lh-tight);
      font-family: var(--font-mono);
    }
    .home-glance-sub {
      font-size: 12px;
      color: var(--text-3);
      margin-top: 4px;
      font-family: var(--font-mono);
    }

    /* Recent Activity */
    .home-section {
      margin-bottom: 20px;
    }
    .home-section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
    }
    .home-section-title {
      font-size: 14px;
      font-weight: 400;
      color: var(--text-1);
      letter-spacing: var(--ls-slight);
    }
    .home-section-link {
      font-size: 12px;
      color: var(--blue);
      background: none;
      border: none;
      cursor: pointer;
      font-weight: 400;
      padding: 4px 8px;
      border-radius: 6px;
      transition: background var(--duration-fast) ease;
    }
    .home-section-link:hover {
      background: var(--surface-subtle);
    }
    .home-recent-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
      background: none;
      border-radius: 0;
      overflow: visible;
      box-shadow: none;
    }
    .home-recent-row {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 16px;
      transition: background var(--duration-fast) ease;
      background: var(--card-bg-solid);
      border-radius: 16px;
      border: 1px solid var(--glass-border);
    }
    .home-recent-row:not(:last-child) {
      border-bottom: none;
    }
    .home-recent-icon {
      width: 40px;
      height: 40px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .home-recent-icon svg {
      width: 20px;
      height: 20px;
      stroke: currentColor;
      stroke-width: 1.5;
      stroke-linecap: round;
      stroke-linejoin: round;
      fill: none;
    }
    .home-recent-left {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
      flex: 1;
    }
    .home-recent-cat {
      font-size: 14px;
      font-weight: 400;
      color: var(--text-1);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .home-recent-date {
      font-size: 10px;
      color: var(--text-3);
      font-family: var(--font-mono);
    }
    .home-recent-amt {
      font-size: 14px;
      font-weight: 400;
      font-family: var(--font-mono);
      white-space: nowrap;
      flex-shrink: 0;
    }
    .home-recent-amt.income { color: var(--emerald); }
    .home-recent-amt.expense { color: var(--text-1); }
    .home-empty-state {
      padding: 24px;
      text-align: center;
      font-size: 12px;
      color: var(--text-3);
    }

    /* Hub Button (bottom of Home page) */
    /* ── Shared bottom bar wrapper (tabs + hub button) ── */
    .bottom-bar-wrap {
      position: fixed;
      bottom: max(12px, env(safe-area-inset-bottom));
      left: 0;
      right: 0;
      z-index: 90;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      pointer-events: none;
    }
    .bottom-bar-wrap > * {
      pointer-events: auto;
    }
    .home-hub-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 64px;
      height: 64px;
      border-radius: 50%;
      border: none;
      background: linear-gradient(135deg, #3b82f6, #6366f1, #0ea5e9);
      background-size: 200% 200%;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      color: #ffffff;
      cursor: pointer;
      box-shadow: none;
      transition: transform var(--duration-fast) var(--ease-spring),
                  box-shadow var(--duration-fast) ease;
      position: relative;
      overflow: hidden;
    }
    .home-hub-btn::after {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 50%;
      background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25) 0%, transparent 60%);
      pointer-events: none;
    }
    .home-hub-btn:active {
      transform: scale(0.9);
    }
    .home-hub-btn .hub-ripple {
      position: absolute;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.15) 40%, transparent 70%);
      transform: translate(-50%, -50%) scale(0);
      pointer-events: none;
      animation: hubRipple 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    @keyframes hubRipple {
      0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
      }
      100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
      }
    }
    .home-hub-btn svg {
      width: 22px;
      height: 22px;
    }
    .home-hub-btn .hub-icon-close {
      display: none;
    }
    .home-hub-btn.hub-active .hub-icon-open {
      display: none;
    }
    .home-hub-btn.hub-active .hub-icon-close {
      display: block;
      animation: hubBtnIn 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
    .home-hub-btn.hub-btn-exit .hub-icon-close {
      animation: hubBtnOut 0.4s cubic-bezier(0.4, 0, 1, 1) both;
    }
    @keyframes hubBtnIn {
      from {
        opacity: 0;
        transform: translateY(20px) scale(0.5) rotate(-90deg);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
      }
    }
    @keyframes hubBtnOut {
      from {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
      }
      to {
        opacity: 0;
        transform: translateY(20px) scale(0.5) rotate(90deg);
      }
    }
    .home-hub-btn.hub-active {
      transform: rotate(0deg);
    }
    [data-theme="light"] .home-hub-btn {
      background: linear-gradient(135deg, #3b82f6, #6366f1, #0ea5e9);
      border: none;
      color: #ffffff;
      box-shadow: 0 4px 16px rgba(59,130,246,0.25);
    }

    /* ══════════════════════════════════════════════════════════
       HUB PAGE
       ══════════════════════════════════════════════════════════ */
    #hubPage {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 300;
      background: var(--bg);
      overflow-y: auto;
      will-change: transform;
    }
    .bottom-bar-wrap:has(.hub-active) {
      z-index: 301;
    }
    .hub-header {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: clamp(10px, 3vw, 16px) var(--content-px) 24px;
      padding-top: calc(clamp(10px, 3vw, 16px) + env(safe-area-inset-top, 0px));
      position: relative;
    }
    .hub-title {
      font-size: 28px;
      font-weight: 400;
      color: var(--text-1);
      letter-spacing: var(--ls-tight);
    }
    .hub-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
      padding: 0 var(--content-px);
      max-width: 100%;
      box-sizing: border-box;
    }
    .hub-tile {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      justify-content: space-between;
      gap: 8px;
      padding: 14px;
      aspect-ratio: 1;
      background: rgba(255,255,255,0.03);
      border-radius: 20px;
      border: 1px solid rgba(255,255,255,0.06);
      cursor: pointer;
      transition: transform var(--duration-fast) var(--ease-out),
                  background var(--duration-fast) ease;
      text-align: left;
      overflow: visible;
    }
    [data-theme="light"] .hub-tile {
      background: rgba(255,255,255,0.8);
      border-color: rgba(15,23,42,0.06);
      box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    }
    .hub-tile:active {
      transform: scale(0.95);
    }
    .hub-tile:hover {
      background: rgba(255,255,255,0.06);
    }
    [data-theme="light"] .hub-tile:hover {
      background: rgba(59,130,246,0.04);
    }
    .hub-tile-icon {
      width: 28px;
      height: 28px;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      flex-shrink: 0;
      color: var(--text-1);
    }
    .hub-tile-icon svg {
      width: 24px;
      height: 24px;
      stroke-width: 1.5;
    }
    .hub-tile.hub-tile-active {
      border-color: var(--blue);
      background: rgba(74,124,255,0.08);
    }
    [data-theme="light"] .hub-tile.hub-tile-active {
      border-color: var(--blue);
      background: rgba(59,130,246,0.06);
      box-shadow: 0 0 0 1px rgba(59,130,246,0.15), 0 2px 8px rgba(59,130,246,0.08);
    }
    .hub-tile-label {
      font-size: 9px;
      font-weight: 400;
      color: var(--text-1);
      display: block;
      line-height: var(--lh-tight);
      white-space: nowrap;
    }

    /* ── Hub Settings Button ── */
    .hub-settings-btn {
      margin-left: auto;
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      border: none;
      background: none;
      color: var(--text-2);
      cursor: pointer;
      border-radius: 50%;
      transition: color var(--duration-fast) ease, background var(--duration-fast) ease;
      -webkit-tap-highlight-color: transparent;
    }
    .hub-settings-btn:active {
      background: rgba(255,255,255,0.06);
    }
    [data-theme="light"] .hub-settings-btn:active {
      background: rgba(0,0,0,0.04);
    }
    .hub-settings-btn svg {
      width: 20px;
      height: 20px;
    }

    /* ── Hub Settings Page ── */
    .hub-settings {
      padding: 0 var(--content-px);
    }
    .hub-settings-header {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 8px 0 20px;
    }
    .hub-settings-back {
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      border: none;
      background: none;
      color: var(--text-1);
      cursor: pointer;
      border-radius: 50%;
      transition: background var(--duration-fast) ease;
      -webkit-tap-highlight-color: transparent;
      margin-left: -8px;
    }
    .hub-settings-back:active {
      background: rgba(255,255,255,0.06);
    }
    [data-theme="light"] .hub-settings-back:active {
      background: rgba(0,0,0,0.04);
    }
    .hub-settings-back svg {
      width: 22px;
      height: 22px;
    }
    .hub-settings-title {
      font-size: 20px;
      font-weight: 400;
      color: var(--text-1);
      letter-spacing: var(--ls-tight);
    }
    .hub-settings-list {
      display: flex;
      flex-direction: column;
      gap: 4px;
      background: var(--glass-bg);
      border: 1px solid var(--glass-border);
      border-radius: 14px;
      padding: 4px;
      overflow: hidden;
    }
    .hub-settings-item {
      display: flex;
      align-items: center;
      gap: 12px;
      width: 100%;
      padding: 14px 12px;
      border: none;
      border-radius: 10px;
      background: transparent;
      color: var(--text-1);
      font-family: var(--font-sans);
      font-size: 16px;
      font-weight: 400;
      cursor: pointer;
      transition: background var(--duration-fast) ease;
      -webkit-tap-highlight-color: transparent;
    }
    .hub-settings-item:active {
      background: rgba(255,255,255,0.06);
    }
    [data-theme="light"] .hub-settings-item:active {
      background: rgba(0,0,0,0.04);
    }
    .hub-settings-item svg {
      width: 20px;
      height: 20px;
      flex-shrink: 0;
      color: var(--text-2);
    }
    .hub-settings-label {
      flex: 1;
      text-align: left;
    }
    .hub-settings-value {
      font-size: 14px;
      font-weight: 400;
      color: var(--text-3);
      font-family: var(--font-mono);
    }
    .hub-settings-danger {
      color: var(--red);
    }
    .hub-settings-danger svg {
      color: var(--red);
    }

    /* Hub button in tab bars */
    .tab-hub-btn {
      position: relative;
    }
    .tab-hub-btn .tab-icon {
      color: var(--text-3);
      opacity: 0.6;
    }
    .tab-hub-btn .tab-label {
      color: var(--text-3);
      opacity: 0.6;
    }
    .tab-hub-btn:hover .tab-icon,
    .tab-hub-btn:hover .tab-label {
      opacity: 1;
    }

    /* ── Net Worth Filters ── */
    .nw-filters {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    /* ── Net Worth Page ── */
    .nw-content {
      padding: 0 var(--content-px);
    }
    .nw-hero {
      text-align: center;
      padding: 12px 0 24px;
    }
    .nw-hero-label {
      font-size: 12px;
      font-weight: 400;
      color: var(--text-3);
      letter-spacing: var(--ls-wide);
      text-transform: uppercase;
      line-height: var(--lh-none);
      margin-bottom: 4px;
    }
    .nw-hero-value {
      font-size: 36px;
      font-weight: 400;
      color: var(--text-1);
      letter-spacing: var(--ls-tight);
      line-height: var(--lh-tight);
    }
    .nw-summary-row {
      display: flex;
      gap: 12px;
      margin-bottom: 24px;
    }
    .nw-summary-card {
      flex: 1;
      background: var(--glass-bg);
      border-radius: 12px;
      padding: 16px;
      text-align: center;
    }
    .nw-summary-card-label {
      font-size: 10px;
      font-weight: 400;
      color: var(--text-3);
      letter-spacing: var(--ls-wide);
      text-transform: uppercase;
      margin-bottom: 4px;
    }
    .nw-summary-card-value {
      font-size: 20px;
      font-weight: 400;
      letter-spacing: var(--ls-tight);
      line-height: var(--lh-tight);
    }
    .nw-section {
      margin-bottom: 20px;
    }
    .nw-section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
    }
    .nw-section-title {
      font-size: 14px;
      font-weight: 400;
      color: var(--text-1);
      letter-spacing: var(--ls-slight);
    }
    .nw-section-total {
      font-size: 14px;
      font-weight: 400;
      letter-spacing: var(--ls-tight);
    }
    .nw-cat-group {
      margin-bottom: 16px;
    }
    .nw-cat-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 4px;
      margin-bottom: 8px;
    }
    .nw-cat-name {
      font-size: 12px;
      font-weight: 400;
      color: var(--text-3);
      letter-spacing: var(--ls-slight);
      text-transform: uppercase;
    }
    .nw-cat-total {
      font-size: 12px;
      font-weight: 400;
      letter-spacing: var(--ls-tight);
    }
    .nw-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 16px;
      background: var(--glass-bg);
      border-radius: 10px;
      margin-bottom: 6px;
    }
    .nw-item-left {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .nw-item-name {
      font-size: 14px;
      font-weight: 400;
      color: var(--text-1);
    }
    .nw-item-meta {
      font-size: 10px;
      color: var(--text-3);
      letter-spacing: var(--ls-slight);
    }
    .nw-item-value {
      font-size: 14px;
      font-weight: 400;
      font-family: var(--font-mono);
      letter-spacing: var(--ls-tight);
    }
    .nw-empty {
      text-align: center;
      padding: 40px 0;
      color: var(--text-3);
      font-size: 14px;
    }
    /* Planning tab */
    .nw-plan-section {
      margin-bottom: 24px;
    }
    .nw-plan-header {
      display: flex;
      align-items: center;
      padding: 0 var(--content-px) 10px;
    }
    .nw-plan-title {
      font-size: 16px;
      font-weight: 600;
      color: var(--text-1);
      letter-spacing: var(--ls-tight);
    }
    .nw-plan-cards {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    /* nw-update-bar removed — projection is automatic */
    /* Per-category card */
    .nw-plan-card {
      background: var(--card-bg-solid);
      border-radius: 14px;
      overflow: hidden;
      box-shadow: var(--shadow-md);
    }
    [data-theme="light"] .nw-plan-card {
      box-shadow: var(--shadow-sm);
    }
    .nw-plan-card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 16px 0;
    }
    .nw-plan-card-name {
      font-size: 11px;
      font-weight: 600;
      letter-spacing: var(--ls-wide);
      text-transform: uppercase;
      color: var(--text-2);
    }
    .nw-plan-card-total {
      font-size: 11px;
      font-family: var(--font-mono);
      color: var(--text-2);
      font-weight: 500;
    }
    /* Item row inside card */
    .nw-plan-row {
      display: flex;
      align-items: center;
      padding: 14px 16px;
      gap: 12px;
    }
    .nw-plan-row + .nw-plan-row {
      border-top: 1px solid var(--divider);
    }
    .nw-plan-row-info {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .nw-plan-row-name {
      font-size: 14px;
      font-weight: 500;
      color: var(--text-1);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .nw-plan-row-flow {
      font-size: 10px;
      font-family: var(--font-mono);
      letter-spacing: var(--ls-slight);
    }
    .nw-plan-input {
      width: 96px;
      padding: 8px 12px;
      background: var(--hover-bg);
      border: none;
      border-radius: 8px;
      color: var(--text-1);
      font-size: 14px;
      font-weight: 500;
      font-family: var(--font-mono);
      text-align: right;
      outline: none;
      -webkit-appearance: none;
      -moz-appearance: textfield;
      box-sizing: border-box;
      flex-shrink: 0;
      transition: background var(--duration-fast) var(--ease-out),
                  box-shadow var(--duration-fast) var(--ease-out);
    }
    .nw-plan-input::placeholder {
      color: var(--text-3);
      opacity: 0.6;
      font-weight: 400;
    }
    .nw-plan-input::-webkit-outer-spin-button,
    .nw-plan-input::-webkit-inner-spin-button { -webkit-appearance: none; }
    .nw-plan-input:focus {
      background: rgba(10,132,255,0.08);
      box-shadow: inset 0 0 0 1.5px rgba(10,132,255,0.4);
    }
    [data-theme="light"] .nw-plan-input {
      background: rgba(0,0,0,0.03);
    }
    [data-theme="light"] .nw-plan-input:focus {
      background: rgba(10,132,255,0.06);
      box-shadow: inset 0 0 0 1.5px rgba(10,132,255,0.3);
    }
    .nw-plan-input.nw-input-saved {
      box-shadow: inset 0 0 0 1.5px var(--emerald);
      background: rgba(52, 199, 89, 0.08);
    }
    /* Delete button */
    .nw-plan-delete {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      border: none;
      background: transparent;
      color: var(--text-3);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      opacity: 0.3;
      flex-shrink: 0;
      -webkit-tap-highlight-color: transparent;
      transition: opacity var(--duration-fast) var(--ease-out),
                  color var(--duration-fast) var(--ease-out),
                  background var(--duration-fast) var(--ease-out);
    }
    .nw-plan-delete:active {
      opacity: 1;
      color: #fff;
      background: var(--red);
    }
    /* Inline add row inside card */
    .nw-plan-add-inline {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 10px 12px 10px 16px;
    }
    .nw-plan-input::-webkit-inner-spin-button,
    .nw-plan-input::-webkit-outer-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }

    /* ── Accounts Tab ── */
    .acct-hero {
      text-align: center;
      padding: 24px 0 20px;
    }
    .acct-hero-label {
      font-size: 12px;
      color: var(--text-3);
      letter-spacing: var(--ls-wide);
      text-transform: uppercase;
      margin-bottom: 4px;
    }
    .acct-hero-value {
      font-size: 28px;
      font-weight: 400;
      font-family: var(--font-mono);
      color: var(--text-1);
      letter-spacing: var(--ls-tight);
      line-height: var(--lh-none);
    }
    .acct-group {
      background: var(--card-bg-solid);
      border-radius: 14px;
      overflow: hidden;
      margin-bottom: 12px;
    }
    .acct-group-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 16px;
      border-bottom: 1px solid var(--divider);
    }
    .acct-group-name {
      font-size: 12px;
      font-weight: 400;
      color: var(--text-2);
      letter-spacing: var(--ls-wide);
      text-transform: uppercase;
    }
    .acct-group-total {
      font-size: 14px;
      font-weight: 400;
      font-family: var(--font-mono);
      color: var(--text-1);
      letter-spacing: var(--ls-tight);
    }
    .acct-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 16px;
      border-bottom: 1px solid var(--divider);
    }
    .acct-item:last-child {
      border-bottom: none;
    }
    .acct-item-name {
      font-size: 14px;
      font-weight: 400;
      color: var(--text-1);
    }
    .acct-item-balance {
      font-size: 14px;
      font-weight: 400;
      font-family: var(--font-mono);
      color: var(--text-1);
      letter-spacing: var(--ls-tight);
      flex-shrink: 0;
      margin-left: 12px;
    }

    /* Page transition */
    .page-enter {
      animation: pageEnter 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
    @keyframes pageEnter {
      from {
        opacity: 0;
        transform: translateY(40px) scale(0.98);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    .hub-enter {
      animation: hubSlideIn 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
    @keyframes hubSlideIn {
      from {
        transform: translateY(100%);
      }
      to {
        transform: translateY(0);
      }
    }
    /* Staggered tile entrance */
    .hub-enter .hub-tile {
      opacity: 0;
      transform: translateY(40px) scale(0.92);
      animation: hubTileIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
    .hub-enter .hub-tile:nth-child(1) { animation-delay: 0.20s; }
    .hub-enter .hub-tile:nth-child(2) { animation-delay: 0.26s; }
    .hub-enter .hub-tile:nth-child(3) { animation-delay: 0.32s; }
    .hub-enter .hub-tile:nth-child(4) { animation-delay: 0.38s; }
    .hub-enter .hub-tile:nth-child(5) { animation-delay: 0.44s; }
    .hub-enter .hub-tile:nth-child(6) { animation-delay: 0.50s; }
    .hub-enter .hub-tile:nth-child(7) { animation-delay: 0.56s; }
    .hub-enter .hub-tile:nth-child(8) { animation-delay: 0.62s; }
    .hub-enter .hub-tile:nth-child(9) { animation-delay: 0.68s; }
    @keyframes hubTileIn {
      from {
        opacity: 0;
        transform: translateY(40px) scale(0.92);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }
    .hub-exit {
      animation: hubSlideOut 0.4s cubic-bezier(0.4, 0, 1, 1) both;
    }
    @keyframes hubSlideOut {
      from {
        transform: translateY(0);
      }
      to {
        transform: translateY(100%);
      }
    }

    /* Remove page-switcher styles since header titles are no longer clickable */
    .page-switcher-chevron { display: none; }

/* ── Lean Open Banking ─────────────────────────────────────────────── */

/* Sync status indicator */
.lean-sync-indicator {
  padding: 8px var(--content-px);
  font-size: 12px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  letter-spacing: var(--ls-slight);
}

.lean-sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.lean-sync-dot.syncing {
  background: var(--amber);
  animation: lean-pulse 1.2s ease-in-out infinite;
}

.lean-sync-dot.done {
  background: var(--emerald);
}

.lean-sync-dot.error {
  background: var(--red);
}

@keyframes lean-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Bank connections manager */
.lean-connections-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.lean-connection-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--glass-bg);
  border-radius: 10px;
  border: 1px solid var(--divider);
}

.lean-connection-info {
  flex: 1;
  min-width: 0;
}

.lean-connection-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  line-height: var(--lh-tight);
}

.lean-connection-detail {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
}

.lean-connection-status {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-3);
  background: var(--hover-bg);
}

.lean-connection-status.active {
  color: var(--emerald);
  background: rgba(52, 199, 89, 0.1);
}

.lean-empty-state {
  text-align: center;
  padding: 24px 16px;
}

.lean-connect-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.lean-connect-btn:hover {
  opacity: 0.85;
}

.lean-sync-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--divider);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.lean-sync-btn:hover {
  background: var(--hover-bg);
  color: var(--text-1);
}


