/* One shared rail, type scale and touch vocabulary for web and bundled native UI. */
:root{--gw-control:44px;--gw-gap:16px;--gw-radius:16px}
*,*::before,*::after{box-sizing:border-box}
button,input,select,textarea{font:inherit}
:is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid var(--accent);outline-offset:3px}
body[data-view="app"] :is(.mount,.b2,.b2-col,.card,.b2-card,.ss-description,.page-head>div){min-width:0}
body[data-view="app"] :is(.card,.b2-card){border-radius:var(--gw-radius)}
body[data-view="app"] :is(.card,.b2-card) h2{font-size:clamp(18px,2.4vw,22px);line-height:1.3}
body[data-view="app"] :is(.card,.b2-card) p{line-height:1.5}
body[data-view="app"] :is(.b2-amt,.ss-price,.ss-kpi strong,.b2-big,.gw-budget-overview strong){font-variant-numeric:tabular-nums;overflow-wrap:anywhere;white-space:normal}
body[data-view="app"] :is(.btn,.icon-btn,.icon-sm,.b2-ck,summary,.ss-actions button,.ss-enhance button){min-height:var(--gw-control)}
body[data-view="app"] :is(.icon-sm,.b2-ck){min-width:var(--gw-control)}
body[data-view="app"] :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){max-width:100%;min-width:0;min-height:44px;font-size:16px}
.auth-check[hidden]{display:none!important}
section[data-view="auth"] .auth{padding-block:16px 24px}
section[data-view="auth"] .auth-card{max-width:440px}
section[data-view="auth"] .auth-card .auth-options{gap:8px}
section[data-view="auth"] .auth-card .field input{padding-inline-end:48px}
section[data-view="auth"] .password-visibility{left:auto!important;right:6px!important}
.gw-allocation-ring{position:relative;display:grid;place-items:center;aspect-ratio:1;width:min(100%,220px);margin:16px auto;border-radius:50%}
.gw-allocation-ring>div{position:static!important;width:74%;height:74%;border-radius:50%;background:var(--surface);display:flex;flex-direction:column;justify-content:center;align-items:center;padding:8px;min-width:0;text-align:center}
body[data-view="app"] .gw-allocation-ring strong{font-size:clamp(17px,2.8vw,24px);overflow-wrap:anywhere;max-width:100%}
.ss-split{grid-template-columns:minmax(0,1fr)}
.ss-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
.ss-entry details{grid-column:1/-1}
.ss-entry summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;padding:10px 0;font-weight:600}
.ss-entry .ss-actions{padding-top:8px;display:flex;flex-wrap:wrap;gap:8px}
.ss-fold{margin-top:16px;padding:16px;border:1px solid var(--line);border-radius:var(--gw-radius);background:var(--surface)}
.ss-fold>summary{cursor:pointer;min-height:44px;font-size:16px;font-weight:650}
.ss-fold[open]>.ss-advanced{margin-top:12px;border:0;padding:0}
.ss-dialog{width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain}
.ss-dialog .ss-x{position:sticky;top:0;min-height:44px;min-width:44px;float:inline-end}
.ss-dialog .ss-form{clear:both}
.ss-dialog :is(input,select,textarea){width:100%;min-height:44px;font-size:16px}
.gws-list>.auth-security{padding:16px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}
.gws-list>.auth-security .auth-security-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-block:12px}
.gws-list>.auth-security label{min-width:0;display:grid;gap:6px}
.gw-connectivity{position:fixed;inset-inline:12px;bottom:calc(84px + env(safe-area-inset-bottom));z-index:130;background:var(--surface);color:var(--text);border:1px solid var(--accent);border-radius:12px;padding:12px;font-size:14px;box-shadow:0 4px 24px #0003}
.gw-connectivity[hidden]{display:none}
@media(min-width:601px){body[data-view="app"] .subnav{display:flex!important;flex-wrap:nowrap!important;justify-content:flex-start;gap:8px}body[data-view="app"] .subnav>a{flex:1 1 0;min-width:0;white-space:normal!important;overflow-wrap:anywhere;text-align:center;justify-content:center;min-height:44px}.gw-desktop-more{flex:0 0 auto}}
@media(max-width:900px){.b2-grid,.gw-budget-layout,.gw-finance-home-grid{grid-template-columns:minmax(0,1fr)!important}.page-head{flex-wrap:wrap;gap:12px}.ss-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){
 body[data-view="app"] .gw-phone-nav{grid-template-columns:repeat(5,minmax(0,1fr));padding-inline:6px}
 .gw-phone-nav>a,.gw-phone-more>summary{font-size:11px;overflow-wrap:anywhere;white-space:normal;text-align:center;min-width:0}
 body[data-view="app"] :is(.shell.app.mount,.b2.shell){padding-inline:14px!important}
 body[data-view="app"] :is(.b2-grid,.ss-list){gap:12px}
 body[data-view="app"] :is(.card,.b2-card){padding:16px}
 .b2-big{font-size:clamp(28px,9vw,44px)!important;line-height:1.15}
 .b2-row{flex-wrap:wrap;row-gap:8px}.b2-row .b2-main{min-width:70px}.b2-row .b2-amt{max-width:100%}
 .ss-entry{grid-template-columns:40px minmax(0,1fr)}.ss-price{grid-column:2;text-align:start}.ss-actions button{flex:1 1 120px;white-space:normal}
 .ss-insights{grid-template-columns:minmax(0,1fr)}
 .ss-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.ss-kpi:first-child{grid-column:1/-1}
 .gws-list>.auth-security .auth-security-grid{grid-template-columns:minmax(0,1fr)}
 .gw-budget-overview-metrics{grid-template-columns:minmax(0,1fr)!important}
}
@media(prefers-reduced-motion:reduce){:is(.b2-card,.ss-entry,.auth-card,.btn){animation:none!important;transition:none!important}}
@media(max-width:600px) and (max-height:560px){body:has(input:focus,textarea:focus) .gw-phone-nav{display:none!important}}


/* Preserve the original orange summary row; secondary balances sit below it. */
.gw-budget-overview{flex-wrap:wrap}
.gw-budget-secondary{flex:0 0 100%;grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;padding-top:18px}
.gw-budget-secondary>div{display:flex;flex-direction:column;gap:6px;min-width:0}
.gw-budget-secondary b{font-size:clamp(20px,3vw,30px);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
body[data-view="app"] .gw-budget-overview :is(strong,b,.muted){color:#fff!important}
.gw-cash-details{margin:4px 0 12px;padding:4px 0}.gw-cash-details summary{min-height:44px;display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none;font-weight:600}.gw-cash-details summary::-webkit-details-marker{display:none}.gw-cash-details summary::before{content:'';width:0;height:0;border-block:5px solid transparent;border-inline-start:7px solid currentColor;transition:transform .15s}.gw-cash-details[open] summary::before{transform:rotate(90deg)}[dir=rtl] .gw-cash-details[open] summary::before{transform:rotate(-90deg)}
/* Cash remaining and Budget at start: right side, side by side, under the three figures. Label dark, amount white. */
body[data-view="app"] .gw-budget-overview .gw-mc-pair{grid-column:2;display:flex;flex-wrap:wrap;gap:8px 28px;justify-content:flex-end}
.gw-mc-pair>div{display:flex;align-items:baseline;gap:8px;min-width:0}
.gw-mc-pair>div>span{font-size:14px;font-weight:600;color:#1c1008}
.gw-mc-pair b{font-size:17px;font-weight:750;color:#fff;font-variant-numeric:tabular-nums;white-space:nowrap;text-shadow:0 1px 2px rgba(90,30,0,.18)}
.gw-mc-pair b .cur-sym{font-size:.8em;margin-inline-end:3px;color:#fff!important;opacity:1!important}
.gw-mc-pair .gl-cash-btn{color:#fff}
@media (max-width:640px){body[data-view="app"] .gw-budget-overview .gw-mc-pair{grid-column:1;justify-content:space-between}.gw-mc-pair>div>span{font-size:13px}.gw-mc-pair b{font-size:15px}}
.gw-cash-details form{display:grid;gap:12px;max-width:520px}.gw-cash-details p{margin:12px 0;max-width:700px}.gw-cash-details fieldset{border:0;padding:0}

/* Shared orange card (My Money and Budget) and the simple Budget page */
.gw-money-card .gw-mc-cash{display:block;margin-top:6px;font-size:15px;font-weight:600}
.gw-money-card .gw-mc-cash .gl-cash-btn{margin-inline-start:4px}
.b2-simple{display:flex;flex-direction:column;gap:14px;margin-top:16px}
.b2-simple .b2-open{all:unset;cursor:pointer;flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.b2-simple .b2-open b{white-space:normal;overflow-wrap:anywhere}
.b2-simple .b2-open:focus-visible{outline:2px solid currentColor;outline-offset:4px;border-radius:6px}
.b2-simple .b2-del{all:unset;cursor:pointer;display:inline-flex;align-items:center;gap:6px;margin:4px 0 10px;padding:8px 2px;color:var(--danger,#e5484d);font-size:14px}
.b2-simple .b2-del svg{width:16px;height:16px}
.b2-simple .b2-link{all:unset;cursor:pointer;font-size:14px;color:var(--muted)}
.b2-simple .pos{color:var(--ok,#2fbf8f)}
.pp-full>summary.pp-sum{list-style:none;cursor:pointer;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.pp-full>summary.pp-sum::-webkit-details-marker{display:none}
.pp-full>summary .pp-chev{margin-inline-start:auto;width:20px;height:20px;transition:transform .2s}
.pp-full[open]>summary .pp-chev{transform:rotate(180deg)}
.pp-full:not([open])>summary{margin:0}
/* Cash & starting budget: one simple row — cash at start, which pay has arrived, Save. */
.gw-cash-details form.gw-cash-simple{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px 16px;max-width:none}
.gw-cash-simple>label{display:flex;flex-direction:column;gap:6px;font-size:13px;flex:0 1 220px}
.gw-cash-recv{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.gw-cash-recv>span{font-size:13px;width:100%}
.gw-cash-details .gw-chip-check{display:inline-flex!important;flex-direction:row!important;align-items:center;gap:6px;padding:8px 14px!important;min-height:40px;margin:0!important;border-radius:999px;border:1px solid var(--line,rgba(255,255,255,.18));cursor:pointer;font-size:14px}
.gw-cash-details .gw-chip-check input{margin:0!important;width:16px;height:16px;accent-color:#e8894a}
/* My Payday and Cash & starting budget: same field width as "Monthly", both Save buttons in one column. */
.mm-period form.td-payday,.mm-period form.gw-cash-simple{display:flex!important;flex-wrap:wrap;align-items:flex-end!important;gap:12px 16px;max-width:720px;margin-block:12px}
.mm-period form.td-payday>.btn,.mm-period form.gw-cash-simple>.btn{margin-inline-start:auto;min-width:96px}
.mm-period .td-payday select,.mm-period .td-payday input,.mm-period .gw-cash-simple>label input{width:180px;max-width:100%;box-sizing:border-box}
.mm-period .gw-cash-simple>label{flex:0 0 auto}
.mm-period .gw-cash-recv{align-self:flex-end;flex:0 1 190px;min-width:0}
@media(max-width:480px){.mm-period form.td-payday,.mm-period form.gw-cash-simple{display:grid!important;grid-template-columns:1fr}.mm-period .td-payday select,.mm-period .td-payday input,.mm-period .gw-cash-simple>label input{width:100%}.mm-period form.td-payday>.btn,.mm-period form.gw-cash-simple>.btn{margin-inline-start:0}}
.mm-period form[data-mm-start] input{width:180px;max-width:100%;box-sizing:border-box}
/* Settings: guided tour entry */
.gws-tour{display:flex;align-items:center;flex-wrap:wrap;gap:10px 14px;padding:14px 18px!important}
.gws-tour .btn{display:inline-flex;align-items:center;gap:8px}.gws-tour .btn svg{width:18px;height:18px}
/* Pricing: the price in the visitor's own currency, under the US$ price. */
.plan-local{margin:4px 0 0;font-size:16px;font-weight:650;color:var(--ink,#fff);font-variant-numeric:tabular-nums}
.plan-local span{font-size:13px;font-weight:500;color:var(--muted)}
.plan-local .cur-sym{margin-inline-end:2px;color:inherit!important;opacity:.9!important}

/* Capture a bill (17 Nov 2026): two big buttons; confirm shows only amount, paid to and date. */
.gw-cap-btns{display:grid;gap:10px;margin:14px 0 6px}.gw-cap-btn{min-height:52px;font-size:16px;justify-content:center;cursor:pointer}
.gw-cap-paste{margin:10px 0}.gw-cap-paste summary{cursor:pointer;color:var(--muted);font-size:14px}.gw-cap-paste form{display:grid;gap:10px;margin-top:8px}
.gw-bill-confirm{display:grid;gap:14px}.gw-bill-confirm label{display:grid;gap:6px;font-size:14px;color:var(--muted)}
.gw-bc-row{display:flex;align-items:center;gap:10px}.gw-bc-row input{font-size:26px;font-weight:700;min-height:56px}.gw-bc-row b{color:var(--text);font-size:16px;white-space:nowrap}.gw-bc-row input{flex:1;min-width:0}
.gw-bc-sum{margin:0;font-weight:600;color:var(--text)}

/* Bills page opened from My Money: a way back, and after adding: add another or go back (17 Nov 2026). */
.gw-mm-back{margin:0 0 12px}
.gw-mm-added{position:fixed;z-index:80;left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right));bottom:calc(96px + env(safe-area-inset-bottom));max-width:620px;margin:0 auto;display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:12px 14px;border-radius:16px;border:1px solid rgba(74,222,128,.55);background:#0f2a1d;color:#e8edf2;box-shadow:0 12px 32px rgba(0,0,0,.5)}
.gw-mm-added>span{font-weight:700;color:#86efac;margin-inline-end:auto}
@media(min-width:900px){.gw-mm-added{bottom:24px}}

/* Footer always sits at the bottom of the screen, never in the middle of a short page (17 Nov 2026). */
body{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column}
body>main{flex:1 0 auto}
/* Keep the top bar its normal full width (the flex layout above had shrunk it to its contents). */
body>.topbar{width:100%}
body>.shell.app-only:has(>.app-footer){margin-top:auto;width:100%}
.app-footer{border-top:1px solid var(--line);margin-top:48px;padding-top:22px}
