:root {
  color-scheme: dark;
  --leaf: #c0c0c0;
  --forest: #6f6f6f;
  --canvas: #3f3f3f;
  --panel: #3f3f3f;
  --field: #3f3f3f;
}

body { background: var(--canvas); color: #e8e8e8; }
body :where(main, dialog, #exportPreview) *:where(:not(#exportText, #exportText *, #report-content, #report-content *)) {
  color: #e8e8e8 !important;
}
::placeholder { color: #e8e8e8; opacity: 1; }
:focus-visible { outline-color: var(--leaf) !important; }
input[type="checkbox"] { accent-color: var(--forest) !important; }

main > section, main > .card, nav > a, nav > button {
  background: var(--panel);
  border: 1px solid var(--line);
}
nav > :is(a,button):is(:hover,:focus-visible) {
  background: #6f6f6f;
  outline-color: var(--leaf);
}

:root:root:root {
  --bg: var(--field); --card: var(--panel); --ink: #e8e8e8; --mute: #e8e8e8;
  --line: #9a9a9a; --inc: var(--leaf); --exp: var(--line);
  --acc: var(--forest); --accink: #e8e8e8;
}
button, input:not([type="checkbox"]), textarea, select, input[type="number"] {
  background-color: var(--field); border-color: var(--line);
}
button.amount { background: var(--field); border-color: var(--line); }
#export-pdf, #export, #share, #editor button[type="submit"], .seg button[aria-pressed="true"]:is(.i,.e) {
  background: var(--forest); border-color: var(--leaf);
}
dialog, #note-picker, #note-dialog, #export-dialog, #delete-line-dialog {
  background: var(--panel) !important; border-color: var(--line) !important; color: #e8e8e8;
}
#report-preview #report-content { background: #e8e8e8; color: #3f3f3f; }
#report-preview #download-report { color: #e8e8e8; }
.item, .saved-option { border-color: var(--line); }
.item.is-moving { background: #6f6f6f; }
.line-grip, .remove { background: transparent; }

nav > a, nav > button, .add:not(#lastBtn), #export-pdf, #export, #share, #editor button[type="submit"],
.seg button[aria-pressed="true"]:is(.i,.e) {
  background: #c0c0c0;
  color: #3f3f3f !important;
}
body nav > :is(a,button), body nav > :is(a,button) span,
body main button.add:not(#lastBtn), body main button#export-pdf, body main button#export,
body dialog button#share, body #editor button[type="submit"],
body main .seg button[aria-pressed="true"]:is(.i,.e) { color: #3f3f3f !important; }
nav > :is(a,button):is(:hover,:focus-visible) { background: #e8e8e8; }
main header img { filter: grayscale(1); }
