html.dark-mode {
  color-scheme: dark;
  --ink: #E8EEF2;
  --ink-soft: #AABBC5;
  --ink-faint: #8296A2;
  --soft: #AABBC5;
  --bg: #10181D;
  --surface: #1A252B;
  --border: #34454D;
  --primary-tint: #163B4A;
  --secondary-tint: #34421F;
  --new-tint: #48241F;
  --week-tint: #493718;
  --settled-tint: #293D22;
  --primary: var(--site-primary-ink, #42BCEB);
  --primary-ink: var(--site-primary-ink, #72D0F3);
  --secondary: #B9D36C;
  --secondary-ink: #C8E18A;
  --pulse-muted: #8199A3;
  --shadow: 0 1px 2px rgba(0,0,0,.22), 0 8px 24px -12px rgba(0,0,0,.5);
}

html.dark-mode body {
  background: radial-gradient(circle at 12% 0%, rgba(66, 188, 235, .08), transparent 28rem), linear-gradient(180deg, #18262D 0%, var(--bg) 42%, #0C1216 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

html.dark-mode .btn-primary {
  background: var(--site-primary-ink, var(--primary));
}

html.dark-mode .btn-primary:hover {
  background: var(--site-primary-ink, var(--primary-ink));
}

html.dark-mode .sidenav a.nav-link.active {
  background: var(--primary-ink);
}

html.dark-mode .homepage-banner {
  background: linear-gradient(105deg, #163B4A, #1A252B);
}

html.dark-mode .card.important {
  background: linear-gradient(105deg, #352326, #1A252B);
}

html.dark-mode .pulse-divider {
  background: #152127;
  border-bottom-color: #34454D;
}

html.dark-mode .pulse-eraser {
  stroke: #152127;
}

html.dark-mode .doc-viewer-head,
html.dark-mode .quicklink-viewer-head,
html.dark-mode .viewer-head {
  background: #152127;
  color: #E8EEF2;
  border-bottom-color: #34454D;
}

html.dark-mode .viewer-panel {
  background: #1A252B !important;
  color: #E8EEF2;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

html.dark-mode .viewer-download {
  background: #152127 !important;
  color: #72D0F3 !important;
  border-color: #34454D !important;
}

html.dark-mode .viewer-download:hover {
  background: #163B4A !important;
  color: #E8EEF2 !important;
  border-color: #42BCEB !important;
}

html.dark-mode .card,
html.dark-mode .topbar,
html.dark-mode .child,
html.dark-mode .table-wrap,
html.dark-mode .contacts-wrap,
html.dark-mode .box,
html.dark-mode .stat,
html.dark-mode .btn-ghost,
html.dark-mode .topbar-link,
html.dark-mode .print-button,
html.dark-mode .sort-reset {
  background: var(--surface);
  color: var(--ink);
}

html.dark-mode .database-backup-note {
  background: #122A33 !important;
  color: #D5E2E7 !important;
  border-color: #267A96 !important;
}

html.dark-mode input,
html.dark-mode select,
html.dark-mode textarea {
  background: #152127;
  color: var(--ink);
  border-color: var(--border);
}

html.dark-mode .hero {
  background: linear-gradient(120deg, #1A2C34, #163B4A);
}

html.dark-mode .hero-contacts {
  background: rgba(26, 37, 43, .9);
  border-color: #356477;
}

html.dark-mode .source-label {
  background: #482426;
  color: #FF9D91;
}

html.dark-mode mark {
  background: #66551A;
  color: #FFF2B3;
}

html.dark-mode .sidenav {
  background: #0B1115;
}

html.dark-mode .public-header,
html.dark-mode header {
  background: #0B1115;
}

html.dark-mode .public-header {
  color: #E8EEF2;
}

html.dark-mode .hero {
  background: linear-gradient(120deg, #1A2C34, #163B4A) !important;
  border-color: #34454D;
}

html.dark-mode .util-bar {
  background: #0B1115;
  color: #AABBC5;
}

html.dark-mode .util-inner,
html.dark-mode .util-links a {
  color: #AABBC5;
}

html.dark-mode .util-links a:hover {
  color: #FFFFFF;
}

html.dark-mode .upcoming-events-limit::after {
  background: #0B1115 !important;
  color: #E8EEF2 !important;
  border-color: #34454D;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .45);
}

html.dark-mode .upcoming-events-limit {
  background: #152127;
  color: #AABBC5;
  border-color: #34454D;
}

html.dark-mode .field-info::after {
  background: #0B1115;
  color: #E8EEF2;
  border-color: #34454D;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}

html.dark-mode .field-info::before {
  border-bottom-color: #0B1115;
}

html.dark-mode .public-context,
html.dark-mode .public-context a,
html.dark-mode .public-parent {
  color: #AABBC5;
}

html.dark-mode .quickbar,
html.dark-mode footer {
  background: #0B1115;
  color: var(--ink-soft);
}

html.dark-mode .error {
  background: #48241F;
  border-color: #8D4034;
  color: #FFB0A5;
}

@media print {
  html.dark-mode body {
    background: #fff;
    color: #000;
  }
}
