/* Theme toggle button (both layouts) */
.theme-toggle{display:inline-grid;place-items:center;width:38px;height:38px;min-height:38px;padding:0;border-radius:50%;background:transparent;border:1px solid var(--rule,#34363c);color:inherit;cursor:pointer;flex:none;margin-left:8px}
.theme-toggle:hover{filter:none;background:var(--raised,#ffffff14)}
.theme-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .sun{display:none}html[data-theme=dark] .theme-toggle .sun{display:block}html[data-theme=dark] .theme-toggle .moon{display:none}

/* Panel: light theme (dark is the default stylesheet) */
html[data-theme=light]{color-scheme:light;--canvas:#f3f4f6;--card:#fff;--raised:#eceef1;--rule:#dde0e5;--ink:#16181b;--soft:#5b616a;--lime:#6aa82a}
html[data-theme=light] body{background:var(--canvas);color:var(--ink)}
html[data-theme=light] a:hover{color:#3f7410}
html[data-theme=light] header{border-bottom-color:var(--rule);background:var(--card)}
html[data-theme=light] .rail{border-right-color:var(--rule)}
html[data-theme=light] .rail a{color:var(--soft)}
html[data-theme=light] .rail a[aria-current]{color:var(--ink)}
html[data-theme=light] .rail a:hover span,html[data-theme=light] .rail a:focus-visible span{background:var(--ink);color:#fff}
html[data-theme=light] .danger{color:#c0392b}
html[data-theme=light] input,html[data-theme=light] select,html[data-theme=light] textarea{border-color:var(--rule);background:var(--card);color:var(--ink)}
html[data-theme=light] .icon-btn,html[data-theme=light] .row-tools form>.icon-btn:last-child:not(.destructive){background:var(--raised);color:var(--ink);border-color:var(--rule)}
html[data-theme=light] .icon-btn:hover,html[data-theme=light] .icon-btn:focus-visible{background:#e2edd6;color:#3f7410;border-color:#9bcc65}
html[data-theme=light] .icon-btn.destructive,html[data-theme=light] .icon-btn.danger{color:#c0392b}
html[data-theme=light] .icon-btn[data-open$="editor"],html[data-theme=light] form>.icon-btn:last-child:not(.quiet):not(.danger):not(.destructive){background:#9bcc65;color:#182211;border-color:#9bcc65}
html[data-theme=light] .item-symbol,html[data-theme=light] .avatar{background:#e2edd6;color:#3f7410}
html[data-theme=light] .count,html[data-theme=light] .pill{background:var(--raised);border-color:var(--rule);color:var(--soft)}
html[data-theme=light] .pill.on{background:#e2f1d4;border-color:#b5d79a;color:#2f5d10}
html[data-theme=light] .pill.warn{background:#fdf1d6;border-color:#edd08a;color:#7a5a00}
html[data-theme=light] .catalog,html[data-theme=light] .profile-grid>section,html[data-theme=light] .close-account,html[data-theme=light] .grid>section,html[data-theme=light] .section-gap,html[data-theme=light] .workspace>section,html[data-theme=light] .fin-stats article,html[data-theme=light] .user-menu summary{border-color:var(--rule)}
html[data-theme=light] .catalog-row,html[data-theme=light] .section-top,html[data-theme=light] .dialog-head,html[data-theme=light] .fold[open]>summary{border-color:var(--rule)}
html[data-theme=light] section,html[data-theme=light] .stats article,html[data-theme=light] .shortcuts a{background:var(--card)}
html[data-theme=light] .balance-card{background:var(--raised)}
html[data-theme=light] .shortcuts a span{background:#0000000d}
html[data-theme=light] .shortcuts .lime-tile{background:var(--lime);color:#14210a}
html[data-theme=light] dialog{background:var(--card);color:var(--ink);border-color:var(--rule)}
html[data-theme=light] #ui-message-text,html[data-theme=light] .user-menu .who,html[data-theme=light] .charge-more summary,html[data-theme=light] .fold-hint{color:var(--soft)}
html[data-theme=light] .user-menu .menu{background:var(--card);border-color:var(--rule);box-shadow:0 18px 40px -20px #0004}
html[data-theme=light] .user-menu .menu a,html[data-theme=light] .user-menu .menu-item{color:var(--ink)}
html[data-theme=light] .user-menu .menu a:hover,html[data-theme=light] .user-menu .menu-item:hover{background:var(--raised);color:var(--ink)}
html[data-theme=light] .user-menu form{border-color:var(--rule)}
html[data-theme=light] .charge-more[open]{background:var(--raised)}
html[data-theme=light] .lookup input{color:var(--ink)}
html[data-theme=light] .neg{color:#c0392b}
html[data-theme=light] .outline-link{color:#3f7410;border-color:#9bcc65}
html[data-theme=light] .allocation progress,html[data-theme=light] .allocation progress::-webkit-progress-bar{background:var(--raised)}

/* Checkout: theme variables */
html[data-theme=light] .pay-page{--bg:#f3f4f6;--card:#fff;--ink:#17181b;--muted:#5d6068;--line:#e3e4e8;--page-ink:#17181b;--page-soft:#4b4f57;--mast:#fff;--mast-line:#e3e4e8;--field:#fafafb;--soft-card:#f2f2f4}
html[data-theme=dark] .pay-page{--bg:#0e0f11;--card:#17191d;--ink:#f1f2f4;--muted:#a3a7af;--line:#2c2f35;--page-ink:#f3f3f3;--page-soft:#cfcfcf;--mast:#141518;--mast-line:#26282d;--field:#101215;--soft-card:#22252a}
