/* iOS-style Ivy view. The original row ledger and non-Duo presentation remain available. */
.duo-finance-actions,.duo-finance-editor,.duo-finance-tabs,.duo-finance-handle,.duo-finance-launch-dot { display:none; }
/* Keep native input focus from scrolling the wider legacy workspace sideways. */
html:root.ivy-duo-mode:has(.routine-finance-panel.is-open:not(.rf-view-row)),
html:root.ivy-duo-mode:has(.routine-finance-panel.is-open:not(.rf-view-row)) body {overflow:clip!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) {
  --rf-paper:#f2f2f7;--rf-card:#fff;--rf-ink:#1c1c1e;--rf-muted:#777780;--rf-line:#e5e5ea;--rf-blue:#007aff;
  display:block!important; padding:24px 20px 82px!important; overflow-y:auto!important; overflow-x:hidden!important;
  background:var(--rf-paper)!important; color:var(--rf-ink)!important; border:0!important;box-shadow:none!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important; container-type:inline-size;
  font-family:-apple-system,BlinkMacSystemFont,system-ui,sans-serif!important; overscroll-behavior:contain;
}
html:root.ivy-duo-mode.dark-mode .routine-finance-panel:not(.rf-view-row) {--rf-paper:#000;--rf-card:#1c1c1e;--rf-ink:#f2f2f7;--rf-muted:#98989f;--rf-line:#38383a;--rf-blue:#0a84ff;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) :is(div,span,button,input,select,label) {font-family:inherit!important;font-style:normal!important;letter-spacing:normal!important;text-transform:none!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) :is(.routine-finance__header,.routine-finance__summary-row,.routine-finance__body,.routine-finance__left,.routine-finance__right) {position:static!important;inset:auto!important;width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;box-sizing:border-box!important;border:0!important;box-shadow:none!important;background:none!important;backdrop-filter:none!important;overflow:visible!important;transform:none!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__header {display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:18px!important;padding:0 0 20px!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__title {font-size:clamp(25px,5cqw,34px)!important;font-weight:750!important;color:var(--rf-ink)!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__month-nav {display:flex!important;justify-content:space-between!important;gap:8px!important;width:100%!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) :is(.routine-finance__nav-btn,.routine-finance__month-label) {background:var(--rf-card)!important;color:var(--rf-blue)!important;border:0!important;box-shadow:none!important;border-radius:12px!important;min-height:44px!important;height:auto!important;font-size:16px!important;font-weight:600!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__nav-btn {width:44px!important;min-width:44px!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__month-label {flex:1!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__summary-row {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:stretch!important;gap:1px!important;padding:0!important;background:var(--rf-line)!important;border-radius:20px!important;overflow:hidden!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__summary-card {display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:6px!important;min-width:0!important;width:auto!important;min-height:0!important;padding:18px!important;border:0!important;border-radius:0!important;background:var(--rf-card)!important;box-shadow:none!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__summary-row .routine-finance__summary-card {position:static!important;inset:auto!important;transform:none!important;opacity:1!important;pointer-events:auto!important;will-change:auto!important;transition:none!important;text-shadow:none!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__summary-card--remaining {grid-column:1/-1;grid-row:1;padding:24px 18px!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__summary-label {font-size:13px!important;font-weight:500!important;color:var(--rf-muted)!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__summary-amount {font-size:clamp(18px,4cqw,24px)!important;font-weight:650!important;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;color:var(--rf-ink)!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) #rfBalance {font-size:clamp(30px,8cqw,46px)!important;letter-spacing:-1.5px!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) #rfTotalIncome {color:#248950!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) :is(.routine-finance__summary-divider,.routine-finance__mini-form,.rf-row-view)::before {display:none!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) :is(.routine-finance__summary-divider,.routine-finance__mini-form,.rf-row-view) {display:none!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .duo-finance-actions {display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0 24px;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .duo-finance-actions button {background:var(--rf-blue)!important;color:#fff!important;border:0!important;border-radius:14px!important;padding:14px 8px!important;font-size:15px!important;font-weight:600!important;min-height:48px!important;box-shadow:none!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .duo-finance-actions button:first-child {background:var(--rf-card)!important;color:var(--rf-blue)!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .duo-finance-tabs {display:flex;gap:3px;padding:3px;background:var(--rf-line);border-radius:11px;margin:0 0 22px;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .duo-finance-tabs button {flex:1;min-width:0;min-height:38px;border:0!important;border-radius:8px;background:transparent!important;color:var(--rf-muted)!important;font-size:13px!important;font-weight:600;box-shadow:none!important;transition:background-color 160ms,color 160ms!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .duo-finance-tabs button[aria-selected=true] {background:var(--rf-card)!important;color:var(--rf-ink)!important;box-shadow:0 1px 3px #0001!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) :is(.routine-finance__body,.routine-finance__right) {display:block!important;padding:0!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__left {padding:0!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row):not([data-finance-section=budgets]) .routine-finance__left,
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row)[data-finance-section=budgets] .routine-finance__right,
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row):not([data-finance-section=activity]) :is(.routine-finance__transactions-header,#rfTxList),
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row):not([data-finance-section=calendar]) :is(.routine-finance__calendar-header,#rfCalendar) {display:none!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row)[data-finance-section=budgets] .routine-finance__left {display:block!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__section-header {position:static!important;inset:auto!important;width:100%!important;transform:none!important;opacity:1!important;margin:0 0 12px!important;padding:0 4px!important;min-height:32px!important;box-sizing:border-box;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__section-label {font-size:19px!important;font-weight:700!important;color:var(--rf-ink)!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) :is(#rfTxList,#rfCategoryList,#rfCalendar) {display:block!important;position:static!important;transform:none!important;opacity:1!important;pointer-events:auto!important;max-height:none!important;height:auto!important;min-height:0!important;overflow:visible!important;padding:0!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__empty {padding:42px 22px!important;text-align:center!important;font-size:14px!important;line-height:1.6!important;color:var(--rf-muted)!important;background:var(--rf-card)!important;border-radius:18px;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) :is(.routine-finance__tx-item,.routine-finance__category-item,.routine-finance__week) {background:var(--rf-card)!important;border:0!important;border-radius:14px!important;box-shadow:none!important;padding:16px!important;margin:0 0 8px!important;color:var(--rf-ink)!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__week {height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;flex:none!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__cal-dot {background:var(--rf-line)!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__cal-dot.is-active {background:var(--rf-blue)!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__day-pnl {font-size:11px!important;color:var(--rf-ink)!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__tx-item {display:grid!important;grid-template-columns:minmax(0,1fr) auto 30px!important;gap:4px 8px!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__tx-dot {display:none!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__tx-desc {grid-column:1;grid-row:1;font-size:15px!important;color:var(--rf-ink)!important;overflow-wrap:anywhere;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__tx-cat {grid-column:1;grid-row:2;font-size:12px!important;color:var(--rf-muted)!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__tx-amount {grid-column:2;grid-row:1/3;align-self:center;font-size:14px!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__tx-delete {grid-column:3;grid-row:1/3;color:#ff453a!important;background:none!important;border:0!important;min-height:44px;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) :is(.routine-finance__category-name,.routine-finance__week-label,.routine-finance__day-num) {color:var(--rf-ink)!important;font-size:15px!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) :is(.routine-finance__week-meta,.routine-finance__week-range,.routine-finance__category-amounts,.routine-finance__day-weekday,.routine-finance__day-tx-count) {color:var(--rf-muted)!important;font-size:11px!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__category-row {flex-wrap:wrap;gap:8px;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__ghost-btn {color:var(--rf-blue)!important;background:transparent!important;border:0!important;min-height:44px;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) :is(.routine-finance__cat-budget-input,.routine-finance__day) {background:var(--rf-paper)!important;color:var(--rf-ink)!important;border:0!important;border-radius:10px!important;box-shadow:none!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__week-days {display:grid!important;grid-template-columns:repeat(auto-fit,minmax(85px,1fr))!important;grid-template-rows:none!important;grid-auto-rows:minmax(84px,auto)!important;height:auto!important;gap:6px!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__day {position:relative!important;inset:auto!important;transform:none!important;width:auto!important;min-width:0!important;height:auto!important;min-height:84px!important;padding:9px!important;box-sizing:border-box;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__day.is-selected {outline:0!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .duo-finance-editor {display:block;background:var(--rf-card);border-radius:18px;padding:18px;margin:0 0 20px;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-editor [hidden],html:root.ivy-duo-mode .routine-finance-panel .duo-finance-editor[hidden] {display:none!important;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-entry-title {font-size:18px;font-weight:650;display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-cancel {color:var(--rf-blue)!important;background:none!important;border:0!important;font-size:14px;min-height:44px;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-field {display:flex;flex-direction:column;gap:6px;margin-bottom:14px;font-size:12px;color:var(--rf-muted);}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-editor :is(input,select) {display:block!important;position:static!important;inset:auto!important;opacity:1!important;visibility:visible!important;transform:none!important;width:100%!important;min-width:0!important;height:46px!important;max-height:none!important;padding:10px 12px!important;box-sizing:border-box!important;border:0!important;border-radius:10px!important;background:var(--rf-paper)!important;color:var(--rf-ink)!important;-webkit-text-fill-color:var(--rf-ink)!important;font-size:16px!important;box-shadow:none!important;pointer-events:auto!important;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-editor .routine-finance__mini-add {display:block!important;width:100%!important;min-height:46px!important;height:auto!important;background:var(--rf-blue)!important;color:#fff!important;border:0!important;border-radius:12px!important;font-size:15px!important;}
html:root.ivy-duo-mode .duo-finance-handle:not([hidden]) {display:flex;position:fixed;z-index:12010;width:120px;height:44px;align-items:center;justify-content:center;background:none!important;border:0!important;box-shadow:none!important;touch-action:none;cursor:grab;}
.duo-finance-handle span {display:block;width:80px;height:5px;border-radius:10px;background:#aaaab888;box-shadow:inset 0 1px 0 #ffffff88;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-editor :is(#rfIncAmount,#rfExpAmount,#rfIncAdd,#rfExpAdd) {display:block!important;position:static!important;opacity:1!important;visibility:visible!important;pointer-events:auto!important;width:100%!important;height:46px!important;clip:auto!important;clip-path:none!important;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-editor :is(input,select,button) {transform:none!important;translate:none!important;scale:none!important;margin:0!important;max-width:100%!important;min-width:0!important;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-editor {position:static!important;inset:auto!important;transform:none!important;opacity:1!important;visibility:visible!important;width:auto!important;height:auto!important;overflow:visible!important;}
html:root.ivy-duo-mode .duo-finance-launch-dot.is-active {display:block;position:fixed;z-index:12009;width:20px;height:20px;background:#8e8e93;border-radius:50%;pointer-events:none;}
html:root.ivy-duo-mode .routine-finance-panel.duo-settings-revealing {transition:none!important;will-change:translate,scale;}
@media(prefers-reduced-motion:reduce) {html:root.ivy-duo-mode .routine-finance-panel * {animation:none!important;transition:none!important;}}

/* Separate destinations, with navigation outside the scrolling content. */
.duo-finance-screen {display:contents;}
.duo-finance-months {display:none;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) :is(.routine-finance__title,.routine-finance__month-nav) {display:none!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .duo-finance-months {display:block;min-width:0;}
.duo-finance-month-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 2px 16px;color:var(--rf-ink);font-size:21px;font-weight:650;}
.duo-finance-month-picker-label {position:relative;display:flex;align-items:center;min-height:44px;color:var(--rf-blue);font-size:13px;font-weight:500;cursor:pointer;}
.duo-finance-month-picker {position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;}
.duo-finance-month-picker-label:has(input:focus-visible) {outline:2px solid var(--rf-blue);outline-offset:4px;}
.duo-finance-month-strip {display:flex;gap:10px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scrollbar-width:none;padding:2px 2px 8px;}
.duo-finance-month-strip::-webkit-scrollbar {display:none;}
.duo-finance-month-strip {overflow-anchor:none;position:relative;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-month {display:flex;flex-direction:column;align-items:flex-start;gap:7px;flex:0 0 118px;min-height:102px;scroll-snap-align:center;border:1px solid var(--rf-line)!important;border-radius:20px!important;padding:14px!important;background:var(--rf-card)!important;color:var(--rf-ink)!important;box-shadow:none!important;transition:background-color 180ms,color 180ms!important;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-month[aria-pressed=true] {
  background:linear-gradient(145deg,#ffffffed 0%,#ffffff66 38%,#dceaff66 72%,#ffffffb8 100%)!important;
  color:var(--rf-ink)!important;border-color:#ffffffd9!important;
  box-shadow:inset 0 1px 1px #fff,inset 0 -1px 2px #8aa7c533,0 4px 12px #34496312!important;
  backdrop-filter:blur(12px) saturate(145%);-webkit-backdrop-filter:blur(12px) saturate(145%);
}
html:root.ivy-duo-mode.dark-mode .routine-finance-panel .duo-finance-month[aria-pressed=true] {
  background:linear-gradient(145deg,#ffffff29,#ffffff0d 40%,#8db9ec26 75%,#ffffff1a)!important;
  border-color:#ffffff3b!important;box-shadow:inset 0 1px 1px #ffffff40,inset 0 -1px 1px #ffffff12,0 4px 12px #0003!important;
}
html:root.ivy-duo-mode.perf-plus .routine-finance-panel .duo-finance-month[aria-pressed=true] {backdrop-filter:none;-webkit-backdrop-filter:none;}
.duo-finance-month-viewport {mask-image:linear-gradient(to right,transparent,#000 8%,#000 92%,transparent);-webkit-mask-image:linear-gradient(to right,transparent,#000 8%,#000 92%,transparent);}
.duo-finance-month-name {font-size:12px;font-weight:600;opacity:.75;}
.duo-finance-month strong {font-size:17px;font-weight:650;font-variant-numeric:tabular-nums;}
.duo-finance-month-caption {font-size:11px;opacity:.65;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) {display:flex!important;flex-direction:column!important;padding-bottom:48px!important;overflow:hidden!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__header {flex:none;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .duo-finance-screen {display:block;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:4px 0 20px;scrollbar-width:thin;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row):not([data-finance-section=overview]) .routine-finance__summary-row,
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row):is([data-finance-section=overview],[data-finance-section=add]) .routine-finance__body,
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row):not([data-finance-section=add]) :is(.duo-finance-actions,.duo-finance-editor) {display:none!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__summary-card {align-items:center!important;text-align:center;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__summary-card--remaining {padding:clamp(36px,10cqw,72px) 18px!important;gap:12px!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) #rfBalance {font-size:clamp(38px,10cqw,64px)!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .duo-finance-tabs {flex:none;display:flex;gap:0;margin:0;padding:10px 0 0;border-top:1px solid var(--rf-line);border-radius:0;background:var(--rf-paper);}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .duo-finance-tabs button {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:52px;padding:4px 0;font-size:10px!important;font-weight:500;background:transparent!important;box-shadow:none!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .duo-finance-tabs button[aria-selected=true] {color:var(--rf-blue)!important;background:transparent!important;box-shadow:none!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .duo-finance-tabs svg {width:23px;height:23px;flex:none;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .duo-finance-tabs button:focus-visible {outline:2px solid var(--rf-blue);outline-offset:-2px;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .duo-finance-actions {margin-top:0;}

/* Activity belongs to Overview; the full history is a nested destination. */
.duo-finance-activity-bar,.duo-finance-activity-filters,.duo-finance-no-matches {display:none;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row):not(.is-open) {display:none!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row)[data-finance-section=overview] .routine-finance__body {display:block!important;margin-top:30px!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row)[data-finance-section=overview] #rfTxList {display:block!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__transactions-header {display:none!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row):is([data-finance-section=overview],[data-finance-section=activity]) .duo-finance-activity-bar {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px;}
.duo-finance-activity-bar h2 {margin:0;font:650 19px -apple-system,BlinkMacSystemFont,system-ui,sans-serif!important;color:var(--rf-ink);}
.duo-finance-activity-bar button {background:none!important;border:0!important;box-shadow:none!important;color:var(--rf-blue)!important;font-size:13px!important;min-height:44px;padding:4px!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row)[data-finance-section=activity] .duo-finance-activity-filters {display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin-bottom:16px;}
.duo-finance-activity-filters :is(input,select) {min-width:0;width:100%;box-sizing:border-box;min-height:44px;padding:10px 12px;border:1px solid var(--rf-line)!important;border-radius:12px;background:var(--rf-card)!important;color:var(--rf-ink)!important;font-size:16px!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) #rfTxList .duo-finance-tx-hidden,
.duo-finance-activity-bar [hidden] {display:none!important;}
html:root.ivy-duo-mode .routine-finance-panel[data-finance-section=activity] .duo-finance-no-matches:not([hidden]) {display:block;text-align:center;color:var(--rf-muted);padding:24px;}

/* Monthly plans and readable budget cards. */
.duo-monthly-entrance,.duo-monthly-page {display:none;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row)[data-finance-section=add] .duo-monthly-entrance {display:flex;width:100%;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 20px;padding:18px;background:var(--rf-card)!important;border:0!important;border-radius:18px!important;color:var(--rf-ink)!important;font-size:17px!important;text-align:left;box-shadow:none!important;}
.duo-monthly-symbol {display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:#007aff15;color:var(--rf-blue);font-size:25px;}
.duo-monthly-entrance-caption {flex:1;font-size:12px;color:var(--rf-muted);text-align:right;}
.duo-monthly-chevron {color:var(--rf-muted);font-size:24px;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row)[data-finance-section=monthly] .duo-monthly-page {display:block;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row)[data-finance-section=monthly] .routine-finance__body {display:none!important;}
.duo-monthly-page h2 {margin:0;font:700 27px -apple-system,BlinkMacSystemFont,system-ui,sans-serif!important;color:var(--rf-ink);}
.duo-monthly-page h3 {margin:0 0 16px;font:650 19px -apple-system,BlinkMacSystemFont,system-ui,sans-serif!important;}
.duo-monthly-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;}
html:root.ivy-duo-mode .routine-finance-panel :is(.duo-monthly-back,.duo-monthly-new,.duo-monthly-cancel,.duo-monthly-tx-manage) {min-height:44px;background:transparent!important;border:0!important;box-shadow:none!important;color:var(--rf-blue)!important;font-size:15px!important;padding:8px 0!important;}
.duo-monthly-note {font-size:13px;line-height:1.55;color:var(--rf-muted);margin:12px 0 20px;}
.duo-monthly-totals {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:var(--rf-line);border-radius:18px;overflow:hidden;margin-bottom:18px;}
.duo-monthly-totals>div {display:flex;flex-direction:column;gap:8px;background:var(--rf-card);padding:18px;min-width:0;}
.duo-monthly-totals span {font-size:12px;color:var(--rf-muted);}
.duo-monthly-totals strong {font-size:20px;overflow-wrap:anywhere;}
.duo-monthly-list {background:var(--rf-card);border-radius:18px;overflow:hidden;}
html:root.ivy-duo-mode .routine-finance-panel .duo-monthly-row {display:flex;align-items:center;gap:12px;width:100%;padding:18px!important;border:0!important;border-bottom:1px solid var(--rf-line)!important;border-radius:0!important;background:var(--rf-card)!important;color:var(--rf-ink)!important;box-shadow:none!important;text-align:left;}
.duo-monthly-row>span:first-child {display:flex;flex:1;flex-direction:column;gap:6px;min-width:0;overflow-wrap:anywhere;}
.duo-monthly-row strong {font-size:16px;font-weight:600;}
.duo-monthly-row small {font-size:12px;line-height:1.5;color:var(--rf-muted);}
.duo-monthly-amount {font-size:15px;font-weight:600;}
.duo-monthly-empty {padding:24px;font-size:14px;line-height:1.6;color:var(--rf-muted);}
.duo-monthly-form {background:var(--rf-card);border-radius:18px;padding:18px;margin-bottom:18px;}
.duo-monthly-page [hidden] {display:none!important;}
.duo-monthly-field {display:flex;flex-direction:column;gap:8px;margin:0 0 16px;font-size:13px;color:var(--rf-muted);}
html:root.ivy-duo-mode .routine-finance-panel .duo-monthly-field :is(input,select) {position:static!important;display:block!important;width:100%!important;box-sizing:border-box;min-height:46px!important;padding:10px 12px!important;border:0!important;border-radius:11px!important;background:var(--rf-paper)!important;color:var(--rf-ink)!important;-webkit-text-fill-color:var(--rf-ink)!important;opacity:1!important;font-size:16px!important;box-shadow:none!important;}
.duo-monthly-form-actions {display:flex;flex-wrap:wrap;align-items:center;gap:12px;}
html:root.ivy-duo-mode .routine-finance-panel .duo-monthly-save {background:var(--rf-blue)!important;color:#fff!important;min-height:46px;padding:12px 16px!important;border:0!important;border-radius:12px!important;box-shadow:none!important;font-size:15px!important;}
html:root.ivy-duo-mode .routine-finance-panel .duo-monthly-delete {width:100%;min-height:44px;background:transparent!important;border:0!important;color:#ff453a!important;box-shadow:none!important;font-size:14px!important;}
.duo-monthly-error {color:#ff453a;font-size:13px;}
html:root.ivy-duo-mode .routine-finance-panel .duo-budget-add-entry {display:block;width:100%;margin-top:14px;padding:10px 0!important;min-height:44px;text-align:left;background:none!important;border:0!important;border-top:1px solid var(--rf-line)!important;border-radius:0!important;color:var(--rf-blue)!important;font-size:13px!important;box-shadow:none!important;}
html:root.ivy-duo-mode .routine-finance-panel .duo-monthly-tx-manage {grid-column:3;grid-row:1/3;}
html:root.ivy-duo-mode .routine-finance-panel .routine-finance__categories-label {display:none!important;}
html:root.ivy-duo-mode .routine-finance-panel .routine-finance__categories-header {display:flex!important;justify-content:flex-end!important;min-height:44px!important;margin:0 0 8px!important;pointer-events:auto!important;}
html:root.ivy-duo-mode .routine-finance-panel #rfCategoryList .routine-finance__category-item {padding:0!important;border-radius:14px!important;margin-bottom:8px!important;}
html:root.ivy-duo-mode .routine-finance-panel #rfCategoryList .routine-finance__category-row {display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:12px!important;align-items:center!important;}
html:root.ivy-duo-mode .routine-finance-panel #rfCategoryList .routine-finance__category-name {grid-column:1/-1;font-size:18px!important;font-weight:650!important;overflow-wrap:anywhere;white-space:normal!important;text-overflow:clip!important;overflow:visible!important;}
html:root.ivy-duo-mode .routine-finance-panel #rfCategoryList .routine-finance__category-amounts {display:none!important;}
html:root.ivy-duo-mode .routine-finance-panel #rfCategoryList .routine-finance__category-amounts-wrap {grid-column:1/-1;display:flex!important;align-items:center;justify-content:space-between;width:100%;gap:12px;}
.duo-budget-limit {display:flex;flex:1;align-items:center;justify-content:space-between;gap:12px;color:var(--rf-muted);font-size:13px;}
html:root.ivy-duo-mode .routine-finance-panel #rfCategoryList .routine-finance__cat-budget-input {width:110px!important;height:42px!important;padding:8px 12px!important;font-size:17px!important;color:var(--rf-ink)!important;text-align:right!important;}
html:root.ivy-duo-mode .routine-finance-panel #rfCategoryList .routine-finance__cat-budget-input:disabled {background:transparent!important;opacity:1!important;-webkit-text-fill-color:var(--rf-ink)!important;}
html:root.ivy-duo-mode .routine-finance-panel #rfCategoryList .routine-finance__cat-delete {width:32px;min-height:44px;font-size:20px!important;color:var(--rf-muted)!important;background:none!important;border:0!important;opacity:1!important;}
html:root.ivy-duo-mode .routine-finance-panel #rfCategoryList .routine-finance__cat-delete:disabled {display:none!important;}
html:root.ivy-duo-mode .routine-finance-panel #rfCategoryList .routine-finance__category-bar {position:relative!important;display:block!important;height:5px!important;width:100%!important;margin:16px 0 12px!important;border-radius:6px;background:var(--rf-line)!important;overflow:hidden!important;}
html:root.ivy-duo-mode .routine-finance-panel #rfCategoryList .routine-finance__category-bar-fill {position:static!important;display:block!important;height:100%!important;background:var(--rf-blue)!important;}
html:root.ivy-duo-mode .routine-finance-panel #rfCategoryList .routine-finance__category-bar-fill.over-budget {background:#ff453a!important;}
.duo-budget-detail {display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;font-size:12px;color:var(--rf-muted);}
.duo-budget-detail strong {font-weight:500;color:var(--rf-ink);}
.duo-budget-detail .is-over {color:#ff453a;}
html:root.ivy-duo-mode .routine-finance-panel .duo-budget-monthly-badge {grid-column:1/-1;justify-self:start;padding:6px 9px!important;border:0!important;border-radius:9px!important;min-height:32px;background:#007aff0d!important;color:var(--rf-blue)!important;font-size:11px!important;font-weight:500;box-shadow:none!important;}
/* Compact budget overview; controls are disclosed on demand. */
html:root.ivy-duo-mode .routine-finance-panel #rfCategoryList .routine-finance__category-bar[hidden] {display:none!important;}
.duo-budget-summary {display:block;list-style:none;cursor:pointer;padding:15px 16px 14px;}
.duo-budget-summary::-webkit-details-marker {display:none;}
.duo-budget-summary:focus-visible {outline:2px solid var(--rf-blue);outline-offset:-3px;border-radius:14px;}
.duo-budget-top {display:grid;grid-template-columns:minmax(0,1fr) auto 8px;align-items:center;gap:10px;}
.duo-budget-top strong {font-size:15px;font-weight:600;overflow-wrap:anywhere;color:var(--rf-ink);}
.duo-budget-balance {font-size:13px;font-weight:600;font-variant-numeric:tabular-nums;color:var(--rf-ink);}
.duo-budget-balance.is-over {color:#d74638;}
.duo-budget-disclosure-arrow {font-size:20px;color:var(--rf-muted);transition:transform 180ms;}
.duo-budget-disclosure[open] .duo-budget-disclosure-arrow {transform:rotate(90deg);}
.duo-budget-meta {display:flex;flex-wrap:wrap;align-items:center;gap:5px 12px;margin-top:7px;font-size:11px;line-height:1.4;color:var(--rf-muted);font-variant-numeric:tabular-nums;}
.duo-budget-planned-label {color:var(--rf-blue);}
.duo-budget-total-label {margin-left:auto;}
.duo-budget-meter {display:flex;height:3px;background:var(--rf-line);border-radius:3px;overflow:hidden;margin-top:11px;}
.duo-budget-meter-spent {height:100%;background:var(--rf-blue);}
.duo-budget-meter-planned {height:100%;background:repeating-linear-gradient(110deg,#629fe866 0 3px,#629fe8b3 3px 5px);}
.duo-budget-meter.is-over .duo-budget-meter-spent {background:#e05245;}
.duo-budget-controls {margin:0 16px;padding:12px 0;border-top:1px solid var(--rf-line);}
html:root.ivy-duo-mode .routine-finance-panel #rfCategoryList .duo-budget-controls .routine-finance__category-name {display:none!important;}
html:root.ivy-duo-mode .routine-finance-panel .duo-budget-controls .duo-budget-add-entry {margin-top:4px;border-top:0!important;padding:5px 0!important;}

@keyframes duo-budget-reveal {from {opacity:0;transform:translateY(-4px);}to {opacity:1;transform:translateY(0);}}

/* Small inline editor, with secondary destructive action explicitly labelled. */
html:root.ivy-duo-mode .routine-finance-panel #rfCategoryList .duo-budget-controls .routine-finance__cat-budget-input {width:100px!important;height:38px!important;min-height:38px!important;padding:5px 0!important;border-radius:0!important;background:transparent!important;border-bottom:1px solid var(--rf-line)!important;color:var(--rf-blue)!important;font-size:17px!important;font-variant-numeric:tabular-nums;}
html:root.ivy-duo-mode .routine-finance-panel #rfCategoryList .duo-budget-controls .routine-finance__cat-budget-input:focus {outline:none!important;border-bottom-color:var(--rf-blue)!important;}
html:root.ivy-duo-mode .routine-finance-panel #rfCategoryList .duo-budget-controls .routine-finance__cat-delete {display:block;width:auto;margin:6px 0 0 auto;padding:5px 0;min-height:36px;font-size:12px!important;color:#d74638!important;}
html:root.ivy-duo-mode .routine-finance-panel #rfCategoryList .duo-budget-controls .routine-finance__cat-delete:disabled {display:none!important;}
.duo-budget-name-label {display:flex;align-items:center;gap:14px;justify-content:space-between;font-size:13px;color:var(--rf-muted);margin-bottom:10px;}
html:root.ivy-duo-mode .routine-finance-panel .duo-budget-name-input {min-width:0;width:65%;height:38px;box-sizing:border-box;padding:5px 0!important;text-align:right;background:transparent!important;color:var(--rf-ink)!important;border:0!important;border-bottom:1px solid var(--rf-line)!important;border-radius:0!important;font-size:16px!important;box-shadow:none!important;}
html:root.ivy-duo-mode .routine-finance-panel .duo-budget-name-input:focus {outline:none;border-bottom-color:var(--rf-blue)!important;}
.duo-category-form {display:none;}
html:root.ivy-duo-mode .routine-finance-panel .routine-finance__categories-header {margin:0 0 16px!important;padding:0!important;}
html:root.ivy-duo-mode .routine-finance-panel #rfAddCategory {width:100%;min-height:48px;padding:12px 18px!important;background:var(--rf-blue)!important;color:white!important;border:0!important;border-radius:14px!important;font-size:16px!important;font-weight:600!important;box-shadow:none!important;}
html:root.ivy-duo-mode .routine-finance-panel .duo-category-form:not([hidden]) {display:block;background:var(--rf-card);padding:18px;border-radius:16px;margin-bottom:16px;}
.duo-category-form h3 {font-size:19px;font-weight:650;margin:0 0 18px;color:var(--rf-ink);}
.duo-finance-scope {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 2px;color:var(--rf-muted);font-size:12px;}
.duo-finance-scope[hidden],.routine-finance-panel:is([data-finance-section=add],[data-finance-section=monthly]) .duo-finance-scope {display:none!important;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-scope button {background:none!important;border:0!important;box-shadow:none!important;color:var(--rf-blue)!important;min-height:32px;font-size:12px!important;padding:4px!important;}
.duo-budget-scope-label {border-radius:5px;padding:2px 6px;background:#007aff10;color:var(--rf-blue);font-size:10px;}

html:root.ivy-duo-mode .routine-finance-panel .duo-finance-when {border-top:1px solid var(--rf-line);padding-top:16px;margin-top:6px;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-when-note {font-size:12px;color:var(--rf-muted);line-height:1.5;margin:0 0 16px;}

html:root.ivy-duo-mode .routine-finance-panel .duo-finance-when {border:0;padding-top:0;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-calendar-title {font-size:12px;color:var(--rf-muted);margin-bottom:10px;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-calendar-nav {display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:15px;font-weight:600;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-when button {background:transparent!important;color:var(--rf-ink)!important;border:0!important;box-shadow:none!important;border-radius:9px!important;padding:0!important;min-height:40px;font-size:13px!important;cursor:pointer;transition:background-color .16s,color .16s;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-calendar-nav button {width:40px;color:var(--rf-blue)!important;font-size:24px!important;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-whole-month {width:100%;margin:8px 0!important;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-calendar-week {display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:2px;margin-bottom:4px;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-when button.in-period {background:var(--rf-paper)!important;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-when button[aria-pressed=true] {background:var(--rf-blue)!important;color:white!important;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-when button:disabled {opacity:.25;cursor:default;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-when button:focus-visible {outline:2px solid var(--rf-blue);outline-offset:1px;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-when-note {margin-top:10px;}
@media(prefers-reduced-motion:reduce){html:root.ivy-duo-mode .routine-finance-panel .duo-finance-when button {transition:none;}}

html:root.ivy-duo-mode .routine-finance-panel .duo-finance-calendar-actions {display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-when .duo-finance-today {color:var(--rf-blue)!important;padding:0 12px!important;}

/* Amounts control the colour split; counts control the individual markers. */
.duo-calendar-week-flow,.duo-calendar-dot-badge {display:none;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) :is(.routine-finance__day-tx-count,.duo-calendar-legacy-count) {display:none!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__day.has-cashflow {background:linear-gradient(180deg,var(--rf-glass-top),var(--rf-glass-bottom)),linear-gradient(90deg,#39b88b28 var(--income-share),#de7a8728 var(--income-share))!important;box-shadow:inset 0 1px 0 var(--rf-glass-edge),inset 0 0 0 1px var(--rf-glass-edge),0 2px 5px #25334a05!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .duo-calendar-dot-badge {display:flex;align-items:center;justify-content:space-between;gap:5px;min-height:20px;max-width:100%;padding:3px 5px;margin-top:7px;border-radius:8px;background:linear-gradient(135deg,#ffffff80,#ffffff35);box-shadow:inset 0 1px 0 #ffffff80;box-sizing:border-box;}
html:root.ivy-duo-mode .routine-finance-panel .duo-calendar-dots {display:flex;flex-wrap:wrap;align-items:center;gap:2px;flex:1;min-width:0;}
html:root.ivy-duo-mode .routine-finance-panel .duo-calendar-dots.expense {justify-content:flex-end;}
html:root.ivy-duo-mode .routine-finance-panel .duo-calendar-dots i {width:4px;height:4px;border-radius:50%;background:currentColor;flex-shrink:0;}
html:root.ivy-duo-mode .routine-finance-panel .duo-calendar-dot-badge small {font-size:9px;font-style:normal;line-height:1.2;}
html:root.ivy-duo-mode .routine-finance-panel .duo-calendar-week-flow {display:block;margin:10px 0 12px;}
html:root.ivy-duo-mode .routine-finance-panel .duo-calendar-week-counts {display:flex;justify-content:space-between;gap:8px;font-size:11px;margin-bottom:7px;}
html:root.ivy-duo-mode .routine-finance-panel :is(.duo-calendar-week-counts,.duo-calendar-dot-badge) .income {color:#087d4e;}
html:root.ivy-duo-mode .routine-finance-panel :is(.duo-calendar-week-counts,.duo-calendar-dot-badge) .expense {color:#b73346;}
html:root.ivy-duo-mode .routine-finance-panel .duo-calendar-split {height:5px;border-radius:8px;background:var(--rf-paper);}
html:root.ivy-duo-mode .routine-finance-panel .has-cashflow .duo-calendar-split {background:linear-gradient(#ffffff75,transparent 75%),linear-gradient(90deg,#76bfa2 var(--income-share),#d99ba4 var(--income-share));box-shadow:inset 0 1px 0 #ffffff70;}
html:root.ivy-duo-mode.dark-mode .routine-finance-panel .duo-calendar-dot-badge {background:linear-gradient(135deg,#ffffff19,#ffffff08);box-shadow:inset 0 1px 0 #ffffff25;}
html:root.ivy-duo-mode.dark-mode .routine-finance-panel :is(.duo-calendar-week-counts,.duo-calendar-dot-badge) .income {color:#6ae5ad;}
html:root.ivy-duo-mode.dark-mode .routine-finance-panel :is(.duo-calendar-week-counts,.duo-calendar-dot-badge) .expense {color:#ff9ca7;}

/* Restrained glass: neutral surface, colour beneath, moving reflection only on selection. */
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) {--rf-glass-top:#ffffffdf;--rf-glass-bottom:#ffffff28;--rf-glass-edge:#ffffffa8;--rf-glass-reflection:#fff;}
html:root.ivy-duo-mode.dark-mode .routine-finance-panel:not(.rf-view-row) {--rf-glass-top:#242428dd;--rf-glass-bottom:#24242838;--rf-glass-edge:#ffffff16;--rf-glass-reflection:#bbcddd;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__week-days {gap:8px!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__day {border-radius:15px!important;overflow:hidden!important;isolation:isolate;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .routine-finance__day-pnl {font-weight:600!important;font-variant-numeric:tabular-nums;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) .duo-calendar-dot-badge {min-height:17px;padding:3px 7px;border-radius:20px;background:linear-gradient(150deg,#ffffff90,#ffffff35);box-shadow:inset 0 1px 0 #ffffffa0,inset 0 -1px 0 #25334a06;}
html:root.ivy-duo-mode.dark-mode .routine-finance-panel:not(.rf-view-row) .duo-calendar-dot-badge {background:linear-gradient(150deg,#ffffff14,#ffffff06);box-shadow:inset 0 1px 0 #ffffff20;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) :is(.routine-finance__week,.duo-finance-month) {position:relative!important;isolation:isolate;overflow:clip!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) :is(.routine-finance__day.is-selected,.routine-finance__week.is-selected,.duo-finance-month[aria-pressed=true]) {outline:0!important;border-color:var(--rf-glass-edge)!important;box-shadow:inset 0 1px 0 var(--rf-glass-edge),inset 0 0 0 1px #9baabb48,0 3px 12px #25334a10!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) :is(.routine-finance__day.is-selected,.routine-finance__week.is-selected,.duo-finance-month[aria-pressed=true])::after {content:'';display:block!important;position:absolute;inset:-45%;border-radius:45%;pointer-events:none;background:conic-gradient(from 35deg,transparent 0deg,var(--rf-glass-reflection) 65deg,transparent 110deg,transparent 195deg,var(--rf-glass-reflection) 250deg,transparent 300deg);opacity:.12;transform:rotate(-15deg) scale(1.05);z-index:0;animation:duo-finance-liquid 9s ease-in-out infinite;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) :is(.routine-finance__day,.routine-finance__week,.duo-finance-month)>* {position:relative;z-index:1;}
@keyframes duo-finance-liquid {0%,100%{transform:translate(-5%,-3%) rotate(-15deg) scale(1.05);opacity:.10;}50%{transform:translate(5%,3%) rotate(35deg) scale(1.15);opacity:.28;}}
html:root.ivy-duo-mode .routine-finance-panel:not(.is-open) :is(.routine-finance__day,.routine-finance__week,.duo-finance-month)::after {animation-play-state:paused!important;}
html:root.ivy-duo-mode.perf-plus .routine-finance-panel :is(.routine-finance__day,.routine-finance__week,.duo-finance-month)::after {animation:none!important;opacity:.12!important;}
@media(prefers-reduced-motion:reduce){html:root.ivy-duo-mode .routine-finance-panel :is(.routine-finance__day,.routine-finance__week,.duo-finance-month)::after {animation:none!important;opacity:.12!important;}}

html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) :is(.routine-finance__week,.routine-finance__day) {filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row) :is(.routine-finance__day.is-selected,.routine-finance__week.is-selected,.duo-finance-month[aria-pressed=true])::after {filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}

html:root.ivy-duo-mode .routine-finance-panel.duo-finance-entry-open :is(.duo-finance-actions,.duo-monthly-entrance) {display:none!important;}
html:root.ivy-duo-mode .routine-finance-panel .is-morphing {visibility:hidden!important;pointer-events:none!important;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-editor.is-morphing {visibility:hidden!important;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-editor.is-morphing * {visibility:hidden!important;}
.duo-finance-morph-layer {position:fixed;z-index:12005;overflow:hidden;pointer-events:none;}
.duo-finance-morph-surface {position:absolute;transform-origin:top left;box-shadow:0 4px 18px #00000008;}

html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row)[data-finance-section=add] :is(.duo-finance-actions,.duo-monthly-entrance).is-morphing,html:root.ivy-duo-mode .routine-finance-panel:not(.rf-view-row)[data-finance-section=add] .duo-finance-actions.is-morphing * {visibility:hidden!important;pointer-events:none!important;}

/* Same finger-anchored drag and velocity-driven collapse as Settings. */
html:root.ivy-duo-mode .routine-finance-panel.duo-settings-dragging {translate:var(--duo-drag-x,0px) var(--duo-drag-y,0px)!important;scale:var(--duo-drag-scale,1)!important;transform-origin:center!important;transition:none!important;}
html:root.ivy-duo-mode .routine-finance-panel.duo-settings-collapsing {clip-path:inset(0 round var(--duo-close-round,32px))!important;pointer-events:none!important;}

/* Grabber belongs to the moving panel, rather than a separately animated overlay. */
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-handle:not([hidden]) {position:absolute!important;left:calc(50% - 60px)!important;top:auto!important;bottom:1px!important;width:120px!important;height:44px!important;margin:0!important;box-sizing:border-box;transform:none!important;translate:none!important;scale:none!important;transition:none!important;animation:none!important;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-handle span {transition:none!important;animation:none!important;}

/* Keep the edge mask outside the Android scrolling layer. */
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-month-viewport {min-width:0;overflow:hidden;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-month {opacity:var(--month-edge-opacity,1)!important;filter:var(--month-edge-filter,none)!important;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-month-heading {justify-content:center;padding-bottom:12px;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-month-picker-label {
 --tab-lens-x:0px;--tab-lens-y:0px;--tab-lens-w:100%;--tab-lens-h:100%;
 position:relative;isolation:isolate;gap:12px;min-height:44px;padding:8px 16px;border-radius:999px;color:var(--rf-ink);font-size:16px;font-weight:600;
 background:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;
}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-month-picker-label>span {position:relative;z-index:1;pointer-events:none;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-month-picker-label>input {z-index:2;}
.duo-finance-picker-chevron {font-size:16px;font-weight:400;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-month-picker {font-size:16px;color-scheme:light;}
html:root.ivy-duo-mode.dark-mode .routine-finance-panel .duo-finance-month-picker {color-scheme:dark;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-month-picker-label {max-width:100%;min-width:0;box-sizing:border-box;}
html:root.ivy-duo-mode .routine-finance-panel .duo-finance-month-picker {min-width:0;max-width:100%;padding:0!important;margin:0!important;box-sizing:border-box;}
/* A cached gesture image from a wider viewport must not enlarge the scroll area. */
html:root.ivy-duo-mode .routine-finance-panel > .ivy-panel-freeze-image {max-width:100%;max-height:100%;}

/* The reveal participates in layout, pushing budget cards down as it opens. */
.duo-category-reveal {display:flow-root;overflow:hidden;}

/* Entry calendars: tiny activity markers, with exact totals only for the selected period. */
html:root.ivy-duo-mode .routine-finance-panel .duo-entry-markers {display:flex;justify-content:center;gap:3px;min-height:4px;margin-top:3px;}
.duo-entry-markers i {width:3px;height:3px;border-radius:50%;background:currentColor;}
html:root.ivy-duo-mode .routine-finance-panel .duo-entry-activity {display:flex;flex-wrap:wrap;gap:4px 12px;padding:9px 0;font-size:11px;font-variant-numeric:tabular-nums;}
.duo-entry-activity>span:first-child {width:100%;color:var(--rf-muted);font-size:10px;}
html:root.ivy-duo-mode .routine-finance-panel .duo-entry-legend {display:flex;flex-wrap:wrap;gap:4px 10px;font-size:9px;line-height:1.4;color:var(--rf-muted);margin:0 0 10px;}
html:root.ivy-duo-mode .routine-finance-panel :is(.duo-entry-markers,.duo-entry-activity,.duo-entry-legend) .is-income {color:#248451;}
html:root.ivy-duo-mode .routine-finance-panel :is(.duo-entry-markers,.duo-entry-activity,.duo-entry-legend) .is-expense {color:#c43e50;}
html:root.ivy-duo-mode.dark-mode .routine-finance-panel :is(.duo-entry-markers,.duo-entry-activity,.duo-entry-legend) .is-income {color:#6ddda0;}
html:root.ivy-duo-mode.dark-mode .routine-finance-panel :is(.duo-entry-markers,.duo-entry-activity,.duo-entry-legend) .is-expense {color:#ff8f9e;}

/* Open Duo keeps period selection and navigation together at bottom right. */
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel:not(.rf-view-row) {
  display:grid!important;grid-template-columns:minmax(0,1fr) 132px;
  grid-template-rows:minmax(0,1fr) auto;gap:12px 22px;
  padding:24px 18px 48px 24px!important;
}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel:not(.rf-view-row) .duo-finance-screen {
  grid-column:1;grid-row:1 / -1;min-width:0;
}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel:not(.rf-view-row) .routine-finance__header {
  grid-column:2;grid-row:1;align-self:start;padding:4px 0 0!important;gap:8px!important;
}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel:not(.rf-view-row) .duo-finance-tabs {
  grid-column:2;grid-row:2;align-self:end;border:0;margin:0;padding:6px;
  border-radius:28px;background:#e7e7ed;
}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel:not(.rf-view-row) .duo-finance-tabs button {min-height:66px;border-radius:23px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas.dark-mode .routine-finance-panel:not(.rf-view-row) .duo-finance-tabs {background:#25262c;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-finance-months {min-width:0;max-width:100%;}
/* Open Duo uses a genuinely vertical control rail and month scroller. */
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel:not(.rf-view-row) {grid-template-columns:minmax(0,1fr) 132px;gap:12px 20px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel:not(.rf-view-row) .duo-finance-tabs {flex-direction:column;gap:2px;width:72px;box-sizing:border-box;justify-self:center;border-radius:36px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel:not(.rf-view-row) .duo-finance-tabs button {flex:none;width:60px;height:60px;min-height:60px;border-radius:50%;gap:3px;font-size:9px!important;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-finance-month-strip {flex-direction:column;height:162px;box-sizing:border-box;overflow-x:hidden;overflow-y:auto;scroll-snap-type:y proximity;overscroll-behavior:contain;padding:0 2px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-finance-month {flex:0 0 118px;height:118px;min-height:118px;gap:7px;padding:12px!important;width:118px;align-self:center;box-sizing:border-box;scroll-snap-align:start;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-finance-month-viewport {mask-image:linear-gradient(to bottom,#000 0%,#000 88%,transparent 100%);-webkit-mask-image:linear-gradient(to bottom,#000 0%,#000 88%,transparent 100%);}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-finance-month-picker-label {max-width:100%;font-size:12px;padding-inline:10px;}

html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel #rfTxList.duo-activity-split {
  display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 16px;align-items:start;
}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel #rfTxList.duo-activity-split::before,
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel #rfTxList.duo-activity-split::after {
  grid-row:1;padding:12px 16px;font-size:12px;font-weight:600;color:var(--rf-muted);
}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel #rfTxList.duo-activity-split::before {content:'Income';grid-column:1;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel #rfTxList.duo-activity-split::after {content:'Expenses';grid-column:2;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel #rfTxList.duo-activity-split .routine-finance__tx-item {grid-row:var(--activity-row);min-width:0;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel #rfTxList.duo-activity-split [data-activity-kind=income] {grid-column:1;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel #rfTxList.duo-activity-split [data-activity-kind=expense] {grid-column:2;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-calendar-week-pair {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:stretch;margin-bottom:14px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-calendar-week-pair .routine-finance__week {margin:0!important;padding:14px!important;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-calendar-week-pair .routine-finance__week-days {grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-auto-rows:minmax(64px,auto)!important;gap:6px!important;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-calendar-week-pair .routine-finance__day {padding:7px 8px!important;min-height:64px!important;}
.duo-calendar-week-activity {min-width:0;max-height:250px;overflow:auto;padding:14px 16px;border-radius:20px;background:var(--rf-card);color:var(--rf-ink);box-sizing:border-box;}
.duo-calendar-week-activity h3 {font-size:13px;margin:0 0 10px;}
.duo-calendar-week-activity p {font-size:12px;color:var(--rf-muted);}
.duo-calendar-activity-entry {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;padding:9px 0;border-bottom:1px solid var(--rf-line);font-size:12px;}
.duo-calendar-activity-entry span {overflow-wrap:anywhere;}
.duo-calendar-activity-entry small {grid-column:1 / -1;color:var(--rf-muted);font-size:10px;}
.duo-calendar-activity-entry .income {color:var(--rf-blue);}
.duo-calendar-activity-entry .expense {color:var(--rf-ink);}

html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-calendar-week-pair .duo-calendar-week-flow {margin:6px 0 8px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-calendar-week-pair .duo-calendar-week-activity {max-height:290px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel[data-finance-section=calendar] :is(#rfTxList,.duo-finance-activity-bar,.duo-finance-activity-filters,.duo-finance-no-matches) {display:none!important;}

/* Expanded entry: calendar and details share the opened display. */
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-finance-entry:not([hidden]) {
 display:grid;grid-template-columns:minmax(340px,1.35fr) minmax(220px,1fr);grid-template-rows:auto repeat(4,auto) 1fr;gap:14px 24px;align-items:start;
}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-finance-entry-title {grid-column:1 / -1;margin-bottom:4px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-finance-when {grid-column:1;grid-row:2 / 7;min-width:0;margin:0;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-finance-entry > .duo-finance-field {grid-column:2;margin:0;min-width:0;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-finance-entry > .duo-finance-field:has(select) {grid-row:2;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-finance-entry > .duo-finance-field:has(input[id$=Desc]) {grid-row:3;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-finance-entry > .duo-finance-field:has(input[id$=Amount]) {grid-row:4;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-finance-entry > .routine-finance__mini-add {grid-column:2;grid-row:5;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-finance-calendar-title {font-size:13px;margin-bottom:8px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-finance-calendar-week {gap:4px;}

/* Recurring entry details fit into a compact opened-Duo sheet. */
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-monthly-form:not([hidden]) {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px 20px;max-width:760px;margin:12px auto 20px;padding:20px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-monthly-form > :is(h3,.duo-monthly-note,.duo-monthly-error,.duo-monthly-form-actions) {grid-column:1 / -1;margin:0;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-monthly-form > h3 {font-size:18px;line-height:1.3;margin-bottom:4px;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-monthly-form .duo-monthly-field {margin:0;gap:6px;min-width:0;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-monthly-form .duo-monthly-error:empty {display:none;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-monthly-page:has(.duo-monthly-form:not([hidden])) > :is(.duo-monthly-note,.duo-monthly-totals,.duo-monthly-list) {display:none;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-monthly-form-actions {justify-content:flex-end;}
/* Native date inputs must shrink with their grid column in WebKit. */
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-monthly-form {box-sizing:border-box;width:100%;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-monthly-form .duo-monthly-field :is(input,select) {min-width:0!important;max-width:100%!important;box-sizing:border-box!important;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-monthly-form input[type=date]::-webkit-date-and-time-value {min-width:0;text-align:left;}

/* Keep the selected calendar scope and reset beside the week pagination. */
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-finance-scope.is-calendar-header {margin-left:auto;margin-right:12px;justify-content:flex-end;flex-wrap:wrap;gap:4px 12px;min-width:0;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-finance-scope.is-calendar-header button {white-space:nowrap;flex-shrink:0;}
html:root.ivy-duo-mode.ivy-duo-layout--canvas .routine-finance-panel .duo-finance-scope.is-calendar-header + .routine-finance__cal-pagination {margin-left:0;flex-shrink:0;}
