@charset "UTF-8";
:root{
  color-scheme:dark;
  --bg:#202020;--sidebar:#383838;--surface:#252525;--surface-raised:#353535;
  --input:#191919;--line:#444;--text:#e5e5e5;--muted:#aaa;--subtle:#919191;
  --accent:#2c8acd;--accent-hover:#449bda;--green:#7cbb53;--red:#e89992;--blue:#90bce0;
  --future:#929292;--row-height:32px;--radius:5px;
  --icon:#e8ac7f;--icon-muted:#a9b9c2;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:13px;font-synthesis:none;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
.usage-warnings{flex:none;min-width:0;border-bottom:1px solid var(--line);background:var(--surface)}
.usage-warnings .usage-warning{display:flex;align-items:center;gap:8px 16px;padding:7px 14px;font-size:12px;line-height:1.4;color:var(--text);background:color-mix(in srgb,var(--accent) 8%,var(--surface))}
.usage-warnings .usage-warning[data-severity="critical"]{background:color-mix(in srgb,var(--red) 12%,var(--surface))}
.usage-warnings .usage-warning>span{flex:1;min-width:0}
.usage-warnings .usage-warning>a{color:var(--text);text-underline-offset:3px;white-space:nowrap}
.usage-warnings .usage-warning>button{flex:none;width:28px;height:28px;border:0;background:transparent;color:var(--muted);font-size:22px;line-height:1}
.usage-warnings .usage-warning>button:hover{color:var(--text);background:var(--surface-raised);border-radius:4px}
.usage-warnings .usage-warning :is(a,button):focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media(max-width:680px){.usage-warnings .usage-warning{display:grid;grid-template-columns:1fr 36px;gap:4px 8px;padding:8px 12px}.usage-warnings .usage-warning>a{grid-column:1;font-size:11px;min-height:28px;display:flex;align-items:center}.usage-warnings .usage-warning>button{grid-column:2;grid-row:1 / span 2;width:36px;height:36px}}
@media print{.usage-warnings{display:none!important}}
html{height:100%;overflow:clip}
body{height:100%;margin:0;background:var(--bg);color:var(--text);overflow:clip}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.38}
a{color:inherit}
:is(button,a,input,select,textarea,[tabindex]):focus-visible{outline:2px solid var(--accent);outline-offset:2px}
h1,h2,h3,p{margin:0}
h1{font-size:23px;font-weight:500;letter-spacing:-.4px}
h2{font-size:14px;font-weight:600}
.muted{color:var(--muted)}
.eyebrow{font-size:10px;font-weight:600;letter-spacing:1px;text-transform:uppercase;color:var(--subtle);margin-bottom:10px}
.negative{color:var(--red)}
.positive{color:var(--green)}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip-link{position:fixed;left:12px;top:-100px;z-index:50;background:var(--accent);color:white;padding:10px 14px;border-radius:4px}
.skip-link:focus{top:8px}
.button{min-height:30px;border:1px solid #505050;border-radius:5px;padding:5px 11px;font-size:12px;line-height:18px;font-weight:500;white-space:nowrap;background:var(--surface-raised);color:var(--text)}
.button:hover{background:#414141}
.button.primary{background:#19629d;border-color:#357daf;color:#fff}
.button.primary:hover{background:#2579b4}
.button.quiet{background:transparent;border-color:transparent;color:var(--muted)}
.button.quiet:hover{background:#3a3a3a;color:var(--text)}
.button.danger{color:var(--red);background:transparent;border-color:#74504e}
.button.danger:hover{background:#422a28}
.full-width{width:100%}
.icon-button{display:inline-grid;place-items:center;padding:0;width:27px;height:27px;border:1px solid transparent;border-radius:4px;color:var(--muted);background:transparent;font-size:23px;line-height:1}
.icon-button:hover{background:#484848;color:var(--text)}

/* One fixed window. Only the account list and register scroll independently. */
.app-shell{position:fixed;inset:0;display:grid;grid-template-columns:clamp(190px,18.75vw,288px) minmax(0,1fr);height:100dvh;min-height:0;overflow:clip}
.sidebar{min-height:0;display:flex;flex-direction:column;background:var(--sidebar);border-right:1px solid #484848;overflow:hidden}
.sidebar-top{height:36px;flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 12px;border-bottom:1px solid #484848}
.brand{display:flex;align-items:center;gap:8px;text-decoration:none;font-size:14px;font-weight:600;letter-spacing:-.2px}
.brand-mark{width:37px;height:37px;border:2px solid var(--accent);border-radius:50%;display:grid;place-items:center;color:var(--accent);font-size:0;position:relative;margin-bottom:24px}
.brand-mark:after{content:"";width:7px;height:7px;border-radius:50%;background:var(--accent);position:absolute;right:-3px;top:0;border:2px solid var(--surface);box-sizing:content-box}
.brand-mark.small{width:18px;height:18px;margin:0;flex:none;border-width:1.5px}
.brand-mark.small:after{width:4px;height:4px;border-width:1.5px;right:-2px}
.all-accounts-button{display:block;flex:none;width:100%;border:0;border-radius:0;background:transparent;color:var(--text);text-align:left;padding:12px 17px 11px;font-size:12px;font-weight:600}
.all-accounts-button:hover{background:#454545}
.all-accounts-button[aria-current=true],.all-accounts-button[aria-pressed=true]{background:#195f99;color:#fff}
.sidebar-heading{flex:none;display:flex;align-items:center;justify-content:space-between;padding:6px 16px 6px}
.sidebar-heading h2{font-size:12px;font-weight:600}
.sidebar-heading h2:before{content:"⌄";display:inline-block;margin-right:6px;color:#a5a5a5}
.account-list{display:flex;flex-direction:column;gap:0;min-height:0;overflow:auto;padding:0 5px 10px 0;scrollbar-width:thin;scrollbar-color:#666 transparent}
.account-group{display:flex;flex-direction:column;margin:0 0 10px}
.account-group-label,.account-group-heading,.account-list h3{font-size:11px;font-weight:600;color:#a9a9a9;margin:9px 16px 5px}
.account-button{width:100%;min-height:26px;text-align:left;display:flex;align-items:center;gap:7px;border:0;border-radius:0 4px 4px 0;padding:4px 10px 4px 25px;color:var(--text);background:transparent;font-size:11px}
.account-button:hover{background:#454545}
.account-button[aria-current=true],.account-button.is-selected{color:#fff;background:#1964a0}
.account-icon{display:none}
.account-button>span:last-child:not(.account-balance){display:flex;align-items:center;gap:8px;width:100%;min-width:0}
.account-name{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;min-width:0;font-size:11px;font-weight:500;line-height:18px}
.account-button{position:relative}
.account-review-dot{position:absolute;left:7px;top:50%;width:6px;height:6px;border-radius:50%;transform:translateY(-50%);background:light-dark(#176bc1,#6aaff8);pointer-events:none}
.account-balance{display:block;flex:none;margin-left:auto;font-size:11px;line-height:18px;white-space:nowrap;font-variant-numeric:tabular-nums}
.account-balance.unverified{font-size:10px;color:#dbc293}
.sidebar-empty{font-size:11px;padding:10px 17px;line-height:1.5}
.sidebar-footer{flex:none;margin-top:auto;padding:12px 11px 11px}
.sidebar-footer .button{font-size:10px;min-height:28px;padding:4px 7px}
.review-downloads-button{margin-top:7px}
.connection-details{margin-top:9px;font-size:10px;color:var(--subtle)}
.connection-details summary{cursor:pointer;line-height:1.6}
.bank-status,.sidebar-note{font-size:10px;line-height:1.5;margin-top:7px;overflow-wrap:anywhere;color:var(--muted)}
.sidebar-total{flex:none;min-height:40px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 16px;border-top:1px solid #484848;font-size:11px;font-weight:600}
.sidebar-total strong{font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.workspace{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}
.topbar{flex:none;min-height:36px;padding:0 16px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #414141;gap:10px;background:#292929}
.breadcrumb{font-size:10px;color:var(--subtle);white-space:nowrap}
.breadcrumb span{margin:0 7px;color:#777}
.breadcrumb strong{color:var(--muted);font-weight:500}
.session{display:flex;gap:9px;align-items:center;font-size:10px;color:var(--subtle)}
.session .button{font-size:10px;min-height:25px;padding:2px 7px}
main{flex:1;display:flex;flex-direction:column;min-height:0;min-width:0;padding:0;outline:none;overflow:hidden}
#account-workspace{flex:1;display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden}
.page-heading{flex:none;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 18px 15px;min-height:82px;background:#202020}
.account-heading{min-width:0}
.page-heading h1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.page-heading .muted{font-size:11px;line-height:1.45;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.today-balance{flex:none;text-align:right;align-self:center}
.today-balance>span{display:block;color:#a5a5a5;font-size:10px;line-height:1.4}
.today-balance>strong{display:block;font-size:23px;line-height:1.25;font-weight:400;letter-spacing:-.4px;font-variant-numeric:tabular-nums;margin-top:2px}
.account-balance-overview{display:flex;align-items:center;gap:22px;flex:none;min-width:0}
.page-heading.credit-card-heading{height:auto;min-height:84px;--credit-label-size:10px;--credit-label-height:14px;--credit-value-size:23px;--credit-value-height:29px}
.credit-card-heading .account-balance-overview{align-items:flex-start}
.account-credit-summary{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(95px,1fr);align-items:start;gap:18px}
.account-credit-metric{text-align:right;min-width:0}
.credit-card-heading :is(.account-credit-metric,.today-balance){display:grid;grid-template-rows:var(--credit-label-height) var(--credit-value-height) auto;row-gap:1px;align-self:start}
.credit-card-heading :is(.account-credit-metric,.today-balance)>span{display:block;color:var(--muted);font-size:var(--credit-label-size);line-height:var(--credit-label-height);white-space:nowrap}
.credit-card-heading :is(.account-credit-metric,.today-balance)>strong{display:block;font-size:var(--credit-value-size);line-height:var(--credit-value-height);font-weight:400;letter-spacing:-.3px;font-variant-numeric:tabular-nums;white-space:nowrap;margin:0}
.account-credit-metric>small{display:block;color:var(--muted);font-size:10px;line-height:14px;max-width:155px;margin-top:2px}
#credit-pending-total{display:block;color:var(--muted);font-size:10px;line-height:1.4;margin-top:3px}
@media(min-width:681px) and (max-width:1150px){
  .page-heading.credit-card-heading{height:auto;min-height:84px;flex-wrap:wrap;gap:10px}
  .credit-card-heading .account-balance-overview{width:100%;justify-content:space-between;gap:16px}
  .credit-card-heading .account-credit-summary{flex:1;gap:14px}
  .credit-card-heading .account-credit-metric{text-align:left}
}
.account-navigation{flex:none;min-height:36px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 10px;background:#282828;border-top:1px solid #424242;border-bottom:1px solid #424242}
.account-tabs{display:flex;align-items:center;gap:5px;min-width:0}
.account-tab{border:0;background:transparent;color:#d0d0d0;padding:5px 9px;border-radius:4px;font-size:12px;white-space:nowrap}
.account-tab:hover{background:#3e3e3e}
.account-tab[aria-selected=true],.account-tab.active{background:#1c65a0;color:#fff}
.search-field{display:flex;align-items:center;gap:4px;width:min(280px,35%);min-width:140px;height:25px;margin:0;padding:0 8px;border:1px solid #424242;border-radius:20px;background:#191919}
.search-field>span:not(.sr-only){font-size:18px;line-height:1;color:#979797}
.search-field input{min-width:0;width:100%;height:23px;min-height:0;border:0;border-radius:0;margin:0;padding:3px 0;background:transparent;font-size:11px;box-shadow:none}
.search-field input::placeholder{color:#939393}
.register-panel{flex:1;display:flex;flex-direction:column;min-height:0;min-width:0;background:#202020;overflow:hidden}
.register-filters{flex:none;min-height:39px;display:flex;align-items:center;gap:12px;justify-content:space-between;padding:6px 10px;background:#272727;border-bottom:1px solid #494949}
.filter-controls{display:flex;align-items:center;gap:8px;min-width:0}
.filter-controls label{display:block;margin:0;min-width:0}
.filter-controls select{width:140px;max-width:17vw;height:26px;min-height:0;padding:3px 23px 3px 10px;border:0;border-radius:5px;background:#383838;font-size:11px;margin:0;color:#dedede}
.filter-controls label:first-child select{width:195px;max-width:21vw}
.register-count{display:flex;gap:5px;align-items:center;justify-content:flex-end;flex-wrap:wrap;font-size:10px;color:#969696;white-space:nowrap}
#selection-summary:empty{display:none}
#register-scroll{flex:1;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;scrollbar-color:#606060 #292929;scrollbar-width:thin;outline-offset:-2px}
.register-table{width:100%;min-width:1090px;table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:12px;white-space:nowrap;font-variant-numeric:tabular-nums}
col.column-status{width:25px}col.column-date{width:89px}col.column-payee{width:178px}col.column-category{width:144px}col.column-transfer{width:144px}col.column-payment{width:88px}col.column-deposit{width:88px}col.column-amount{width:89px}col.column-balance{width:101px}col.column-memo{width:150px}
.register-table th{height:27px;position:sticky;top:0;z-index:3;background:#282828;color:#aabcca;font-size:10px;font-weight:500;letter-spacing:.45px;text-transform:uppercase;text-align:left;padding:5px 5px;border-bottom:1px solid #444;line-height:16px;overflow:hidden;white-space:nowrap}
.register-table th:not(:first-child):after{content:"";position:absolute;right:0;top:6px;height:13px;border-right:1px solid #494949}
.register-table th.active-sort{box-shadow:inset 0 2px #468cbd;color:#64a4d5}
.register-table th.column-status{text-align:center;color:#a7b6c0}
.register-table th button{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-transform:inherit;letter-spacing:inherit;text-align:left}
.register-table th button>span{font-size:16px;line-height:12px}
.register-table td{height:var(--row-height);max-height:var(--row-height);padding:5px;border:0;line-height:22px;overflow:hidden;text-overflow:ellipsis;color:#dedede;background:#202020;vertical-align:middle}
.register-table tbody tr:nth-child(even) td{background:#2b2b2b}
.register-table tbody tr.stripe-gray td{background:#2b2b2b}
.register-table tbody tr.stripe-dark td{background:#202020}
.register-table tbody tr:hover td{background:#373737}
.register-table tbody tr[aria-selected=true] td,.register-table tbody tr.is-selected td,.register-table tbody tr.selected td{background:#454545}
.register-table tbody tr:focus-visible{outline:1px solid #70a7d0;outline-offset:-1px}
.register-table .number{text-align:right}
.register-table .payee,.register-table .category,.register-table .transfer,.register-table .memo{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.register-table .category{font-size:inherit;color:inherit}
.register-table .column-status,.register-table td.status-cell{text-align:center;padding-left:3px;padding-right:3px}
.register-table .status-icon,.register-table .row-icon{font-size:15px;color:#c48e69;line-height:1}
.register-table .inflow,.register-table .positive{color:#6dd35b}
.register-table td.negative{color:inherit}
.register-table .balance-column.negative{color:var(--red)}
.register-table .balance-column{font-weight:400}
.register-table .scheduled-row td,.register-table .planned-row td,.register-table .future-row td,.register-table .forecast-row td{color:var(--future)}
.register-table .scheduled-row .status-icon,.register-table .planned-row .status-icon,.register-table .future-row .status-icon,.register-table .forecast-row .status-icon{color:#949494}
.register-table .scheduled-row .inflow,.register-table .scheduled-row .positive,.register-table .planned-row .inflow,.register-table .future-row .positive{color:#86a17e}
.register-table .scheduled-row .payee,.register-table .planned-row .payee,.register-table .future-row .payee,.register-table .forecast-row .payee{color:#929292}
.register-table .overdue-row .status-icon{color:#c1a26d}
.register-table .is-minimum td.balance-column{box-shadow:inset 0 -1px #87724c}
.date-divider td,.today-divider td,.today-boundary td{height:2px!important;max-height:2px!important;line-height:0!important;padding:0!important;font-size:0!important;background:var(--green)!important;border-top:2px solid var(--green)!important;color:transparent!important}
.date-divider,.today-divider,.today-boundary{scroll-margin-top:150px}
.register-table tr.today-boundary-row td{border-top:2px solid var(--green)}
.register-table .row-note{display:inline;font-size:inherit;line-height:inherit;margin:0;color:inherit;white-space:nowrap}
.register-table .row-note+.row-note:before{content:" · "}
.row-button{border:1px solid #5a5a5a;background:transparent;border-radius:3px;color:#ddd;font-size:10px;padding:2px 6px;white-space:nowrap}
.row-button:hover{background:#4c4c4c}
.status-badge{display:inline-flex;align-items:center;gap:4px;font-size:10px;font-weight:400;line-height:17px;color:#b5c8b7}
.status-badge.scheduled,.status-badge.planned{color:#939393}
.status-badge.pending,.status-badge.overdue{color:#c5ae87}
.status-badge.manual{color:#b1a6bb}
.status-badge.reconciled,.status-badge.cleared{color:#a8c6b1}
.register-empty{padding:50px 20px;text-align:center;color:var(--muted);font-size:12px;line-height:1.7}
.register-footer{flex:none;min-height:50px;background:#282828;border-top:1px solid #434343;padding:2px 8px;overflow-x:auto;scrollbar-width:thin}
.register-tools{min-width:600px;display:flex;align-items:stretch;justify-content:space-between;gap:14px;min-height:46px}
.toolbar-group{display:flex;align-items:stretch;gap:3px}
.toolbar-scheduling{margin-left:auto;margin-right:auto}
.toolbar-button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:45px;min-height:44px;padding:2px 6px;border:0;border-radius:4px;color:#bfbfbf;background:transparent;white-space:nowrap;font-size:10px;line-height:12px}
.toolbar-button:hover:not(:disabled){background:#3a3a3a;color:#fff}
.toolbar-icon{display:grid;place-items:center;height:22px;font-size:21px;line-height:22px;color:#a3a3a3}
.toolbar-button:hover:not(:disabled) .toolbar-icon{color:#d1d1d1}
.app-status{flex:none;padding:7px 13px;background:#29382b;border-bottom:1px solid #456047;font-size:11px;line-height:1.5;color:#c9dfc5;overflow-wrap:anywhere}
.app-status.error{background:#3b2928;border-color:#74504c;color:#f1b8b1}
.anchor-notice{flex:none;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 15px;border-top:1px solid #776747;border-bottom:1px solid #776747;background:#322e23;color:#e2cba5;font-size:11px;line-height:1.5}
.anchor-notice p{color:#c7baa0;margin-top:3px}
.empty-workspace{max-width:460px;margin:auto;padding:30px;text-align:center}
.empty-symbol{font-size:36px;color:var(--accent);margin-bottom:20px}
.empty-workspace h1{margin-bottom:13px}
.empty-workspace>p:not(.eyebrow){font-size:13px;color:var(--muted);line-height:1.7;margin-bottom:22px}

/* Inline row editing keeps the register grid and is styled when JS enables it. */
.register-table tr.editing-row td,.register-table tr.is-editing td{background:#343d45;height:auto;overflow:visible;vertical-align:top}
.register-table td input,.register-table td select{height:26px;min-height:0;min-width:0;margin:0;padding:3px 5px;border-radius:3px;font-size:11px;border-color:#6086a2;background:#20272c}
.register-table td input[type=checkbox]{width:16px;height:16px;margin:5px auto}
.register-table .inline-edit-actions{display:flex;align-items:center;gap:5px;white-space:normal}
.register-table .inline-edit-error{font-size:10px;color:var(--red);white-space:normal;line-height:1.4}

/* Auth and existing dialogs retain their complete controls and forms. */
.login-view{height:100dvh;overflow:auto;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:36px 22px;background:#202020}
.login-card{width:min(430px,100%);padding:36px;background:#2b2b2b;border:1px solid #4c4c4c;border-radius:12px;box-shadow:0 18px 70px #0004}
.login-card h1{font-size:30px;line-height:1.2;margin:15px 0}
.login-copy{font-size:14px;color:var(--muted);line-height:1.6;max-width:310px}
.login-divider{height:1px;background:var(--line);margin:26px 0 22px}
.login-label{font-size:11px;color:var(--muted);margin-bottom:7px}
.allowed-email{font-size:13px;margin-bottom:20px;overflow-wrap:anywhere}
.login-footer{color:var(--subtle);font-size:11px;margin-top:22px;line-height:1.5}
.login-wordmark{margin-top:24px;color:var(--subtle);font-size:11px}
.login-card .form-message{margin-top:14px}
.noscript{position:fixed;bottom:20px;left:20px;right:20px;background:var(--surface-raised);padding:20px;border:1px solid var(--line)}
dialog{width:min(540px,calc(100vw - 28px));max-height:calc(100dvh - 32px);padding:0;overflow:auto;border:1px solid #595959;border-radius:9px;background:#282828;color:var(--text);box-shadow:0 25px 100px #000a}
dialog::backdrop{background:#080808a8;backdrop-filter:blur(2px)}
dialog form,.dialog-body{padding:24px}
dialog.wide-dialog{width:min(720px,calc(100vw - 28px))}
.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:10px}
.dialog-heading h2{font-size:19px;font-weight:500;letter-spacing:-.2px}
.dialog-description{font-size:12px;color:var(--muted);line-height:1.65;margin-bottom:22px}
.dialog-description strong{font-weight:500;color:var(--text)}
label{display:block;font-size:11px;color:#d0d0d0;margin:0 0 15px}
input,select,textarea{display:block;width:100%;min-height:36px;background:var(--input);border:1px solid #535353;border-radius:5px;color:var(--text);padding:8px 10px;margin-top:6px;font-size:12px}
input::placeholder,textarea::placeholder{color:#888}
select{padding-right:26px}
textarea{resize:vertical;min-height:140px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;line-height:1.6}
input[type=file]{padding:7px;font-size:11px}
input[type=file]::file-selector-button{font:inherit;border:0;border-radius:3px;background:#444;color:var(--text);padding:5px 9px;margin-right:10px}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:15px}
.field-help{font-size:11px;color:var(--muted);line-height:1.65;margin:-1px 0 16px}
.field-help code{font-size:10px;color:#c4ccd3}
.dialog-actions{display:flex;align-items:center;gap:8px;justify-content:flex-end;border-top:1px solid var(--line);padding-top:18px;margin-top:20px}
.dialog-actions.spread{justify-content:space-between;gap:10px;flex-wrap:wrap}
.dialog-actions>div,.settings-actions{display:flex;gap:8px}
.form-message{font-size:12px;line-height:1.6;color:var(--red);overflow-wrap:anywhere}
.form-message:empty{display:none}
.reconciliation-summary{margin:18px 0 13px;border:1px solid var(--line);border-radius:5px;padding:5px 14px;background:var(--input)}
.reconciliation-summary>div{display:flex;justify-content:space-between;gap:14px;padding:11px 0;font-size:12px}
.reconciliation-summary dt{color:var(--muted)}
.reconciliation-summary dd{margin:0;font-variant-numeric:tabular-nums}
.reconciliation-summary .difference{border-top:1px solid var(--line);font-weight:600}
.column-options{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}
.column-options label{display:flex;align-items:center;gap:9px;min-height:29px;margin:0 0 7px}
.column-options input{appearance:auto;display:inline-block;flex:none;width:16px;height:16px;min-height:0;margin:0;padding:0;accent-color:var(--accent)}
.bank-review-dialog{width:min(1500px,calc(100vw - 32px))!important}
.bank-review-list{display:block;min-width:0;min-height:0}
.bank-review-card{padding:16px;border:1px solid var(--line);border-radius:6px;background:#202020}
.review-card-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:11px}
.review-card-heading>div{min-width:0}
.review-card-heading h3{font-size:13px;line-height:1.5;font-weight:600;overflow-wrap:anywhere}
.review-card-context{font-size:11px;line-height:1.6;color:var(--muted);margin-top:4px}
.review-amount{font-size:16px;font-weight:500;white-space:nowrap;font-variant-numeric:tabular-nums}
.review-reason{font-size:11px;line-height:1.65;color:var(--muted);margin:10px 0 0}
.review-match-label{margin:16px 0 11px}
.review-match-label select{min-width:0;width:100%}
.review-card-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:15px}
.review-card-actions .quiet{margin-left:auto}
.review-feedback{font-size:12px;line-height:1.6;color:#acc89b;margin:11px 0}
.review-feedback:empty{display:none}
.review-empty{font-size:13px;line-height:1.7;text-align:center;padding:25px 12px;color:var(--muted)}
.memo-note{color:var(--muted);white-space:pre-line;overflow-wrap:anywhere}
.transfer-note{color:var(--blue);overflow-wrap:anywhere}

@media(min-width:1800px){
  :root{--row-height:33px}
  .register-table{font-size:13px}
  .account-name,.account-balance{font-size:12px}
  .register-table th{font-size:11px}
  .page-heading{min-height:88px}
}
@media(max-width:1100px){
  .app-shell{grid-template-columns:190px minmax(0,1fr)}
  .session>span{display:none}
  .account-tab{padding:5px 7px;font-size:11px}
  .search-field{width:230px;min-width:120px}
  .register-filters{gap:8px}
  .filter-controls{gap:5px}
  .filter-controls select{width:110px;max-width:none}
  .filter-controls label:first-child select{width:130px;max-width:none}
  .register-count{font-size:9px}
  .page-heading{padding:14px}
  .page-heading h1{font-size:21px}
  .page-heading .muted{font-size:10px}
}
@media(max-width:760px){
  .app-shell{grid-template-columns:160px minmax(0,1fr)}
  .account-button{padding-left:14px;padding-right:7px}
  .account-button>span:last-child:not(.account-balance){gap:5px}
  .account-name,.account-balance{font-size:10px}
  .sidebar-footer{padding:9px 7px}
  .sidebar-footer .button{font-size:9px}
  .account-navigation{flex-wrap:wrap;gap:5px}
  .account-tabs{width:100%;justify-content:space-between}
  .search-field{width:100%;height:26px;min-width:0}
  .register-filters{align-items:flex-start;flex-wrap:wrap;padding:5px 8px;gap:5px}
  .filter-controls{flex:1;width:100%}
  .filter-controls label{flex:1}
  .filter-controls select,.filter-controls label:first-child select{width:100%;max-width:none;font-size:10px;padding-left:6px}
  .register-count{width:100%;justify-content:flex-end;min-height:12px}
  .page-heading{gap:8px;padding:12px 10px;min-height:72px}
  .page-heading h1{font-size:18px}
  .page-heading .muted{max-width:210px;font-size:9px}
  .today-balance>span{font-size:9px}
  .today-balance>strong{font-size:19px}
  .topbar{padding:0 9px}
}
@media(max-width:580px){
  .app-shell{display:flex;flex-direction:column}
  .sidebar{flex:none;max-height:132px;border-right:0;border-bottom:1px solid #4c4c4c;display:grid;grid-template-columns:1fr auto;grid-template-rows:29px auto;overflow:hidden}
  .sidebar-top{height:29px;grid-column:1;padding:0 9px;border:0;justify-content:flex-start;gap:12px}
  .brand{font-size:12px}
  .brand-mark.small{width:15px;height:15px}
  .all-accounts-button{grid-column:2;grid-row:1;width:auto;min-height:29px;font-size:10px;padding:5px 10px}
  .sidebar-heading,.sidebar-total,.sidebar-empty{display:none}
  .account-list{grid-column:1/-1;grid-row:2;flex-direction:row;gap:4px;padding:3px 7px 6px;overflow-x:auto;overflow-y:hidden;min-height:34px;max-height:52px}
  .account-group{display:contents}
  .account-group-label,.account-group-heading,.account-list h3{display:none}
  .account-button{width:auto;min-width:138px;flex:none;padding:5px 7px;border-radius:4px}
  .account-button>span:last-child:not(.account-balance){display:block}
  .account-balance{font-size:10px;line-height:15px;margin:1px 0 0}
  .sidebar-footer{grid-column:1/-1;grid-row:3;display:flex;gap:6px;margin:0;padding:0 7px 6px}
  .sidebar-footer .button{flex:1;width:auto;min-height:23px;padding:1px 6px}
  .review-downloads-button{margin-top:0}
  .connection-details{display:none}
  .workspace{flex:1;min-height:0}
  .topbar{min-height:27px}
  .breadcrumb{font-size:9px}
  .session .button{min-height:22px;font-size:9px}
  .page-heading{min-height:61px;padding:9px 10px}
  .page-heading h1{font-size:18px}
  .page-heading .muted{max-width:240px;font-size:9px;margin-top:3px}
  .today-balance>strong{font-size:20px}
  .account-navigation{padding:4px 7px}
  .account-tab{font-size:11px;padding:4px 7px}
  .register-footer{padding-left:3px;padding-right:3px;min-height:47px;padding-bottom:max(2px,env(safe-area-inset-bottom))}
  .register-tools{min-width:560px;gap:6px;min-height:42px}
  .toolbar-button{font-size:9px;min-width:42px;min-height:40px;padding:1px 4px}
  .toolbar-icon{font-size:19px;height:20px;line-height:20px}
  .app-status{font-size:10px;padding:5px 9px}
  .anchor-notice{padding:8px 9px;font-size:10px}
  .anchor-notice p{display:none}
  dialog form,.dialog-body{padding:20px}
  .dialog-heading h2{font-size:18px}
  .form-row{gap:10px}
  .dialog-actions.spread>div{margin-left:auto}
  .login-card{padding:27px}
  .login-card h1{font-size:27px}
  .login-wordmark{font-size:10px;text-align:center}
  .bank-review-card{padding:13px}
  .review-card-heading{flex-wrap:wrap;gap:9px}
  .review-card-actions .button{flex:1}
  .review-card-actions .quiet{margin-left:0}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
@media print{
  :root{color-scheme:light;--text:#111;--bg:#fff;--line:#bbb;--green:#44722e}
  html{height:auto;overflow:visible}
  body{height:auto;overflow:visible;background:white;color:#111}
  .sidebar,.topbar,.account-navigation,.register-filters,.register-footer,.app-status,.anchor-notice,dialog,.skip-link,.login-view{display:none!important}
  .app-shell,.workspace,main,#account-workspace,.register-panel,#register-scroll{position:static;inset:auto;display:block;height:auto;overflow:visible;min-height:0;max-height:none}
  .page-heading{background:white;padding:10px 0;color:#111}
  .page-heading .muted,.today-balance>span{color:#555}
  .register-table{min-width:0;width:100%;font-size:8px;table-layout:auto}
  .register-table col{width:auto}
  .register-table th{position:static;background:#eee;color:#333;font-size:7px;padding:4px 3px}
  .register-table td,.register-table tbody tr:nth-child(even) td,.register-table tbody tr[aria-selected=true] td{height:auto;padding:4px 3px;line-height:1.4;background:white;color:#111;border-bottom:1px solid #ddd}
  .register-table .scheduled-row td,.register-table .planned-row td,.register-table .future-row td{color:#666}
  .register-table .inflow,.register-table .positive,.register-table .negative{color:#111}
  .register-table thead{display:table-header-group}
  .register-table tr{break-inside:avoid}
}

/* Integration hooks for selection, inline editing, and register actions. */
.today-jump{display:grid;place-items:center;flex:none;width:24px;height:24px;margin-left:2px;border:0;border-radius:4px;background:transparent;color:#b6b6b6;font-size:19px;line-height:1}
.today-jump:hover{background:#424242;color:#eee}
.register-table tbody tr.selected-row td{background:#454545}
.transaction-indicator{display:inline-grid;place-items:center;width:17px;height:20px;padding:0;border:0;border-radius:2px;background:transparent;font-size:15px;line-height:20px;color:#b6b6b6;vertical-align:middle}
.transaction-indicator.manual{color:#c48e69}
.transaction-indicator.downloaded{color:#439de1}
.transaction-indicator.scheduled{color:#929292}
.transaction-indicator.pending{color:#c5aa7e}
.register-table tr.inline-editing td{height:auto;max-height:none;overflow:visible;background:#343d45;vertical-align:top}
.register-table .inline-editing td input,.register-table .inline-editing td select{height:26px;min-height:0;min-width:0;width:100%;margin:0;padding:3px 5px;border-radius:3px;font-size:11px;border-color:#6086a2;background:#20272c}
.inline-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.inline-actions .button{min-height:25px;font-size:10px;line-height:15px;padding:4px 8px}
.register-table .inline-error-row td{height:auto;max-height:none;white-space:normal;line-height:1.5;color:#ecc0b9;background:#3b2928;padding:6px 10px}
.split-editor-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr) 110px 32px;gap:8px;align-items:end;margin:0 0 10px}
.split-editor-row label{margin:0;min-width:0}
.split-editor-row input,.split-editor-row select{min-width:0;margin-top:4px}
.split-editor-row button{height:36px;min-width:30px;padding:4px}
.settings-actions{flex-wrap:wrap}
@media(max-width:580px){
  .split-editor-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 85px 29px;gap:5px}
  .split-editor-row input,.split-editor-row select{font-size:11px;padding-left:6px;padding-right:6px}
  .today-jump{height:19px;width:22px;font-size:17px}
}

.balance-view{flex:1;min-height:0;overflow:auto;padding:20px;background:#202020}
.balance-view h2{font-size:15px;font-weight:500;margin-bottom:15px}
.balance-view svg{display:block;width:100%;height:auto;max-height:65dvh;min-height:220px}
.balance-view p{font-size:11px;line-height:1.6;margin-top:12px}
.account-row-context{display:inline;margin-left:7px;color:#a0a0a0;font-size:9px}
@media print{.register-table tbody tr.selected-row td,.register-table tbody tr.stripe-gray td,.register-table tbody tr.stripe-dark td{background:white;color:#111}.balance-view{overflow:visible;padding:10px;background:white}.balance-view svg{max-height:none}}

/* Action rows are taller than transaction rows; keep every control reachable. */
.register-table tbody tr.inline-action-row td{height:auto;max-height:none;padding:7px 10px;overflow:visible;white-space:normal;line-height:1.5;background:#303943}
.inline-actions .field-help{flex:1 1 230px;margin:0;font-size:10px;line-height:1.45}
.inline-status-label{display:flex;align-items:center;gap:6px;margin:0;font-size:10px;white-space:nowrap}
.register-table .inline-status-label select{display:inline-block;width:auto;min-width:100px;height:26px;min-height:0;margin:0;padding:3px 23px 3px 6px;font-size:10px}
.inline-action-row .form-message:not(:empty){margin-top:6px}
.register-table .inline-editing input[readonly]{color:#b0b0b0;border-color:#525c63;background:#2b3136}
.split-editor-row{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr) 110px 64px}
.split-editor-row button{padding:4px 6px;font-size:11px}
.deleted-entry{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:11px 0;border-bottom:1px solid var(--line);font-size:12px;line-height:1.5}
.deleted-entry:last-child{border-bottom:0}
.deleted-entry>span{min-width:0;overflow-wrap:anywhere}
.deleted-entry>.button{flex:none}
.checkbox-label{display:flex;align-items:center;gap:9px;line-height:1.5}
.checkbox-label input[type=checkbox]{display:inline-block;flex:none;width:16px;height:16px;min-height:0;margin:0;padding:0;accent-color:var(--accent)}
.register-table th[aria-sort=ascending] button>span[aria-hidden]{transform:rotate(180deg)}
@media(max-width:580px){
  .account-button{flex-direction:column;align-items:flex-start;gap:0}
  .account-button .account-name{width:100%}
  .split-editor-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:5px 8px;padding-bottom:9px;border-bottom:1px solid var(--line)}
  .split-editor-row button{justify-self:end;width:auto;min-width:64px}
  .deleted-entry{gap:10px;font-size:11px}
}
@media print{
  .register-table{table-layout:fixed;white-space:normal}
  .register-table th,.register-table td{white-space:normal;overflow-wrap:anywhere;text-overflow:clip;overflow:visible}
  .register-table .payee,.register-table .category,.register-table .transfer,.register-table .memo{white-space:normal;color:inherit}
  .register-table col.column-status{width:2%}.register-table col.column-date{width:8%}.register-table col.column-payee{width:15%}.register-table col.column-category{width:12%}.register-table col.column-transfer{width:12%}.register-table col.column-payment{width:8%}.register-table col.column-deposit{width:8%}.register-table col.column-amount{width:8%}.register-table col.column-balance{width:10%}.register-table col.column-memo{width:17%}
  .account-row-context{display:block;margin-left:0;color:#555}
}
/* Native date editors need room for both the full date and calendar control. */
#register-scroll{overflow-anchor:none}
.inline-more-fields{margin-top:10px;font-size:12px;white-space:normal}
.inline-more-fields summary{cursor:pointer;padding:5px 0;color:#b9d6eb}
.inline-more-fields .form-row{margin-top:10px;max-width:700px}
.register-table .inline-more-fields input,.register-table .inline-more-fields select{height:36px;min-height:36px;font-size:13px}

/* Position each menu/submenu panel independently so viewport scrolling cannot clip it. */
.register-context-menu,.register-context-submenu{
  position:fixed;z-index:1000;left:8px;top:8px;
  width:clamp(240px,24vw,340px);max-width:calc(100vw - 16px);
  max-height:calc(100dvh - 16px);overflow-x:hidden;overflow-y:auto;
  overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#777 #303030;
  margin:0;padding:5px;list-style:none;border:1px solid #626262;border-radius:7px;
  background:rgba(43,43,43,.98);color:#ededed;
  box-shadow:0 9px 28px #0008,0 1px 4px #0005;
  font-size:12px;line-height:1.4;text-align:left;
}
.register-context-submenu{z-index:1001}
.register-context-menu[hidden],.register-context-submenu[hidden]{display:none!important}
.context-menu-item{
  display:flex;align-items:center;gap:9px;width:100%;min-height:29px;
  margin:0;padding:5px 9px;border:0;border-radius:4px;
  background:transparent;color:inherit;font:inherit;line-height:1.4;
  text-align:left;white-space:normal;overflow-wrap:anywhere;cursor:pointer;
}
.context-menu-item:not(:disabled):not([aria-disabled=true]):is(:hover,:focus-visible){background:#226caa;color:#fff}
.context-menu-item:focus-visible{outline:2px solid #a1cff0;outline-offset:-2px}
.context-menu-item:disabled,.context-menu-item[aria-disabled=true]{background:transparent;color:#969696;opacity:.7;cursor:default}
.context-menu-item[aria-disabled=true]:focus-visible{outline-color:#858585}
.context-menu-item[aria-haspopup=menu]:after{content:"›";flex:none;margin-left:auto;padding-left:6px;font-size:18px;line-height:1}
.context-menu-item[aria-expanded=true]:not(:disabled):not([aria-disabled=true]){background:#3e5365}
.context-menu-item.danger{color:#efaaa3}
.context-menu-item.danger:not(:disabled):not([aria-disabled=true]):is(:hover,:focus-visible){color:#fff}
.context-menu-separator{display:block;height:0;margin:5px 4px;padding:0;border:0;border-top:1px solid #575757}
.context-menu-hint{color:#acacac;font-size:10px;font-weight:400;line-height:1.4}
.context-menu-item .context-menu-hint{flex:none;margin-left:auto;white-space:nowrap}
.context-menu-item:is(:hover,:focus-visible) .context-menu-hint{color:inherit}
.register-context-menu>.context-menu-hint,.register-context-submenu>.context-menu-hint{padding:4px 9px 6px;white-space:normal;overflow-wrap:anywhere}

/* Shared batch confirmation detail; existing dialog actions and alerts apply. */
.batch-dialog-summary{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:6px 16px;margin:8px 0 14px;font-size:12px;line-height:1.6}
.batch-selection-count{font-weight:600;font-variant-numeric:tabular-nums;color:var(--text)}
.batch-selection-list{display:flex;flex-direction:column;max-height:min(40dvh,360px);overflow:auto;overscroll-behavior:contain;margin:0 0 16px;padding:0;list-style:none;border:1px solid var(--line);border-radius:5px;scrollbar-width:thin;scrollbar-color:#666 #262626}
.batch-selection-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 14px;padding:10px 12px;border-bottom:1px solid #414141;font-size:12px;line-height:1.5}
.batch-selection-item:last-child{border-bottom:0}
.batch-selection-item>span:first-child{min-width:0;overflow-wrap:anywhere}
.batch-selection-item .number{font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}
.batch-selection-reason{grid-column:1/-1;color:var(--muted);font-size:11px;line-height:1.5}
.batch-selection-item[aria-disabled=true],.batch-selection-item.is-excluded{color:#a1a1a1;background:#252525}
.batch-selection-warning{margin:10px 0 15px;padding:9px 11px;border:1px solid #716047;border-radius:5px;background:#342f25;color:#e1cda9;font-size:11px;line-height:1.6}
@media(pointer:coarse){.context-menu-item{min-height:40px;padding-top:9px;padding-bottom:9px}}
@media(max-width:580px){
  .register-context-menu,.register-context-submenu{width:280px;max-width:calc(100vw - 16px)}
  .batch-selection-item{gap:3px 9px;padding:9px;font-size:11px}
}
@media print{.register-context-menu,.register-context-submenu{display:none!important}}

/* Balance tab: all selectors are scoped to the projection view. */
.projection-view{padding:20px 24px 28px;background:#242424;overflow:auto;scrollbar-width:thin}
.projection-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.projection-heading .projection-title{margin:0;font-size:17px;font-weight:500;letter-spacing:-.15px}
.projection-range{color:#b7b7b7;font-size:11px;white-space:nowrap}
.projection-controls{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin:0 0 18px}
.projection-filter{display:flex;flex-direction:column;gap:5px;min-width:135px;margin:0;color:#c5c5c5;font-size:10px;line-height:1.4}
.projection-filter .projection-select{width:auto;max-width:280px;min-width:135px;height:30px;min-height:30px;margin:0;padding:4px 28px 4px 9px;border:1px solid #555;border-radius:4px;background:#303030;color:#eee;font-size:12px}
.projection-clear{height:30px;margin:0 0 0 2px;padding:4px 2px;border:0;background:transparent;color:#9fcaea;font-size:11px;white-space:nowrap}
.projection-clear:hover{text-decoration:underline;color:#c6e5fa}
.projection-summary{display:flex;flex-wrap:wrap;gap:22px 48px;margin:0 0 14px;padding:13px 0 15px;border-top:1px solid #414141;border-bottom:1px solid #414141}
.projection-stat{min-width:125px}
.projection-stat dt{font-size:11px;color:#b6b6b6;margin:0 0 5px;font-weight:400}
.projection-stat dd{margin:0;font-size:20px;font-weight:500;letter-spacing:-.3px;font-variant-numeric:tabular-nums;color:#ededed}
.projection-stat dd.projection-negative,.projection-negative,.projection-view .projection-note.projection-negative{color:#eaa89e}
.projection-stat dd.projection-positive{color:#69d660}
.projection-chart{position:relative;width:100%;margin:4px 0 0;isolation:isolate}
.projection-chart svg{display:block;width:100%;min-width:0;min-height:0;max-height:none;overflow:visible}
.projection-chart-tools{display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap;margin:0 0 8px}
.projection-chart-tools .projection-filter{min-width:100px}
.projection-chart-tools .projection-select{min-width:100px;max-width:150px}
.projection-chart-button{display:inline-flex;align-items:center;justify-content:center;gap:5px;flex:none;min-width:32px;min-height:32px;height:32px;margin:0;padding:5px 10px;border:1px solid #555;border-radius:6px;background:#303030;color:#eee;font-size:12px;line-height:1.2;white-space:nowrap;transition:background .12s ease,border-color .12s ease}
.projection-chart-button:hover:not(:disabled){border-color:#aaa;background:#3c3c3c}
.projection-chart-button:focus-visible{outline:2px solid #449bda;outline-offset:2px}
.projection-chart-button:disabled{opacity:.4;cursor:default}
.projection-chart-button .app-icon{width:16px;height:16px;margin:0}
.projection-window-label{align-self:center;flex:1;min-width:140px;margin-left:4px;color:#b7b7b7;font-size:11px;line-height:1.4;font-variant-numeric:tabular-nums}
.projection-resize-handle{position:relative;display:block;flex:none;width:100%;height:16px;min-height:16px;margin:0;padding:0;border:0;border-radius:4px;background:transparent;cursor:row-resize;touch-action:none;user-select:none;-webkit-user-select:none}
.projection-resize-handle::before{content:"";position:absolute;left:0;right:0;top:50%;height:1px;background:#444}
.projection-resize-handle::after{content:"";position:absolute;left:50%;top:50%;width:38px;height:4px;border:3px solid #242424;border-radius:6px;background:#aaa;box-sizing:content-box;transform:translate(-50%,-50%)}
.projection-resize-handle:hover::after,.projection-resize-handle:focus-visible::after,.projection-resize-handle.is-resizing::after,.projection-view.is-resizing .projection-resize-handle::after{background:#449bda}
.projection-resize-handle:focus-visible{outline:2px solid #449bda;outline-offset:0}
.projection-view.is-resizing{cursor:row-resize;user-select:none;-webkit-user-select:none}
.projection-grid{stroke:#444;stroke-width:1;vector-effect:non-scaling-stroke}
.projection-month-grid{stroke:#3a3a3a}
.projection-axis-text{fill:#bebebe;font-size:12px;font-family:inherit;font-variant-numeric:tabular-nums}
.projection-zero-line{stroke:#a2a2a2;stroke-width:1.2;vector-effect:non-scaling-stroke}
.projection-zero-label{fill:#ededed;font-weight:600}
.projection-fill{fill:#58cf50;fill-opacity:.33;stroke:none}
.projection-line{stroke:#58cf50;stroke-width:1.8;fill:none;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.projection-negative-fill{fill:#e89992;fill-opacity:.23;stroke:none}
.projection-negative-line{stroke:#e89992;stroke-width:2;fill:none;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.projection-point{fill:#83e778;stroke:#2c3925;stroke-width:1;cursor:pointer;vector-effect:non-scaling-stroke}
.projection-point.is-negative{fill:#e89992;stroke:#242424}
.projection-point:hover,.projection-point:focus-visible{fill:#e1f6bc;stroke:#d8f1b5;stroke-width:2;outline:none;r:5px}
.projection-point.is-negative:hover,.projection-point.is-negative:focus-visible{fill:#e89992;stroke:#ededed}
.projection-tooltip{position:absolute;z-index:2;display:flex;flex-direction:column;gap:3px;max-width:min(280px,calc(100% - 12px));padding:10px 12px;border:1px solid #707766;border-radius:5px;background:#20261ff5;color:#f0f3ed;box-shadow:0 4px 12px #0006;pointer-events:none;font-size:11px;line-height:1.4;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.projection-tooltip strong{font-size:12px;margin-bottom:2px;font-weight:600}
.projection-chart-footer{display:flex;justify-content:space-between;align-items:center;gap:10px 18px;flex-wrap:wrap;padding:7px 0 15px;border-bottom:1px solid #414141}
.projection-zero{display:flex;align-items:center;gap:7px;margin:0;color:#c5c5c5;font-size:11px;white-space:nowrap}
.projection-zero input[type=checkbox]{appearance:auto;display:inline-block;width:13px;height:13px;min-height:0;margin:0;padding:0;accent-color:#7daf56}
.projection-view .projection-note{margin:0;padding:7px 0;font-size:10px;line-height:1.6;color:#aeb2aa}
.projection-table-heading{display:flex;align-items:baseline;justify-content:space-between;gap:14px;padding:18px 0 9px}
.projection-table-title{margin:0;color:#ddd;font-size:13px;font-weight:500}
.projection-count{font-size:10px;color:#aaa}
.projection-view .projection-table-hint{display:none;margin:0;padding:0 0 8px;font-size:10px;line-height:1.5;color:#b5b5b5}
.projection-table-scroll{width:100%;overflow-x:auto;border:1px solid #464646;border-radius:4px;scrollbar-width:thin}
.projection-table{width:100%;border-collapse:collapse;table-layout:auto;font-size:11px;line-height:1.5;white-space:nowrap}
.projection-table th{padding:8px 11px;background:#353535;color:#c5c5c5;text-align:left;font-size:10px;font-weight:500;border-bottom:1px solid #505050}
.projection-table td{padding:8px 11px;border-bottom:1px solid #3e3e3e;color:#ddd}
.projection-table th:nth-child(4),.projection-table th:nth-child(5),.projection-table td.projection-money{text-align:right;font-variant-numeric:tabular-nums}
.projection-table td.projection-negative{color:#e4aa9f}
.projection-table td:nth-child(2){width:35%;min-width:160px;max-width:340px;overflow:hidden;text-overflow:ellipsis}
.projection-table-row{cursor:pointer;background:#282828}
.projection-table-row:nth-child(even){background:#2c2c2c}
.projection-table-row:hover,.projection-table-row:focus-visible{background:#33402e;outline:1px solid #83ac60;outline-offset:-1px}
.projection-table tr:last-child td{border-bottom:0}
.projection-due-note{display:block;font-size:9px;color:#b5a991}
.projection-table td.projection-empty{padding:22px;text-align:center;color:#b3b3b3;white-space:normal}
@media(pointer:coarse){
  .projection-filter .projection-select,.projection-clear,.projection-chart-button{min-height:44px;height:44px;font-size:16px}
  .projection-chart-button{min-width:44px}
  .projection-resize-handle{height:24px;min-height:24px}
  .projection-table td{height:44px;padding-top:10px;padding-bottom:10px}
  .projection-zero{min-height:44px}
}
@media(max-width:850px){
  .projection-view{padding:16px}
  .projection-controls{gap:10px}
  .projection-summary{gap:16px 28px}
  .projection-stat dd{font-size:18px}
}
@media(max-width:580px){
  .projection-view{padding:14px 10px}
  .projection-heading{gap:5px;margin-bottom:12px}
  .projection-heading .projection-title{font-size:15px}
  .projection-range{font-size:10px}
  .projection-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px}
  .projection-filter{min-width:0}
  .projection-filter .projection-select{width:100%;min-width:0;max-width:100%;min-height:44px;height:44px;font-size:16px}
  .projection-clear{min-height:44px;height:44px;font-size:16px}
  .projection-clear{justify-self:start}
  .projection-summary{gap:12px;justify-content:space-between;padding:11px 0}
  .projection-stat{min-width:0}
  .projection-stat dt{font-size:9px}
  .projection-stat dd{font-size:15px;letter-spacing:-.4px}
  .projection-chart{overflow:visible}
  .projection-chart svg{width:100%;min-width:0;min-height:0}
  .projection-chart-tools{gap:7px}
  .projection-chart-tools .projection-filter{flex:1;min-width:100px;max-width:180px}
  .projection-chart-tools .projection-select{max-width:none}
  .projection-chart-button{height:44px;min-height:44px;min-width:44px;padding:6px 10px;font-size:14px}
  .projection-window-label{order:1;flex-basis:100%;margin:3px 0 0;font-size:11px}
  .projection-resize-handle{height:24px;min-height:24px}
  .projection-view .projection-table-hint{display:block}
  .projection-chart-footer{gap:1px;padding-bottom:10px}
  .projection-table td,.projection-table th{padding:7px 9px}
}
@media print{
  .projection-view{padding:12px;background:white;overflow:visible;color:#111}
  .projection-controls,.projection-zero,.projection-tooltip,.projection-chart-tools,.projection-resize-handle{display:none!important}
  .projection-heading .projection-title,.projection-stat dd,.projection-table-title{color:#111}
  .projection-axis-text{fill:#444}.projection-grid{stroke:#ddd}
  .projection-table-scroll{overflow:visible}.projection-table td,.projection-table th{background:white;color:#111}
  .projection-chart svg{max-height:none;min-width:0}
}
@media(prefers-reduced-motion:reduce){.projection-chart-button{transition:none}}

/* Stable authentication screen; hosted sign-in uses Google's HTML artwork. */
.startup-view{position:fixed;inset:0;z-index:30;display:flex;flex-direction:column;gap:20px;align-items:center;justify-content:center;background:#202020;color:#bcbcbc;font-size:14px}
.startup-recovery{visibility:hidden;margin:0;font-size:13px;animation:startup-recovery-show 0s 15s forwards}
.startup-recovery a{color:inherit;text-decoration:underline;text-underline-offset:3px}
@keyframes startup-recovery-show{to{visibility:visible}}
.login-logo{display:block;margin-bottom:24px}
.google-signin{width:100%;min-height:44px;display:flex;justify-content:center;margin-top:22px}
.google-redirect-button{appearance:none;box-sizing:border-box;display:grid;grid-template-columns:18px minmax(0,1fr) 18px;align-items:center;column-gap:10px;width:320px;max-width:100%;min-width:0;height:40px;min-height:40px;margin:0;padding:0 12px;border:1px solid #747775;border-radius:20px;background:#fff;color:#1f1f1f;cursor:pointer;font-family:'Google Sans',Roboto,Arial,sans-serif;font-size:14px;font-weight:500;line-height:20px;letter-spacing:.25px;text-align:center;text-decoration:none;white-space:nowrap;transition:background-color .18s,border-color .18s,box-shadow .18s}
.google-redirect-button svg{display:block;width:18px;height:18px;flex:none}
.google-redirect-label{overflow:hidden;text-overflow:ellipsis}
.google-redirect-button:hover{background:#f8faff;border-color:#a7b7d1;box-shadow:0 1px 2px #3c404326}
.google-redirect-button:active{background:#e8f0fe}
.google-redirect-button:focus-visible{outline:3px solid var(--accent,#1685ca);outline-offset:4px}
@media(prefers-reduced-motion:reduce){.google-redirect-button{transition:none}}
.login-card #login-status{min-height:24px;margin-top:14px;line-height:1.5;overflow-wrap:anywhere}
.login-card{max-width:calc(100vw - 32px)}
.login-footer{line-height:1.6}
@media(max-width:680px){.login-view{padding:20px 0;overflow:auto}.login-card{padding:26px 22px}.login-card h1{font-size:27px}.login-copy{font-size:14px}.login-label,.allowed-email,.login-footer{font-size:13px}.login-wordmark{max-width:calc(100% - 36px)}.google-signin{min-width:0}}

/* Mobile register: the same records, editing draft, and authenticated actions.
   Desktop columns and saved column preferences are intentionally unaffected. */
.mobile-account-bar,.mobile-selection-toggle,.mobile-filters-toggle,.mobile-clear-selection,.mobile-row-selection,.mobile-row-actions,.mobile-toolbar-more,.mobile-menu-reason{display:none}
@media screen and (max-width:680px){
  html,body{overscroll-behavior:none;overflow:hidden}
  body{position:fixed;inset:0;width:100%;height:100%}
  .app-shell{display:flex;flex-direction:column;width:100%;height:var(--mobile-shell-height,100dvh);padding-top:env(safe-area-inset-top);overflow:hidden}
  .sidebar{display:block;flex:none;max-height:none;overflow:visible;border-right:0;border-bottom:1px solid var(--line)}
  .sidebar>:not(.mobile-account-bar){display:none!important}
  .mobile-account-bar{display:flex;align-items:center;gap:8px;padding:6px max(10px,env(safe-area-inset-right)) 6px max(10px,env(safe-area-inset-left))}
  .mobile-account-label{flex:1;min-width:0;margin:0}
  .mobile-account-label select{width:100%;height:44px;min-height:44px;margin:0;font-size:16px;padding:8px 30px 8px 10px;overflow:hidden;text-overflow:ellipsis}
  .mobile-workspace-menu{flex:none;width:44px;height:44px;font-size:23px}
  .workspace{flex:1;min-height:0;width:100%}
  .topbar{display:none}
  .page-heading{align-items:center;gap:10px;min-height:64px;padding:10px 12px}
  .page-heading h1{font-size:19px;white-space:normal;overflow-wrap:anywhere;line-height:1.2}
  .page-heading .muted{font-size:11px;max-width:none}
  .today-balance{max-width:48%}
  .today-balance>span{font-size:11px}
  .today-balance>strong{font-size:21px;overflow-wrap:anywhere}
  .account-navigation{padding:3px 8px 7px;gap:4px;flex-wrap:wrap}
  .account-tabs{width:100%;gap:2px;justify-content:space-between}
  .account-tab{flex:1;min-width:0;min-height:44px;padding:6px 4px;font-size:13px}
  .search-field{width:100%;min-width:0;min-height:44px;border-radius:7px}
  .search-field input{height:40px;min-height:40px;font-size:16px;padding:6px 0}
  .register-filters{padding:5px 8px;gap:3px;flex-wrap:wrap}
  .filter-controls{width:100%;gap:5px}
  .filter-controls label{flex:1;min-width:0}
  .filter-controls select,.filter-controls label:first-child select{width:100%;max-width:none;min-width:0;min-height:44px;height:44px;margin:0;font-size:16px;padding:7px 20px 7px 6px}
  .register-count{width:100%;min-height:44px;gap:6px;font-size:12px;justify-content:flex-start;white-space:normal}
  .mobile-selection-toggle,.mobile-filters-toggle,.mobile-clear-selection{display:inline-flex;align-items:center;justify-content:center;min-height:44px;font-size:14px;padding:6px 10px}
  .mobile-filters-toggle[aria-expanded=true]{background:#245c83;color:white}
  .app-shell:not(.mobile-filters-open) .search-field,.app-shell:not(.mobile-filters-open) .filter-controls{display:none}
  .app-shell:has(#tab-balance[aria-selected=true]) .search-field{display:flex}
  .mobile-selection-toggle[aria-pressed=true]{background:#245c83;color:white}
  #row-count{margin-left:auto;font-size:11px}
  #selection-summary{font-size:12px}
  .today-jump{height:44px;width:44px;font-size:23px}
  #register-scroll{overflow-x:hidden;overscroll-behavior:none;scroll-padding-block:10px 70px}
  .register-table{display:block;width:100%;min-width:0;max-width:100%;font-size:14px;white-space:normal;table-layout:auto}
  .register-table colgroup{display:none}
  .register-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  #register-body{display:block;width:100%}
  #register-body tr[data-row-id]{display:grid;grid-template-columns:44px minmax(0,1fr) minmax(70px,auto) 44px;grid-template-areas:'status date date actions' 'payee payee amount amount' 'category category balance balance' 'transfer transfer transfer transfer' 'memo memo memo memo';gap:0 8px;padding:5px 10px 10px;border-bottom:1px solid #4a4a4a;min-width:0;scroll-margin:10px}
  #register-body tr[data-row-id] td{display:block;min-width:0;width:auto;height:auto;max-height:none;min-height:0;padding:2px 0;border:0;line-height:1.45;white-space:normal;overflow-wrap:anywhere;text-overflow:clip;background:transparent!important}
  #register-body tr.stripe-gray{background:#2b2b2b}
  #register-body tr.stripe-dark{background:#202020}
  #register-body tr.selected-row{background:#34495a;box-shadow:inset 3px 0 #75b4e3}
  #register-body tr[data-row-id] td.column-status{grid-area:status;display:flex;align-items:center;justify-content:center;padding:0}
  #register-body tr[data-row-id] td.column-date{grid-area:date;display:flex;align-items:center;font-size:12px;color:#bbb}
  #register-body tr[data-row-id] td.column-payee{grid-area:payee;font-size:15px;font-weight:500;line-height:1.4;align-self:start}
  #register-body tr[data-row-id] td.column-amount{grid-area:amount;font-size:15px;white-space:nowrap;align-self:start}
  #register-body tr[data-row-id] td.column-balance{grid-area:balance;font-size:12px;white-space:nowrap}
  #register-body tr[data-row-id] td.column-balance:before{content:'Balance ';color:#aaa;font-size:11px}
  #register-body tr[data-row-id] td.column-category{grid-area:category;font-size:12px;color:#bdbdbd}
  #register-body tr[data-row-id] td.column-transfer{grid-area:transfer;font-size:12px;color:#a4c9e5}
  #register-body tr[data-row-id] td.column-memo{grid-area:memo;font-size:12px;color:#bdbdbd;white-space:pre-wrap}
  #register-body tr[data-row-id] td.column-transfer:not(:empty):before{content:'Transfer: ';color:#aaa}
  #register-body tr[data-row-id] td.column-memo:not(:empty):before{content:'Memo: ';color:#aaa}
  #register-body tr[data-row-id] td.column-category:empty,#register-body tr[data-row-id] td.column-transfer:empty,#register-body tr[data-row-id] td.column-memo:empty{display:none}
  #register-body tr[data-row-id] td.column-payment,#register-body tr[data-row-id] td.column-deposit{display:none}
  #register-body tr[data-row-id] td.mobile-row-actions{display:flex;grid-area:actions;align-items:center;justify-content:center;padding:0}
  .mobile-row-more,.transaction-indicator{width:44px;height:44px;min-width:44px;min-height:44px;border-radius:5px}
  .mobile-row-more{font-size:25px}
  .mobile-row-selection{margin:0;width:44px;height:44px;align-items:center;justify-content:center}
  .mobile-row-selection input{width:23px;height:23px;min-height:23px;padding:0;margin:0;accent-color:#75b4e3}
  .mobile-selecting .mobile-row-selection{display:flex}
  .mobile-selecting .transaction-indicator{display:none}
  .account-row-context{display:block;margin:4px 0 0;font-size:11px;line-height:1.4}
  #register-body .today-divider{display:block;height:3px;background:var(--green)}
  #register-body .today-divider td{display:block;padding:0;height:3px}
  .register-footer{padding:4px max(8px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));min-height:60px;overflow:visible}
  .register-tools{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;width:100%;min-width:0;min-height:48px}
  .toolbar-group{display:contents}
  .register-tools .toolbar-button{width:100%;min-width:0;min-height:48px;font-size:12px;gap:2px;padding:4px}
  #register-split,#register-delete,#register-undo,#open-schedule,#register-print,#open-reconcile,#register-columns,#register-settings{display:none}
  .mobile-toolbar-more{display:flex}
  #open-transaction{grid-column:1;grid-row:1}#register-edit{grid-column:2;grid-row:1}#register-paid{grid-column:3;grid-row:1}#mobile-register-more{grid-column:4;grid-row:1}
  #register-body tr.inline-editing{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:none;gap:12px;padding:14px 12px;background:#303b44}
  #register-body tr.inline-editing td{grid-area:auto!important;display:block!important;min-width:0;text-align:left;white-space:normal}
  #register-body tr.inline-editing td.column-status,#register-body tr.inline-editing td.column-amount,#register-body tr.inline-editing td.column-balance{display:none!important}
  #register-body tr.inline-editing td.column-category,#register-body tr.inline-editing td.column-payee,#register-body tr.inline-editing td.column-transfer,#register-body tr.inline-editing td.column-memo,#register-body tr.inline-editing td.column-date{grid-column:1/-1!important}
  .app-shell.mobile-edit-keyboard .sidebar,.app-shell.mobile-edit-keyboard .account-navigation,.app-shell.mobile-edit-keyboard .register-filters,.app-shell.mobile-edit-keyboard .register-footer{display:none!important}
  #register-body tr.inline-editing td:before{content:attr(data-label)!important;display:block;margin:0 0 5px;color:#d3d3d3;font-size:13px;font-weight:400}
  #register-body tr.inline-editing td input,#register-body tr.inline-editing td select{width:100%;height:44px;min-height:44px;font-size:16px;padding:9px 10px;margin:0}
  #register-body tr.inline-action-row{display:block;position:sticky;bottom:0;z-index:5;border-bottom:1px solid #6c8395;background:#303943}
  #register-body tr.inline-action-row td{display:block;width:100%;padding:9px 12px;white-space:normal}
  .inline-actions{gap:8px}
  .inline-actions .button{min-height:44px;font-size:14px;padding:9px 14px}
  .inline-actions .field-help{font-size:12px;flex-basis:100%}
  .inline-status-label{font-size:13px;min-height:44px}
  .register-table .inline-status-label select{min-height:44px;height:44px;font-size:16px}
  dialog,dialog.wide-dialog,.bank-review-dialog{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px);max-height:calc(var(--mobile-app-height,100dvh) - 16px);margin:auto;border-radius:8px;overscroll-behavior:contain}
  dialog form,.dialog-body{padding:18px 14px max(18px,env(safe-area-inset-bottom));min-width:0}
  .dialog-heading{align-items:flex-start;gap:10px}.dialog-heading h2{font-size:20px;line-height:1.3;overflow-wrap:anywhere}
  dialog .icon-button{width:44px;height:44px;flex:none;margin-top:-8px;margin-right:-6px}
  dialog label{font-size:13px}dialog input,dialog select,dialog textarea{min-height:44px;font-size:16px}
  dialog input[type=checkbox]{min-height:22px;width:22px;height:22px}
  dialog .button{min-height:44px;font-size:14px;white-space:normal}
  .form-row{grid-template-columns:minmax(0,1fr);gap:0}
  .dialog-actions,.dialog-actions>div{flex-wrap:wrap;gap:9px}.dialog-actions>.button{flex:1 1 120px}
  .dialog-description,.field-help,.form-message{font-size:13px}
  .split-editor-row{grid-template-columns:minmax(0,1fr);gap:8px;padding:10px 0;border-bottom:1px solid var(--line)}
  .split-editor-row input,.split-editor-row select{font-size:16px;min-height:44px}
  .split-editor-row button{min-height:44px;font-size:14px;justify-self:end}
  .batch-selection-list{max-height:35dvh}.batch-selection-item{font-size:13px;gap:5px 10px;padding:11px}
  .batch-selection-reason,.batch-dialog-summary{font-size:13px}
  .register-context-menu,.register-context-submenu{width:min(360px,calc(100vw - 16px));max-height:calc(var(--mobile-app-height,100dvh) - 16px);font-size:14px}
  .context-menu-item{min-height:44px;padding:10px;flex-wrap:wrap}
  .mobile-menu-reason{display:block;width:100%;font-size:12px;color:#bbb;line-height:1.4}
  .register-empty{font-size:14px}.app-status{font-size:13px;line-height:1.4}
}
@media print{.mobile-account-bar,.mobile-selection-toggle,.mobile-filters-toggle,.mobile-clear-selection,.mobile-row-selection,.mobile-row-actions,.mobile-toolbar-more,.mobile-menu-reason{display:none!important}}

/* Shared original line icons; status semantics and controls remain unchanged. */
.app-icon{display:block;flex:none;pointer-events:none}
.toolbar-icon{color:var(--icon-muted)}
.toolbar-button:hover:not(:disabled) .toolbar-icon{color:var(--icon)}
.transaction-indicator.manual{color:var(--icon)}
.transaction-indicator.scheduled{color:var(--icon-muted)}
.transaction-indicator{width:17px;height:20px;border-radius:2px;background:transparent}
.transaction-indicator .status-symbol{display:grid;place-items:center;width:14px;height:14px;background:transparent}
.transaction-indicator .status-symbol svg{width:14px;height:14px;stroke-width:1.7}
.transaction-indicator.pending .status-symbol svg{stroke-width:2.8}
.transaction-indicator.downloaded{color:light-dark(#176bc1,#6aaff8)}
.transaction-indicator.scheduled{color:var(--muted)}
.transaction-indicator.pending{color:light-dark(#94610a,#dfb968)}
.transaction-indicator.pending-reviewed{color:light-dark(#247b45,#7acb92)}
.transaction-indicator.manual{color:light-dark(#59636f,#aeb6c2)}
.app-version,.app-release-details{font-size:11px;color:var(--muted);line-height:1.5}
.app-version{margin:8px 0 0;text-align:center}
.app-release-details{padding:10px 0;margin:8px 0;border-top:1px solid var(--line)}
.bank-row-note{display:block;font-size:11px;color:var(--muted);font-weight:400;line-height:1.4}
.bank-review-card .match-confirmation{margin:10px 0;padding:10px;border-radius:6px;background:var(--surface-raised,var(--panel));color:var(--text)}
.bank-review-card .match-confirmation label{display:flex;gap:8px;align-items:flex-start}
.bank-review-card .match-confirmation input{width:auto;margin-top:4px}
.bank-review-card [data-bank-amount-resolution]{width:100%;max-width:100%;margin-top:10px}
.bank-review-card [data-bank-amount-resolution][hidden],.bank-review-card .match-confirmation[hidden]{display:none}
.bank-review-card .review-card-actions{flex-wrap:wrap}
@media(max-width:680px){.transaction-indicator{width:44px;height:44px;min-width:44px;min-height:44px}.bank-row-note{white-space:normal}}
.icon-button>.app-icon,.today-jump>.app-icon{margin:auto}
#sync-bank>span[aria-hidden]{display:inline-flex;vertical-align:middle;margin-right:3px}
.empty-symbol .app-icon{margin:auto}
.context-menu-item[aria-haspopup=menu]:after{content:none}
.menu-chevron{margin-left:auto}
.sidebar-heading h2:before{content:'';width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin:0 9px 3px 1px}

/* The resolved appearance preference also sets the native control scheme. */
@media screen{
  :root:where([data-theme="light"]){color-scheme:light;--bg:#f5f6f8;--sidebar:#edf0f4;--surface:#fff;--surface-raised:#f0f3f6;--input:#fff;--line:#cfd6df;--text:#202c3b;--muted:#526174;--subtle:#627184;--accent:#176da0;--accent-hover:#125b88;--green:#317843;--red:#ae3c35;--blue:#246ca0;--future:#54697d;--icon:#995525;--icon-muted:#586e7e}
  :where([data-theme="light"]) body,:where([data-theme="light"]) .startup-view,:where([data-theme="light"]) .login-view{background:var(--bg);color:var(--text)}
  :where([data-theme="light"]) .login-card{background:var(--surface);border-color:var(--line);box-shadow:0 14px 50px #22334a15}
  :where([data-theme="light"]) .sidebar{background:var(--sidebar);border-color:var(--line)}
  :where([data-theme="light"]) .sidebar-top,:where([data-theme="light"]) .sidebar-total,:where([data-theme="light"]) .account-navigation,:where([data-theme="light"]) .register-filters,:where([data-theme="light"]) .register-footer{border-color:var(--line)}
  :where([data-theme="light"]) .sidebar-heading h2,:where([data-theme="light"]) .all-accounts-button,:where([data-theme="light"]) .account-button{color:var(--text)}
  :where([data-theme="light"]) .sidebar-heading h2:before,:where([data-theme="light"]) .account-group-label,:where([data-theme="light"]) .account-group-heading,:where([data-theme="light"]) .account-list h3{color:var(--muted)}
  :where([data-theme="light"]) .account-button:hover,:where([data-theme="light"]) .all-accounts-button:hover{background:#dde5ee}
  :where([data-theme="light"]) .account-button[aria-current=true],:where([data-theme="light"]) .account-button.is-selected,:where([data-theme="light"]) .all-accounts-button[aria-current=true],:where([data-theme="light"]) .all-accounts-button[aria-pressed=true]{background:#d4e7f5;color:#17476b;box-shadow:inset 3px 0 #4387b2}
  :where([data-theme="light"]) .account-balance.unverified{color:#895e1b}
  :where([data-theme="light"]) .topbar,:where([data-theme="light"]) .page-heading,:where([data-theme="light"]) .account-navigation,:where([data-theme="light"]) .register-panel,:where([data-theme="light"]) .register-filters,:where([data-theme="light"]) .register-footer{background:var(--surface)}
  :where([data-theme="light"]) .topbar{border-color:var(--line)}
  :where([data-theme="light"]) .breadcrumb,:where([data-theme="light"]) .breadcrumb strong,:where([data-theme="light"]) .breadcrumb span,:where([data-theme="light"]) .session,:where([data-theme="light"]) .today-balance>span{color:var(--muted)}
  :where([data-theme="light"]) .button{background:var(--surface-raised);border-color:#bcc8d4;color:var(--text)}
  :where([data-theme="light"]) .button:hover{background:#e0e8f0}
  :where([data-theme="light"]) .button.primary{background:#176a9b;border-color:#176a9b;color:#fff}
  :where([data-theme="light"]) .button.primary:hover{background:#125780}
  :where([data-theme="light"]) .button.quiet{background:transparent;border-color:transparent;color:var(--muted)}
  :where([data-theme="light"]) .button.quiet:hover{background:#e4ebf2;color:var(--text)}
  :where([data-theme="light"]) .button.danger{color:var(--red);border-color:#ca9690;background:#fff6f5}
  :where([data-theme="light"]) .button.danger:hover{background:#fbe6e3}
  :where([data-theme="light"]) .icon-button{color:var(--muted)}:where([data-theme="light"]) .icon-button:hover{background:#dfe7ef;color:var(--text)}
  :where([data-theme="light"]) .account-tab{color:#43546a}:where([data-theme="light"]) .account-tab:hover{background:#e7edf3}
  :where([data-theme="light"]) .account-tab[aria-selected=true],:where([data-theme="light"]) .account-tab.active{background:#d7e9f6;color:#15537d}
  :where([data-theme="light"]) .search-field{background:#f4f7fa;border-color:var(--line)}
  :where([data-theme="light"]) .search-field>span:not(.sr-only){color:var(--muted)}
  :where([data-theme="light"]) .search-field input{background:transparent;color:var(--text)}
  :where([data-theme="light"]) .search-field input::placeholder,:where([data-theme="light"]) input::placeholder,:where([data-theme="light"]) textarea::placeholder{color:#687b8e}
  :where([data-theme="light"]) .filter-controls select{background:#edf2f7;color:var(--text)}
  :where([data-theme="light"]) .register-count,:where([data-theme="light"]) .today-jump,:where([data-theme="light"]) .toolbar-button{color:var(--muted)}
  :where([data-theme="light"]) .today-jump:hover,:where([data-theme="light"]) .toolbar-button:hover:not(:disabled){background:#e0e9f1;color:var(--text)}
  :where([data-theme="light"]) .register-table th{background:#ecf1f6;color:#546b80;border-color:var(--line)}
  :where([data-theme="light"]) .register-table th:not(:first-child):after{border-color:var(--line)}
  :where([data-theme="light"]) .register-table th.active-sort{color:#1b6696;box-shadow:inset 0 2px #4b93bc}
  :where([data-theme="light"]) .register-table th.column-status{color:#536e83}
  :where([data-theme="light"]) .register-table td{background:#fff;color:var(--text)}
  :where([data-theme="light"]) .register-table tbody tr:nth-child(even) td,:where([data-theme="light"]) .register-table tbody tr.stripe-gray td{background:#f0f4f8}
  :where([data-theme="light"]) .register-table tbody tr.stripe-dark td{background:#fff}
  :where([data-theme="light"]) .register-table tbody tr:hover td{background:#e5edf5}
  :where([data-theme="light"]) .register-table tbody tr[aria-selected=true] td,:where([data-theme="light"]) .register-table tbody tr.is-selected td,:where([data-theme="light"]) .register-table tbody tr.selected td,:where([data-theme="light"]) .register-table tbody tr.selected-row td{background:#d8e9f6}
  :where([data-theme="light"]) .register-table .scheduled-row td,:where([data-theme="light"]) .register-table .planned-row td,:where([data-theme="light"]) .register-table .future-row td,:where([data-theme="light"]) .register-table .forecast-row td,:where([data-theme="light"]) .register-table .scheduled-row .payee,:where([data-theme="light"]) .register-table .planned-row .payee,:where([data-theme="light"]) .register-table .future-row .payee,:where([data-theme="light"]) .register-table .forecast-row .payee{color:var(--future)}
  :where([data-theme="light"]) .register-table .inflow,:where([data-theme="light"]) .register-table .positive,:where([data-theme="light"]) .register-table .scheduled-row .inflow,:where([data-theme="light"]) .register-table .scheduled-row .positive,:where([data-theme="light"]) .register-table .planned-row .inflow,:where([data-theme="light"]) .register-table .future-row .positive{color:#2c7344}
  :where([data-theme="light"]) .register-table .balance-column.negative{color:var(--red)}
  :where([data-theme="light"]) .register-table .is-minimum td.balance-column{box-shadow:inset 0 -1px #aa7c29}
  :where([data-theme="light"]) .transaction-indicator,:where([data-theme="light"]) .account-row-context{color:var(--muted)}
  :where([data-theme="light"]) .transaction-indicator.manual{color:#59636f}:where([data-theme="light"]) .transaction-indicator.downloaded{color:#176bc1}:where([data-theme="light"]) .transaction-indicator.pending{color:#94610a}:where([data-theme="light"]) .transaction-indicator.scheduled{color:#7052ab}
  :where([data-theme="light"]) .status-badge,:where([data-theme="light"]) .status-badge.reconciled,:where([data-theme="light"]) .status-badge.cleared{color:#36734b}
  :where([data-theme="light"]) .status-badge.scheduled,:where([data-theme="light"]) .status-badge.planned,:where([data-theme="light"]) .status-badge.manual{color:var(--muted)}
  :where([data-theme="light"]) .status-badge.pending,:where([data-theme="light"]) .status-badge.overdue{color:#8a6526}
  :where([data-theme="light"]) .row-button{color:var(--text);border-color:#aebcc9}:where([data-theme="light"]) .row-button:hover{background:#e0e8f0}
  :where([data-theme="light"]) .app-status{background:#e8f3e9;border-color:#b7d1b8;color:#2c6236}
  :where([data-theme="light"]) .app-status.error{background:#fcebea;border-color:#dfb0ac;color:#98342e}
  :where([data-theme="light"]) .anchor-notice{background:#fff4df;border-color:#d9bf85;color:#77561f}:where([data-theme="light"]) .anchor-notice p{color:#806639}
  :where([data-theme="light"]) dialog{background:var(--surface);border-color:#bbc7d3;color:var(--text);box-shadow:0 20px 80px #20304b38}
  :where([data-theme="light"]) dialog::backdrop{background:#1d2d4359}
  :where([data-theme="light"]) label{color:#394d61}
  :where([data-theme="light"]) input,:where([data-theme="light"]) select,:where([data-theme="light"]) textarea{background:var(--input);border-color:#b6c4d2;color:var(--text)}
  :where([data-theme="light"]) input[type=file]::file-selector-button{background:#e8eef4;color:var(--text)}
  :where([data-theme="light"]) .field-help code,:where([data-theme="light"]) .dialog-description strong{color:var(--text)}
  :where([data-theme="light"]) .reconciliation-summary{border-color:var(--line);background:#f3f6f9}
  :where([data-theme="light"]) .bank-review-card{border-color:var(--line);background:#f7f9fc}
  :where([data-theme="light"]) .review-feedback{color:#326f46}
  :where([data-theme="light"]) .register-table tr.editing-row td,:where([data-theme="light"]) .register-table tr.is-editing td,:where([data-theme="light"]) .register-table tr.inline-editing td{background:#e5eef7;color:var(--text)}
  :where([data-theme="light"]) .register-table td input,:where([data-theme="light"]) .register-table td select,:where([data-theme="light"]) .register-table .inline-editing td input,:where([data-theme="light"]) .register-table .inline-editing td select{background:#fff;border-color:#90afc6;color:var(--text)}
  :where([data-theme="light"]) .register-table .inline-editing input[readonly]{background:#eef2f6;color:#60758a;border-color:#bdcad6}
  :where([data-theme="light"]) .register-table tbody tr.inline-action-row td{background:#e7eff7;color:var(--text)}
  :where([data-theme="light"]) .register-table .inline-error-row td{background:#fcebe9;color:var(--red)}
  :where([data-theme="light"]) .inline-more-fields summary{color:#205e87}
  :where([data-theme="light"]) .register-context-menu,:where([data-theme="light"]) .register-context-submenu{background:#fffffff9;color:var(--text);border-color:#b8c7d5;box-shadow:0 9px 28px #263e5729,0 1px 4px #263e571a}
  :where([data-theme="light"]) .context-menu-item:not(:disabled):not([aria-disabled=true]):is(:hover,:focus-visible){background:#d7e9f6;color:#164c71}
  :where([data-theme="light"]) .context-menu-item[aria-expanded=true]:not(:disabled):not([aria-disabled=true]){background:#e1edf7}
  :where([data-theme="light"]) .context-menu-item:disabled,:where([data-theme="light"]) .context-menu-item[aria-disabled=true]{color:#697888}
  :where([data-theme="light"]) .context-menu-item.danger{color:var(--red)}:where([data-theme="light"]) .context-menu-item.danger:not(:disabled):not([aria-disabled=true]):is(:hover,:focus-visible){background:#fbe7e4;color:#98342e}
  :where([data-theme="light"]) .context-menu-item:focus-visible{outline-color:#3684b3}
  :where([data-theme="light"]) .context-menu-separator{border-color:var(--line)}:where([data-theme="light"]) .context-menu-hint,:where([data-theme="light"]) .mobile-menu-reason{color:var(--muted)}
  :where([data-theme="light"]) .batch-selection-item{border-color:var(--line)}
  :where([data-theme="light"]) .batch-selection-item[aria-disabled=true],:where([data-theme="light"]) .batch-selection-item.is-excluded{background:#f0f3f6;color:#637487}
  :where([data-theme="light"]) .batch-selection-warning{background:#fff4dc;color:#785920;border-color:#d3bb84}
  :where([data-theme="light"]) #register-scroll,:where([data-theme="light"]) .account-list,:where([data-theme="light"]) .batch-selection-list,:where([data-theme="light"]) .register-context-menu,:where([data-theme="light"]) .register-context-submenu{scrollbar-color:#a9b7c5 #edf2f7}
  @media(max-width:680px){
    :where([data-theme="light"]) #register-body tr[data-row-id]{border-color:#d4dde6}
    :where([data-theme="light"]) #register-body tr.stripe-gray{background:#f0f4f8}:where([data-theme="light"]) #register-body tr.stripe-dark{background:#fff}
    :where([data-theme="light"]) #register-body tr.selected-row{background:#d8e9f6;box-shadow:inset 3px 0 #4c95c3}
    :where([data-theme="light"]) #register-body tr[data-row-id] td.column-date,:where([data-theme="light"]) #register-body tr[data-row-id] td.column-category,:where([data-theme="light"]) #register-body tr[data-row-id] td.column-memo{color:#536b80}
    :where([data-theme="light"]) #register-body tr[data-row-id] td.column-transfer{color:#286d9c}
    :where([data-theme="light"]) #register-body tr[data-row-id] td.column-balance:before,:where([data-theme="light"]) #register-body tr[data-row-id] td.column-transfer:not(:empty):before,:where([data-theme="light"]) #register-body tr[data-row-id] td.column-memo:not(:empty):before{color:#60768b}
    :where([data-theme="light"]) #register-body tr.inline-editing,:where([data-theme="light"]) #register-body tr.inline-action-row{background:#e5eef7;border-color:#b7cadc}
    :where([data-theme="light"]) #register-body tr.inline-editing td:before{color:#3a536a}
    :where([data-theme="light"]) .mobile-selection-toggle[aria-pressed=true],:where([data-theme="light"]) .mobile-filters-toggle[aria-expanded=true]{background:#d7e9f6;color:#14547e}
    :where([data-theme="light"]) .mobile-row-selection input{accent-color:#2674a5}
  }
}

/* Category analysis shares the register's scroll, search and date filters. */
.category-summary{padding:17px 18px 13px;background:var(--surface);border-bottom:1px solid var(--line);--category-lightness:62%}
.category-summary-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:12px}
.category-summary-heading h2{font-size:16px;font-weight:600}
.category-summary-heading p{font-size:11px;margin-top:5px;line-height:1.5}
.category-forecast-toggle{display:flex;align-items:center;gap:8px;flex:none;margin:0;font-size:11px;color:var(--muted);min-height:30px;cursor:pointer}
.category-forecast-toggle input{width:17px;height:17px;min-height:0;margin:0;accent-color:var(--accent)}
.category-selection{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px;padding:5px 10px;border:1px solid var(--line);border-radius:5px;color:var(--text);font-size:12px;overflow-wrap:anywhere}
.category-summary-content{display:grid;grid-template-columns:minmax(175px,240px) minmax(0,1fr);gap:22px;align-items:center}
.category-chart{position:relative;width:min(220px,100%);margin:auto;aspect-ratio:1}
.category-chart svg{display:block;width:100%;height:100%;overflow:visible}
.category-chart circle.category-segment{cursor:pointer;transition:opacity .12s}
.category-chart circle.category-segment:hover{opacity:.68}
.category-chart-total{position:absolute;inset:28% 14%;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:7px;text-align:center;pointer-events:none;line-height:1.25}
.category-chart-total>span{font-size:10px;color:var(--muted)}
.category-chart-total strong{font-size:19px;font-weight:550;font-variant-numeric:tabular-nums;letter-spacing:-.5px;overflow-wrap:anywhere;max-width:100%}
.category-table-scroll{max-height:243px;min-width:0;overflow:auto;scrollbar-width:thin;scrollbar-color:var(--line) transparent;outline-offset:2px}
.category-table{width:100%;border-collapse:separate;border-spacing:0;font-variant-numeric:tabular-nums;font-size:12px;table-layout:auto}
.category-table th{position:sticky;top:0;background:var(--surface);z-index:1;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.4px;font-weight:500;border-bottom:1px solid var(--line)}
.category-table th,.category-table td{padding:7px 8px;text-align:left}
.category-table :is(th,td).number{text-align:right;white-space:nowrap}
.category-table tbody tr:hover{background:var(--surface-raised)}
.category-table th:first-child,.category-table td:first-child{padding-left:0}
.category-table button{display:flex;align-items:center;gap:8px;text-align:left;max-width:100%;min-height:23px;border:0;background:transparent;padding:0;color:var(--text);font:inherit;overflow-wrap:anywhere}
.category-table button:hover{text-decoration:underline}
.category-swatch{flex:none;width:9px;height:9px;border-radius:2px;background:var(--category-color)}
.category-table tfoot td{border-top:1px solid var(--line);font-weight:600}
.category-summary-note{font-size:10px;line-height:1.55;color:var(--muted);margin-top:12px;max-width:100ch}
.category-summary-empty{padding:24px 8px;color:var(--muted);font-size:12px;text-align:center}
.category-row-contribution{display:block;font-size:10px;color:var(--muted);line-height:1.2;margin-top:2px}
.app-shell.analytics-active .register-table td.payee:has(.category-row-contribution){padding-top:4px;padding-bottom:4px}
@media screen{:where([data-theme="light"]) .category-summary{--category-lightness:43%}}
@media(max-width:900px){.category-summary{padding:13px 12px}.category-summary-content{grid-template-columns:175px minmax(0,1fr);gap:10px}.category-table th,.category-table td{padding:7px 5px}.category-table th{font-size:9px}.category-chart-total strong{font-size:16px}.category-summary-heading{gap:10px;flex-wrap:wrap}}
@media(max-width:680px){
  .category-summary{padding:14px 12px}
  .category-summary-heading{gap:3px;margin-bottom:8px}
  .category-summary-heading>div{width:100%}
  .category-summary-heading h2{font-size:17px}
  .category-summary-heading p{font-size:12px}
  .category-forecast-toggle{font-size:13px;min-height:44px}
  .category-forecast-toggle input{width:21px;height:21px}
  .category-summary-content{grid-template-columns:minmax(0,1fr);gap:8px}
  .category-chart{width:170px}
  .category-chart-total strong{font-size:17px}
  .category-table-scroll{max-height:240px}
  .category-table{font-size:12px}
  .category-table th{font-size:9px;letter-spacing:0}
  .category-table th:nth-child(2){white-space:nowrap;font-size:8px}
  .category-table button{min-height:44px;font-size:13px}
  .category-table th,.category-table td{padding:5px 4px}
  .category-selection{font-size:13px;align-items:flex-start}
  .category-selection .button{min-height:44px;white-space:normal}
  .category-summary-note{font-size:11px}
  .category-row-contribution{font-size:11px;margin-top:4px}
  .app-shell.analytics-active .register-table tbody tr:not(.today-divider):not(.inline-action-row){grid-template-rows:auto auto auto}
}
@media print{.category-summary{break-inside:avoid}.category-table-scroll{max-height:none;overflow:visible}.category-forecast-toggle,.category-selection .button{display:none}}

/* Schedule creation wizard: scoped, responsive, and inherited system colors. */
#schedule-dialog{width:min(680px,calc(100vw - 24px));max-height:calc(100dvh - 24px)}
#schedule-dialog .dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:14px}
#schedule-dialog .dialog-heading h2{margin:0;font-size:20px}
#schedule-dialog .schedule-step{color:var(--accent);font-size:12px;font-weight:600;margin:6px 0 22px}
#schedule-dialog .schedule-field{min-width:0}
#schedule-dialog .schedule-field textarea{font:inherit;min-height:76px;resize:vertical}
#schedule-dialog .schedule-help,#schedule-dialog .schedule-tracking-note{color:var(--muted);font-size:12px;line-height:1.55}
#schedule-dialog .schedule-tracking-note{margin:18px 0 0}
#schedule-dialog .schedule-allocation-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-4px 0 14px}
#schedule-dialog .schedule-allocation-heading .button{flex:none}
#schedule-dialog .schedule-split-list{display:grid;gap:10px}
#schedule-dialog .schedule-split-row{display:grid;grid-template-columns:minmax(100px,1fr) 125px minmax(90px,1fr) auto;gap:8px;align-items:end;padding:12px;border:1px solid var(--line);border-radius:7px;background:var(--surface-raised)}
#schedule-dialog .schedule-split-row label{margin:0;min-width:0;font-size:11px}
#schedule-dialog .schedule-split-row input{min-width:0;width:100%;margin-bottom:0}
#schedule-dialog .schedule-split-row .button{min-height:38px}
#schedule-dialog .schedule-source-summary{background:var(--surface-raised);border:1px solid var(--line);border-radius:7px;padding:12px;font-size:13px;line-height:1.5;margin-bottom:18px;overflow-wrap:anywhere}
#schedule-dialog .schedule-interval{display:flex;align-items:center;gap:12px}
#schedule-dialog .schedule-interval .schedule-field{max-width:125px}
#schedule-dialog .schedule-interval-unit{color:var(--muted);font-size:13px;margin-top:8px}
#schedule-dialog .schedule-preview{border:1px solid var(--line);border-radius:8px;padding:14px 16px;margin:16px 0;background:var(--surface-raised)}
#schedule-dialog .schedule-summary{color:var(--text);font-size:14px;line-height:1.6;margin:0 0 12px}
#schedule-dialog .schedule-preview h3{font-size:12px;color:var(--muted);font-weight:600;margin-bottom:8px}
#schedule-dialog .schedule-next-dates{display:grid;grid-template-columns:1fr 1fr;gap:6px 26px;padding-left:20px;font-size:13px;font-variant-numeric:tabular-nums;line-height:1.5}
#schedule-dialog .schedule-preview .schedule-help{margin-top:10px}
#schedule-dialog .schedule-wizard-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}
#schedule-dialog .schedule-wizard-actions>button:first-child{margin-right:auto}
@media(max-width:680px){
  #schedule-dialog .dialog-heading h2{font-size:18px}
  #schedule-dialog .schedule-step{font-size:13px;margin-bottom:16px}
  #schedule-dialog :is(input,select,textarea){font-size:16px;min-height:44px}
  #schedule-dialog :is(.button,.icon-button){min-height:44px;min-width:44px}
  #schedule-dialog .schedule-allocation-heading{align-items:flex-start;flex-direction:column}
  #schedule-dialog .schedule-split-row{grid-template-columns:minmax(0,1fr) minmax(100px,1fr)}
  #schedule-dialog .schedule-split-row label:nth-child(3){grid-column:1/-1}
  #schedule-dialog .schedule-split-row .button{grid-column:2}
  #schedule-dialog .schedule-next-dates{grid-template-columns:1fr;font-size:14px}
  #schedule-dialog .schedule-help,#schedule-dialog .schedule-tracking-note{font-size:13px}
}
/* Cadence stage keeps its controls and exact preview side by side on desktop. */
#schedule-dialog.schedule-cadence-open{width:min(920px,calc(100vw - 24px))}
#schedule-dialog .schedule-cadence{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);gap:0 24px;align-items:start}
#schedule-dialog .schedule-source-summary{grid-column:1/-1;margin:0 0 16px}
#schedule-dialog .schedule-cadence-controls{min-width:0}
#schedule-dialog .schedule-cadence-controls .schedule-field{margin-bottom:12px}
#schedule-dialog .schedule-cadence .schedule-preview{margin:0;align-self:stretch}
#schedule-dialog .schedule-cadence .schedule-next-dates{grid-template-columns:1fr;gap:10px}
#schedule-dialog .schedule-wizard-actions{position:sticky;bottom:-24px;z-index:1;background:var(--surface);padding-bottom:18px;margin-bottom:-24px}
@media(max-width:680px){
  #schedule-dialog .schedule-cadence{grid-template-columns:minmax(0,1fr);gap:14px}
  #schedule-dialog .schedule-source-summary{margin-bottom:0}
  #schedule-dialog .schedule-cadence .schedule-preview{margin-top:0}
  #schedule-dialog .schedule-wizard-actions{bottom:-18px;padding-bottom:14px;margin-bottom:-18px}
}

/* Compact notices retain context, a safe recovery action, and dismissal. */
.app-status{display:flex;align-items:flex-start;gap:10px;font-size:12px}
.notice-content{flex:1;min-width:0}.notice-message{font-weight:550}.notice-remediation{font-size:11px;line-height:1.5;margin-top:3px;opacity:.88}.notice-code{display:block;font-size:10px;margin-top:3px}
.notice-dismiss{flex:none;width:26px;height:26px;min-height:26px;font-size:22px;color:inherit}.notice-action{flex:none;text-decoration:underline;font-size:11px;color:inherit;white-space:nowrap}
.shortcut-help{margin:12px 0;line-height:1.6}
@media(min-width:681px){.bank-row-note{display:inline;font-size:10px;line-height:inherit;margin-left:5px}.register-table td:has(.transaction-indicator){padding-top:5px;padding-bottom:5px}}
@media(max-width:680px){.app-status{flex-wrap:wrap;font-size:13px;padding:10px 12px}.notice-content{flex-basis:calc(100% - 54px)}.notice-dismiss{width:44px;height:44px;min-height:44px;order:1}.notice-action{order:2;margin-top:-5px;min-height:40px}.notice-remediation{font-size:12px}}

@media(max-width:680px){.page-heading{display:none}}

/* Unrecorded forecasts use one neutral gray across text and status markers.
   Keep controls fully interactive, warnings distinct, and print/edit colors intact. */
@media screen{
  :root{--forecast-text:#929292;--forecast-hover:#a0a0a0;--forecast-selected:#b6b6b6}
  :root:where([data-theme="light"]){--forecast-text:#6d6d6d;--forecast-hover:#696969;--forecast-selected:#646464}
  #register-body tr.unpaid-scheduled-row:not(.inline-editing){--forecast-row-color:var(--forecast-text)}
  #register-body tr.unpaid-scheduled-row:not(.inline-editing):hover{--forecast-row-color:var(--forecast-hover)}
  #register-body tr.unpaid-scheduled-row.selected-row:not(.inline-editing){--forecast-row-color:var(--forecast-selected)}
  #register-body tr.unpaid-scheduled-row:not(.inline-editing) td{color:var(--forecast-row-color)}
  #register-body tr.unpaid-scheduled-row:not(.inline-editing) :is(.account-row-context,.bank-row-note,.category-row-contribution,.entry-lock),
  #register-body tr.unpaid-scheduled-row:not(.inline-editing) .transaction-indicator:is(.manual,.scheduled),
  #register-body tr.unpaid-scheduled-row:not(.inline-editing) td:is(.column-balance,.column-transfer,.column-memo)::before{color:inherit}
  #register-body tr.unpaid-scheduled-row:not(.inline-editing) td.balance-column.negative{color:var(--red)}
}

.entry-lock { display:inline-flex; vertical-align:middle; margin-right:5px; color:var(--muted); }
#delete-protected[hidden] { display:none; }
#delete-protected label { display:grid; gap:6px; }
#delete-confirmation { width:100%; min-width:0; box-sizing:border-box; }

/* One shared colgroup keeps saved desktop widths stable through row editing. */
.column-resize-handle{display:none}
@media screen and (min-width:681px){
  .register-table th{padding-right:11px}
  .register-table th:not(:first-child):after{pointer-events:none}
  .register-table .column-resize-handle{display:block;position:absolute;right:0;top:0;bottom:0;width:10px;z-index:4;cursor:col-resize;touch-action:none;user-select:none;outline-offset:-2px}
  .register-table .column-resize-handle:after{content:"";position:absolute;right:0;top:3px;bottom:3px;width:2px;background:transparent}
  .register-table .column-resize-handle:is(:hover,:focus-visible,.is-resizing):after{background:var(--accent)}
  .resizing-register-column,.resizing-register-column *{cursor:col-resize!important;user-select:none!important}
  .register-table.custom-column-widths{max-width:none}
}
@media screen and (min-width:681px) and (pointer:coarse){.register-table .column-resize-handle{width:20px}.register-table th{padding-right:21px}}
@media print{.register-table.custom-column-widths{width:100%!important;min-width:0!important}.register-table.custom-column-widths col{width:auto!important}.column-resize-handle{display:none!important}}

/* Date-cell dragging previews a same-day slot before the versioned save. */
.register-table [data-drag-row]{cursor:grab;user-select:none}
.register-table .register-drag-shift{transition:transform 150ms cubic-bezier(.2,.8,.2,1);position:relative}
.register-table .register-drag-source{z-index:4;cursor:grabbing;transition:none;filter:drop-shadow(0 5px 7px #0005);opacity:.94}
.register-table .register-drag-source td{background:var(--selection,#245b82)}
.register-drag-active{user-select:none}
.register-drop-marker{position:fixed;height:3px;border-radius:3px;background:var(--accent,#63adf2);box-shadow:0 0 0 1px var(--panel,#222);pointer-events:none;z-index:15;transition:top 150ms cubic-bezier(.2,.8,.2,1)}
@media(prefers-reduced-motion:reduce){.register-table .register-drag-shift,.register-drop-marker{transition:none}}


/* Download review uses the same compact register rhythm, with details on demand. */
#bank-review-dialog{width:min(1500px,calc(100vw - 32px))!important;max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);overflow:hidden}
#bank-review-dialog .dialog-body{display:flex;flex-direction:column;min-height:0;max-height:calc(100dvh - 34px);padding:18px 18px 14px}
#bank-review-dialog .dialog-heading{flex:none;margin:0 0 12px}
#bank-review-dialog .dialog-description{flex:none;margin-bottom:12px}
#bank-review-dialog .dialog-actions{flex:none;margin-top:12px;padding-top:12px}
#bank-review-dialog .review-feedback,#bank-review-dialog .form-message{flex:none;margin:8px 0}
#bank-review-dialog .review-summary{flex:none;margin:0 0 10px;font-size:12px;line-height:1.5;color:var(--muted)}
.bank-review-toolbar{display:flex;flex:none;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:0 0 12px}
.bank-review-toolbar label{min-width:0;margin:0;color:var(--muted)}
.bank-review-toolbar label:has(#bank-review-search){flex:1 1 220px}
.bank-review-toolbar label:has(#bank-review-account){flex:0 1 210px}
.bank-review-toolbar :is(input:not([type=checkbox]),select){margin:0;min-height:34px;width:100%;min-width:0;font-size:12px}
.bank-review-toolbar label:has(input[type=checkbox]){display:flex;align-items:center;gap:7px;white-space:nowrap}
.bank-review-toolbar input[type=checkbox]{appearance:auto;display:inline-block;width:16px;height:16px;min-height:0;flex:none;margin:0;padding:0;accent-color:var(--accent)}
.bank-review-toolbar #bank-review-all{flex:none;margin-left:auto}
#bank-review-list{flex:1 1 auto;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;border:1px solid var(--line);border-radius:5px;margin:0;isolation:isolate}
.bank-review-table{width:100%;min-width:1070px;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:12px}
.bank-review-table th{position:sticky;top:0;z-index:2;padding:10px 8px;background:var(--surface-raised);border-bottom:1px solid var(--line);text-align:left;font-size:10px;font-weight:500;text-transform:uppercase;letter-spacing:.4px;color:var(--muted);white-space:nowrap}
.bank-review-table th:nth-child(1){width:92px}
.bank-review-table th:nth-child(2){width:86px}
.bank-review-table th:nth-child(3){width:13%}
.bank-review-table th:nth-child(4){width:20%}
.bank-review-table th:nth-child(5){width:15%}
.bank-review-table th:nth-child(6){width:100px;text-align:right}
.bank-review-table th:nth-child(7){width:15%}
.bank-review-table th:nth-child(8){width:170px}
.bank-review-row{background:var(--bg)}
.bank-review-row:nth-of-type(4n+3),.bank-review-row:nth-of-type(4n+4){background:var(--surface-raised)}
.bank-review-row:focus-within{background:light-dark(#e6f1fa,#263c4d)}
.bank-review-row>td{height:40px;padding:4px 7px;border-bottom:1px solid color-mix(in srgb,var(--line) 48%,transparent);vertical-align:middle;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bank-review-row>td:nth-child(2),.bank-review-row>td:nth-child(6){font-variant-numeric:tabular-nums}
.bank-review-row>td:nth-child(3){font-size:11px;color:var(--muted)}
.bank-review-row>td:nth-child(6){text-align:right}
.bank-review-row input[data-review-field]{width:100%;min-width:0;height:30px;min-height:30px;margin:0;padding:4px 6px;border:1px solid transparent;border-radius:3px;background:transparent;font-size:12px;line-height:20px;color:var(--text);text-overflow:ellipsis}
.bank-review-row input[data-review-field]:is(:hover,:focus){background:var(--input);border-color:var(--line)}
.bank-review-row input[data-review-field]:focus{border-color:var(--accent);outline:1px solid var(--accent);outline-offset:0}
.bank-review-row input[data-review-field]:disabled{color:var(--muted)}
.bank-review-row input[data-review-field][readonly]{color:var(--muted);cursor:default;background:transparent}
.review-row-status{display:inline-block;max-width:100%;font-size:10px;line-height:1.4;white-space:normal}
.review-row-status.pending{color:light-dark(#94610a,#dfb968)}
.review-row-status.reviewed{color:light-dark(#247b45,#7acb92)}
.review-row-status.posted{color:light-dark(#176bc1,#6aaff8)}
.review-row-attention{padding:10px 12px;margin:0;border-left:3px solid var(--accent);background:var(--surface-raised);font-size:12px;line-height:1.5;color:var(--text);overflow-wrap:anywhere}
.review-row-actions{display:flex;align-items:center;justify-content:flex-start;gap:5px}
.review-row-actions .button{min-height:28px;margin:0;padding:3px 7px;font-size:11px;line-height:20px}
.bank-review-detail-row>td{padding:0 8px 10px;background:var(--surface)}
.bank-review-detail-row .bank-review-card{max-width:none;margin:0;padding:14px 16px;border-top:2px solid var(--accent);border-radius:0 0 5px 5px;background:var(--surface)}
.bank-review-detail-row .review-card-heading{margin-bottom:8px}
.bank-review-detail-row .review-match-label{margin:10px 0 8px}
.bank-review-detail-row .review-card-actions{margin-top:10px}
.bank-review-detail-row .review-reason{margin-top:6px}
.bank-review-detail-row select{max-width:760px}
.bank-review-detail-row .review-amount{font-size:14px}
.bank-review-table .review-empty{padding:28px 12px}

@media(max-width:680px){
  #bank-review-dialog{width:calc(100vw - 12px)!important;max-width:calc(100vw - 12px);max-height:calc(var(--mobile-app-height,100dvh) - 12px)}
  #bank-review-dialog .dialog-body{max-height:calc(var(--mobile-app-height,100dvh) - 14px);padding:16px 10px max(10px,env(safe-area-inset-bottom))}
  #bank-review-dialog .dialog-heading{margin-bottom:10px}
  #bank-review-dialog .dialog-heading h2{font-size:19px}
  #bank-review-dialog .dialog-actions{margin-top:8px;padding-top:8px}
  .bank-review-toolbar{gap:9px;padding-bottom:10px}
  .bank-review-toolbar label:has(#bank-review-search){flex:1 1 100%}
  .bank-review-toolbar label:has(#bank-review-account){flex:1 1 140px}
  .bank-review-toolbar :is(input:not([type=checkbox]),select){min-height:44px;font-size:16px}
  .bank-review-toolbar label:has(input[type=checkbox]){font-size:12px;white-space:normal}
  .bank-review-toolbar input[type=checkbox]{width:22px;height:22px;min-height:22px}
  .bank-review-toolbar #bank-review-all{min-height:44px;font-size:13px;margin-left:auto}
  #bank-review-list{scrollbar-gutter:auto;border-radius:4px}
  .bank-review-table{display:block;min-width:0;width:100%;font-size:14px}
  .bank-review-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
  .bank-review-table tbody{display:block}
  .bank-review-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px 10px;padding:12px 10px;border-bottom:1px solid var(--line)}
  .bank-review-row>td{display:block;width:auto;min-width:0;height:auto;padding:0;border:0;white-space:normal;overflow:visible}
  .bank-review-row>td:before{display:block;font-size:11px;line-height:1.4;color:var(--muted);margin-bottom:4px}
  .bank-review-row>td:nth-child(1){align-self:center;font-size:12px}
  .bank-review-row>td:nth-child(2){align-self:center;text-align:right;font-size:12px;color:var(--muted)}
  .bank-review-row>td:nth-child(3){grid-column:1/-1;font-size:12px;overflow-wrap:anywhere}
  .bank-review-row>td:nth-child(4){grid-column:1/-1}
  .bank-review-row>td:nth-child(4):before{content:"Payee"}
  .bank-review-row>td:nth-child(5):before{content:"Category"}
  .bank-review-row>td:nth-child(6){align-self:stretch;display:flex;flex-direction:column;justify-content:space-between;padding-bottom:12px}
  .bank-review-row>td:nth-child(6):before{content:"Amount"}
  .bank-review-row>td:nth-child(7){grid-column:1/-1}
  .bank-review-row>td:nth-child(7):before{content:"Notes"}
  .bank-review-row>td:nth-child(8){grid-column:1/-1;padding-top:3px}
  .bank-review-row input[data-review-field]{min-height:44px;height:44px;font-size:16px;padding:9px 10px;border-color:var(--line);background:var(--input)}
  .review-row-actions{gap:8px}
  .review-row-actions .button{flex:1;min-height:44px;font-size:13px;padding:9px 10px}
  .bank-review-detail-row{display:block}
  .bank-review-detail-row>td{display:block;padding:0}
  .bank-review-detail-row .bank-review-card{border:0;border-top:2px solid var(--accent);border-bottom:1px solid var(--line);border-radius:0;padding:14px 10px}
  .bank-review-detail-row .review-card-actions{gap:8px}
}

/* Saving a review does not cover or dim the register. */
.review-saving-notice{position:fixed;right:14px;bottom:68px;z-index:35;padding:7px 11px;border:1px solid var(--line);border-radius:6px;background:var(--surface-raised);color:var(--muted);font-size:12px;box-shadow:0 2px 9px #0002;pointer-events:none}
@media(max-width:680px){.review-saving-notice{right:12px;bottom:calc(74px + env(safe-area-inset-bottom));font-size:12px}}

/* In-flight review labels stay inside the existing row height and preserve its status icon. */
.register-table td.review-save-anchor{position:relative;padding-right:64px}
.row-review-saving-label{position:absolute;right:5px;top:50%;transform:translateY(-50%);padding-left:5px;line-height:18px;font-size:10px;font-weight:500;white-space:nowrap;color:var(--accent);background:inherit;pointer-events:none}
.review-row-actions [data-bank-quick-review]{min-width:94px}
.review-row-actions [data-review-saving-button]:disabled{opacity:1;color:var(--accent)}
@media(max-width:680px){#register-body tr[data-row-id] td.review-save-anchor{padding-right:64px}.row-review-saving-label{right:0;font-size:11px}}

/* Sync remains in the toolbar; its busy state never obscures the register. */
@keyframes bank-sync-spin{to{transform:rotate(360deg)}}
.is-syncing .sidebar-tool-icon .app-icon,#sync-bank.is-syncing .app-icon{animation:bank-sync-spin 1s linear infinite;transform-origin:center}
.sidebar-tool.is-syncing,.sidebar-tool.is-syncing:disabled{opacity:1;box-shadow:0 0 0 2px var(--blue)}
#sync-bank.is-syncing{opacity:1;border-color:var(--blue)}
@media(prefers-reduced-motion:reduce){.is-syncing .sidebar-tool-icon .app-icon,#sync-bank.is-syncing .app-icon{animation:none}}

/* Short confirmations retain the same keyboard-friendly action placement. */
dialog.confirmation-dialog{width:min(440px,calc(100vw - 28px));border-radius:18px}
.confirmation-dialog .dialog-body,.confirmation-dialog form{padding:26px}
.confirmation-dialog .dialog-heading{align-items:flex-start;gap:12px;margin-bottom:10px}
.confirmation-dialog .dialog-heading h2{font-size:19px;line-height:1.4;font-weight:600;letter-spacing:-.2px}
.confirmation-dialog .dialog-description{font-size:13px;line-height:1.5;margin:0 0 14px}
.confirmation-dialog .dialog-actions{border:0;padding:0;margin-top:22px;gap:10px;flex-wrap:wrap}
.confirmation-dialog .dialog-actions>.button{flex:1 1 120px;min-height:38px;padding:8px 14px;border-radius:9px;font-size:14px;line-height:1.4;white-space:normal}
.confirmation-dialog .button:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
.confirmation-dialog .batch-selection-list{max-height:180px;margin-top:14px}
.confirmation-dialog .batch-selection-item{font-size:12px;padding:9px 10px}
.confirmation-dialog label{margin-bottom:10px}
.confirmation-dialog .field-help{margin-bottom:12px}
@media(max-width:680px){
  dialog.confirmation-dialog{width:min(440px,calc(100vw - 24px))!important;border-radius:16px}
  .confirmation-dialog .dialog-body,.confirmation-dialog form{padding:22px 20px}
  .confirmation-dialog .dialog-heading h2{font-size:18px}
  .confirmation-dialog .dialog-actions>.button{min-height:44px}
}
@media screen and (min-width:681px) and (pointer:fine){
  .dialog-drag-handle{cursor:grab;user-select:none}
  .dialog-dragging .dialog-drag-handle{cursor:grabbing}
  .dialog-drag-handle :is(button,a,input,select,textarea){cursor:auto}
}

/* Privacy shield is synchronous: it also covers top-layer dialogs and print. */
html.session-locked #app-view,
html.session-locked dialog:not([data-session-ui]),
html.session-locked .desktop-menu,
html.session-locked .register-context-menu,
html.session-locked .register-context-submenu { display:none !important; visibility:hidden !important; }
html.session-locked #startup-view { display:none !important; }
[data-session-ui] .session-countdown { font-variant-numeric:tabular-nums; }
#session-draft-conflict textarea { width:100%; resize:vertical; min-height:12rem; font:inherit; }

.session-draft-notice { position:fixed; z-index:50; inset:auto 16px 16px auto; max-width:min(420px,calc(100vw - 32px)); padding:12px 16px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--text); box-shadow:0 8px 24px #0002; display:flex; align-items:center; gap:12px; }

/* Saved-entry feedback is confined to the mobile register. */
.mobile-saved-feedback{display:none}
@media(max-width:680px){
  .mobile-saved-feedback:not([hidden]){display:flex;align-items:center;gap:8px;font-size:12px;padding:4px 0 8px;color:var(--muted)}
  .mobile-saved-feedback .button{margin-left:auto;min-height:44px;padding:8px;font-size:12px;white-space:nowrap}
  .mobile-saved-feedback .icon-button{min-width:44px;min-height:44px}
  #register-body .column-payee{cursor:pointer}
  #register-body.mobile-selecting .column-payee{cursor:default}
  #register-body tr.mobile-saved-row{outline:2px solid var(--accent);outline-offset:-2px;animation:mobile-saved-pulse 1.8s ease-out}
  @keyframes mobile-saved-pulse{from{box-shadow:inset 0 0 0 3px var(--accent)}to{box-shadow:inset 0 0 0 0 transparent}}
}
@media(max-width:680px) and (prefers-reduced-motion:reduce){#register-body tr.mobile-saved-row{animation:none}}
