html { font-size:calc(16px * var(--font-scale, 1)); }
.appearance-section { border-top:1px solid var(--line); margin-top:28px; padding-top:24px; }
.appearance-controls { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.appearance-controls output { min-width:160px; text-align:center; }
.theme-choice { display:flex; align-items:center; gap:12px; min-width:145px; }
.theme-choice[aria-pressed=true] { outline:2px solid var(--accent); outline-offset:3px; }
.theme-swatch { width:26px; height:26px; border-radius:50%; border:1px solid var(--line); }
.swatch-light { background:linear-gradient(135deg,#f6f5f2 50%,#344a3c 50%); }
.swatch-dark { background:linear-gradient(135deg,#19241f 50%,#dda785 50%); }
html[data-theme=dark] { color-scheme:dark; --ink:#e3e9e2; --muted:#adb9ad; --paper:#131c18; --line:#3a4b40; --accent:#e4a27d; --bs-body-color:#e3e9e2; --bs-body-bg:#19241f; --bs-border-color:#3a4b40; --bs-secondary-color:#adb9ad; }
html[data-theme=dark] :is(.surface,.sidebar,.stat-card,.module-card,.empty-module,.parish-option,.balance-opening,.ledger-context-menu,.settings-nav a,.nk-tabs a,.note-card,.ledger-dialog) { background:#1d2a23; color:var(--ink); border-color:var(--line); }
html[data-theme=dark] :is(.topbar,.quiet-notice,.balance-settings summary,.ledger-tabs,.avatar,.module-icon,.status-tag,.environment-pill,.nk-transfer,.payout-extra,.intention-intro) { background:#24352b; color:#c4d1c3; border-color:var(--line); }
html[data-theme=dark] :is(.welcome-card,.ledger-summary,.entry-form-heading,.login-story,.nk-summary,.balance-closing) { background:#2b4435; }
html[data-theme=dark] :is(.nav-item,.topbar strong,.balance-opening strong,.form-label,.settings-nav a,.ledger-pagination a,.ledger-tabs a,.nk-tabs a,.entry-code-help strong,.intention-key,.cost-legend>div) { color:#c5d3c5; }
html[data-theme=dark] :is(.nav-item.active,.settings-nav a[aria-current=page],.ledger-tabs a.selected,.nk-tabs a.selected) { background:#49372c; color:#ffd0ae; border-color:#84634d; }
html[data-theme=dark] .nk-tabs a.nk-tab-fixed.selected { background:#355741; color:#fff; }
html[data-theme=dark] :is(.nav-item:hover,.module-card:hover,.settings-nav a:hover,.ledger-context-menu button:hover,.ledger-context-menu button:focus-visible) { background:#304436; color:#fff; }
html[data-theme=dark] :is(.form-control,.form-select,textarea,input,select) { background-color:#15211a; color:#edf2eb; border-color:#526453; }
html[data-theme=dark] :is(input,textarea)::placeholder { color:#a5b1a3; opacity:1; }
html[data-theme=dark] .form-select { --bs-form-select-bg-img:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23c5d3c5' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
html[data-theme=dark] .btn-outline-secondary { --bs-btn-color:#d4dfd0; --bs-btn-border-color:#71836c; --bs-btn-hover-bg:#354c3b; --bs-btn-hover-color:#fff; --bs-btn-hover-border-color:#9ab28e; --bs-btn-disabled-color:#8a9987; --bs-btn-disabled-border-color:#53634f; }
html[data-theme=dark] .btn-primary { --bs-btn-bg:#ab5737; --bs-btn-border-color:#be7550; --bs-btn-hover-bg:#90462c; }
html[data-theme=dark] :is(.btn-link,.back-link,.priest-card summary,.ledger-delete) { color:var(--accent); }
html[data-theme=dark] :is(.table,.intention-table,.payout-table,.nk-ledger) { --bs-table-bg:#1d2a23; --bs-table-color:#e3e9e2; --bs-table-border-color:#3a4b40; color:#e3e9e2; }
html[data-theme=dark] :is(.table,.intention-table,.payout-table,.nk-ledger) :is(th,td) { background:#1d2a23; color:#dce5d8; border-color:#3a4b40; }
html[data-theme=dark] :is(.table,.intention-table,.payout-table,.nk-ledger) :is(thead,tfoot) :is(th,td),html[data-theme=dark] .intention-day { background:#2b3e30; color:#e1e9dc; }
html[data-theme=dark] :is(.table,.intention-table) tbody tr:hover :is(td,th),html[data-theme=dark] .ledger-table tr.is-selected td { background:#324834; }
html[data-theme=dark] .intention-table :is(.group-bin,.group-tri) { background:#443b2b; }
html[data-theme=dark] .intention-table .group-jur { background:#263f42; }
html[data-theme=dark] :is(.ledger-code,.payout-code,.intention-table .is-modified) { background:#4b392b; color:#ffd0a7; }
html[data-theme=dark] :is(.ledger-context-menu button,.balance-table tbody th) { color:#dce5d8; }
html[data-theme=dark] :is(.stat-card>span:not(.stat-icon),.stat-card small,.date-label,.connection-state,.nav-group,.ledger-rule,.ledger-selection-help,.ledger-selection-bar>span,.ledger-pagination,.balance-explanation,.balance-opening span,.balance-links,.intention-footnote,.payout-note,.app-footer,.quiet-notice p,.cost-table thead small) { color:#adb9ad; }
html[data-theme=dark] :is(.alert-warning,.intention-conflict) { background:#443a21; color:#ffe1a0; border-color:#786638; }
html[data-theme=dark] :is(.alert-danger,.intention-error,.errorlist) { color:#ffb8a8; }
html[data-theme=dark] :focus-visible { outline-color:#e4a27d; }
html[data-theme=dark] .intention-table input:focus { background:#304436; color:#fff; }
html[data-theme=dark] .intention-table input[aria-invalid=true] { background:#61372d; color:#fff; }
.intention-table { min-width:calc(920px * var(--font-scale, 1)); }
@media print { html { --font-scale:1 !important; } }
