:root {
  color-scheme: light;
  --mathesio-surface-bg: #FFFFFF;
  --mathesio-header-bg: #004F33;
  --mathesio-nav-text: #FFFFFF;
  --bs-primary: #004F33;
  --bs-primary-rgb: 0, 79, 51;
  --bs-secondary: #6C757D;
  --bs-secondary-rgb: 108, 117, 125;
  --bs-primary-text-emphasis: #002B1C;
  --bs-primary-text-emphasis-rgb: 0, 43, 28;
  --bs-primary-bg-subtle: #E0EAE7;
  --bs-primary-border-subtle: #A6C1B8;
  --bs-secondary-text-emphasis: #3B4045;
  --bs-secondary-text-emphasis-rgb: 59, 64, 69;
  --bs-secondary-bg-subtle: #EDEEEF;
  --bs-secondary-border-subtle: #CCCFD2;
  --bs-body-bg: #FFFFFF;
  --bs-body-color: #212529;
  --bs-body-bg-rgb: 255, 255, 255;
  --bs-body-color-rgb: 33, 37, 41;
  --bs-emphasis-color: #212529;
  --bs-emphasis-color-rgb: 33, 37, 41;
  --bs-secondary-color: #595C5F;
  --bs-secondary-color-rgb: 89, 92, 95;
  --bs-tertiary-color: #737678;
  --bs-tertiary-color-rgb: 115, 118, 120;
  --bs-secondary-bg: #F6F6F6;
  --bs-secondary-bg-rgb: 246, 246, 246;
  --bs-tertiary-bg: #EDEEEE;
  --bs-tertiary-bg-rgb: 237, 238, 238;
  --bs-border-color: #929496;
  --bs-border-color-translucent: #929496;
  --bs-link-color: #004F33;
  --bs-link-color-rgb: 0, 79, 51;
  --bs-link-hover-color: #003724;
  --bs-link-hover-color-rgb: 0, 55, 36;
  --bs-body-font-size: 16px;
  --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-body-font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mathesio-logo-display-height: 32px;
  --mathesio-heading-color: #212529;
  --mathesio-heading-weight: 600;
  --mathesio-focus-color: #0D6EFD;
  --mathesio-primary-contrast: #FFFFFF;
  --mathesio-form-control-bg: #FFFFFF;
  --mathesio-form-control-color: #212529;
  --mathesio-form-control-border-color: #767676;
  --mathesio-form-control-border-radius: 4px;
  --mathesio-form-control-padding-x: 12px;
  --mathesio-form-control-padding-y: 6px;
  --mathesio-form-control-focus-color: #0D6EFD;
  --mathesio-form-control-focus-shadow-color: color-mix(in srgb, var(--mathesio-form-control-focus-color) 25%, transparent);
  --mathesio-form-control-valid-color: #198754;
  --mathesio-form-control-invalid-color: #DC3545;
  --bs-border-radius: 4px;
  --bs-border-radius-sm: 4px;
  --bs-border-radius-lg: 4px;
  --bs-border-radius-xl: 4px;
  --bs-border-radius-xxl: 4px;
}
body { background-color: var(--bs-body-bg); color: var(--bs-body-color); }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--mathesio-heading-color); font-weight: var(--mathesio-heading-weight); }
.btn-primary {
  --bs-btn-color: #FFFFFF;
  --bs-btn-bg: #004F33;
  --bs-btn-border-color: #004F33;
  --bs-btn-hover-color: #FFFFFF;
  --bs-btn-hover-bg: #00432B;
  --bs-btn-hover-border-color: #00432B;
  --bs-btn-active-color: #FFFFFF;
  --bs-btn-active-bg: #003B26;
  --bs-btn-active-border-color: #003B26;
  --bs-btn-disabled-color: #FFFFFF;
  --bs-btn-disabled-bg: #004F33;
  --bs-btn-disabled-border-color: #004F33;
  --bs-btn-focus-shadow-rgb: 0, 79, 51;
}
.btn-secondary {
  --bs-btn-color: #FFFFFF;
  --bs-btn-bg: #6C757D;
  --bs-btn-border-color: #6C757D;
  --bs-btn-hover-color: #FFFFFF;
  --bs-btn-hover-bg: #5C636A;
  --bs-btn-hover-border-color: #5C636A;
  --bs-btn-active-color: #FFFFFF;
  --bs-btn-active-bg: #51585E;
  --bs-btn-active-border-color: #51585E;
  --bs-btn-disabled-color: #FFFFFF;
  --bs-btn-disabled-bg: #6C757D;
  --bs-btn-disabled-border-color: #6C757D;
  --bs-btn-focus-shadow-rgb: 108, 117, 125;
}
.btn-outline-primary {
  --bs-btn-color: #004F33;
  --bs-btn-border-color: #004F33;
  --bs-btn-hover-color: #FFFFFF;
  --bs-btn-hover-bg: #004F33;
  --bs-btn-hover-border-color: #004F33;
  --bs-btn-active-color: #FFFFFF;
  --bs-btn-active-bg: #004F33;
  --bs-btn-active-border-color: #004F33;
  --bs-btn-disabled-color: #004F33;
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: #004F33;
  --bs-btn-focus-shadow-rgb: 0, 79, 51;
}
.btn-outline-secondary {
  --bs-btn-color: #6C757D;
  --bs-btn-border-color: #6C757D;
  --bs-btn-hover-color: #FFFFFF;
  --bs-btn-hover-bg: #6C757D;
  --bs-btn-hover-border-color: #6C757D;
  --bs-btn-active-color: #FFFFFF;
  --bs-btn-active-bg: #6C757D;
  --bs-btn-active-border-color: #6C757D;
  --bs-btn-disabled-color: #6C757D;
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: #6C757D;
  --bs-btn-focus-shadow-rgb: 108, 117, 125;
}
.btn-primary:not(.btn-sm):not(.btn-lg), .btn-secondary:not(.btn-sm):not(.btn-lg), .btn-outline-primary:not(.btn-sm):not(.btn-lg), .btn-outline-secondary:not(.btn-sm):not(.btn-lg) {
  --bs-btn-border-radius: 4px;
  --bs-btn-padding-x: 12px;
  --bs-btn-padding-y: 6px;
}
.btn, .btn-sm, .btn-lg {
  --bs-btn-border-radius: 4px;
}
.text-bg-primary { color: #FFFFFF !important; background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity, 1)) !important; }
.text-bg-secondary { color: #FFFFFF !important; background-color: rgba(var(--bs-secondary-rgb), var(--bs-bg-opacity, 1)) !important; }
.dropdown-menu {
  --bs-dropdown-link-active-bg: var(--bs-primary);
  --bs-dropdown-link-active-color: #FFFFFF;
}
.alert-success {
  --bs-alert-color: #000000;
  --bs-alert-bg: #E3F1EA;
  --bs-alert-border-color: #AFD5C3;
  --bs-alert-link-color: #000000;
  --bs-alert-border-radius: 4px;
}
.alert-danger {
  --bs-alert-color: #000000;
  --bs-alert-bg: #FBE7E9;
  --bs-alert-border-color: #F3B8BE;
  --bs-alert-link-color: #000000;
  --bs-alert-border-radius: 4px;
}
.alert-warning {
  --bs-alert-color: #000000;
  --bs-alert-bg: #FFF8E1;
  --bs-alert-border-color: #FFE9A8;
  --bs-alert-link-color: #000000;
  --bs-alert-border-radius: 4px;
}
.alert-info {
  --bs-alert-color: #000000;
  --bs-alert-bg: #E2F9FD;
  --bs-alert-border-color: #AAECFA;
  --bs-alert-link-color: #000000;
  --bs-alert-border-radius: 4px;
}
.form-control, .form-select {
  --bs-body-bg: #FFFFFF;
  --bs-body-color: #212529;
  background-color: #FFFFFF;
  color: #212529;
  border-color: #767676;
  border-radius: 4px;
}
.form-control:not(.form-control-sm):not(.form-control-lg), .form-select:not(.form-select-sm):not(.form-select-lg) { padding: 6px 12px; }
.form-control:focus, .form-select:focus { border-color: var(--mathesio-focus-color); box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--mathesio-focus-color) 25%, transparent); }
.form-select:not([multiple]):not([size]) { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23212529' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
.form-control.is-valid, .form-select.is-valid, .was-validated .form-control:valid, .was-validated .form-select:valid { border-color: #198754; }
.form-control.is-invalid, .form-select.is-invalid, .was-validated .form-control:invalid, .was-validated .form-select:invalid { border-color: #DC3545; }
.valid-feedback { color: #198754; }
.invalid-feedback { color: #DC3545; }
.table { --bs-table-color: var(--bs-body-color); --bs-table-bg: var(--bs-body-bg); --bs-table-border-color: #DEE2E6; --bs-table-striped-color: var(--bs-body-color); --bs-table-striped-bg: #F2F2F2; }
.table:not(.table-sm) > :not(caption) > * > * { padding: 8px; }
.table > thead { --bs-table-bg: #F8F9FA; --bs-table-color: #212529; }
.admin-sidebar, .mathesio-main-navigation {
  --bs-offcanvas-bg: #004F33 !important;
  --bs-offcanvas-color: #FFFFFF !important;
  --bs-nav-link-color: #FFFFFF;
  --bs-nav-link-hover-color: #FFFFFF;
  --mathesio-nav-hover-color: #FFFFFF;
  --mathesio-nav-hover-bg: #004D32;
  --mathesio-nav-active-bg: #003F29;
  --mathesio-nav-active-color: #FFFFFF;
  background-color: #004F33;
  color: #FFFFFF;
}
.admin-sidebar .nav-link, .mathesio-main-navigation .nav-link { color: #FFFFFF; border-radius: 4px; }
.admin-sidebar .nav-link:hover, .mathesio-main-navigation .nav-link:hover { background-color: var(--mathesio-nav-hover-bg); color: var(--mathesio-nav-hover-color); }
.admin-sidebar .nav-link.active, .admin-sidebar .nav-link[aria-current="page"], .mathesio-main-navigation .nav-link.active, .mathesio-main-navigation .nav-link[aria-current="page"] { background-color: var(--mathesio-nav-active-bg); color: var(--mathesio-nav-active-color); }
.navbar { --bs-navbar-color: var(--mathesio-nav-text); --bs-navbar-brand-color: var(--mathesio-nav-text); --bs-navbar-hover-color: var(--mathesio-nav-text); --bs-navbar-brand-hover-color: var(--mathesio-nav-text); background-color: var(--mathesio-header-bg); color: var(--mathesio-nav-text); }
.card, .dropdown-menu, .modal-content, .popover, .toast { background-color: var(--mathesio-surface-bg); color: var(--bs-body-color); }
.card { --bs-card-bg: var(--mathesio-surface-bg); --bs-card-color: var(--bs-body-color); --bs-card-border-color: var(--bs-border-color); }
.dropdown-menu { --bs-dropdown-bg: var(--mathesio-surface-bg); --bs-dropdown-color: var(--bs-body-color); --bs-dropdown-link-color: var(--bs-body-color); }
.modal-content { --bs-modal-bg: var(--mathesio-surface-bg); --bs-modal-color: var(--bs-body-color); }
.popover { --bs-popover-bg: var(--mathesio-surface-bg); --bs-popover-body-color: var(--bs-body-color); --bs-popover-header-color: var(--bs-body-color); --bs-popover-header-bg: var(--mathesio-surface-bg); }
.toast { --bs-toast-bg: var(--mathesio-surface-bg); --bs-toast-color: var(--bs-body-color); }
.list-group { --bs-list-group-bg: var(--mathesio-surface-bg); --bs-list-group-color: var(--bs-body-color); --bs-list-group-border-color: var(--bs-border-color); }

html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"]{
  color-scheme: light;
  --mathesio-surface-bg: #FFFFFF;
  --mathesio-header-bg: #004F33;
  --mathesio-nav-text: #FFFFFF;
  --bs-primary: #004F33;
  --bs-primary-rgb: 0, 79, 51;
  --bs-secondary: #6C757D;
  --bs-secondary-rgb: 108, 117, 125;
  --bs-primary-text-emphasis: #002B1C;
  --bs-primary-text-emphasis-rgb: 0, 43, 28;
  --bs-primary-bg-subtle: #E0EAE7;
  --bs-primary-border-subtle: #A6C1B8;
  --bs-secondary-text-emphasis: #3B4045;
  --bs-secondary-text-emphasis-rgb: 59, 64, 69;
  --bs-secondary-bg-subtle: #EDEEEF;
  --bs-secondary-border-subtle: #CCCFD2;
  --bs-body-bg: #FFFFFF;
  --bs-body-color: #212529;
  --bs-body-bg-rgb: 255, 255, 255;
  --bs-body-color-rgb: 33, 37, 41;
  --bs-emphasis-color: #212529;
  --bs-emphasis-color-rgb: 33, 37, 41;
  --bs-secondary-color: #595C5F;
  --bs-secondary-color-rgb: 89, 92, 95;
  --bs-tertiary-color: #737678;
  --bs-tertiary-color-rgb: 115, 118, 120;
  --bs-secondary-bg: #F6F6F6;
  --bs-secondary-bg-rgb: 246, 246, 246;
  --bs-tertiary-bg: #EDEEEE;
  --bs-tertiary-bg-rgb: 237, 238, 238;
  --bs-border-color: #929496;
  --bs-border-color-translucent: #929496;
  --bs-link-color: #004F33;
  --bs-link-color-rgb: 0, 79, 51;
  --bs-link-hover-color: #003724;
  --bs-link-hover-color-rgb: 0, 55, 36;
  --bs-body-font-size: 16px;
  --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-body-font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mathesio-logo-display-height: 32px;
  --mathesio-heading-color: #212529;
  --mathesio-heading-weight: 600;
  --mathesio-focus-color: #0D6EFD;
  --mathesio-primary-contrast: #FFFFFF;
  --mathesio-form-control-bg: #FFFFFF;
  --mathesio-form-control-color: #212529;
  --mathesio-form-control-border-color: #767676;
  --mathesio-form-control-border-radius: 4px;
  --mathesio-form-control-padding-x: 12px;
  --mathesio-form-control-padding-y: 6px;
  --mathesio-form-control-focus-color: #0D6EFD;
  --mathesio-form-control-focus-shadow-color: color-mix(in srgb, var(--mathesio-form-control-focus-color) 25%, transparent);
  --mathesio-form-control-valid-color: #198754;
  --mathesio-form-control-invalid-color: #DC3545;
  --bs-border-radius: 4px;
  --bs-border-radius-sm: 4px;
  --bs-border-radius-lg: 4px;
  --bs-border-radius-xl: 4px;
  --bs-border-radius-xxl: 4px;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] body{ background-color: var(--bs-body-bg); color: var(--bs-body-color); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] h1, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] h2, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] h3, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] h4, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] h5, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] h6, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .h1, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .h2, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .h3, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .h4, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .h5, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .h6{ color: var(--mathesio-heading-color); font-weight: var(--mathesio-heading-weight); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .btn-primary{
  --bs-btn-color: #FFFFFF;
  --bs-btn-bg: #004F33;
  --bs-btn-border-color: #004F33;
  --bs-btn-hover-color: #FFFFFF;
  --bs-btn-hover-bg: #00432B;
  --bs-btn-hover-border-color: #00432B;
  --bs-btn-active-color: #FFFFFF;
  --bs-btn-active-bg: #003B26;
  --bs-btn-active-border-color: #003B26;
  --bs-btn-disabled-color: #FFFFFF;
  --bs-btn-disabled-bg: #004F33;
  --bs-btn-disabled-border-color: #004F33;
  --bs-btn-focus-shadow-rgb: 0, 79, 51;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .btn-secondary{
  --bs-btn-color: #FFFFFF;
  --bs-btn-bg: #6C757D;
  --bs-btn-border-color: #6C757D;
  --bs-btn-hover-color: #FFFFFF;
  --bs-btn-hover-bg: #5C636A;
  --bs-btn-hover-border-color: #5C636A;
  --bs-btn-active-color: #FFFFFF;
  --bs-btn-active-bg: #51585E;
  --bs-btn-active-border-color: #51585E;
  --bs-btn-disabled-color: #FFFFFF;
  --bs-btn-disabled-bg: #6C757D;
  --bs-btn-disabled-border-color: #6C757D;
  --bs-btn-focus-shadow-rgb: 108, 117, 125;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .btn-outline-primary{
  --bs-btn-color: #004F33;
  --bs-btn-border-color: #004F33;
  --bs-btn-hover-color: #FFFFFF;
  --bs-btn-hover-bg: #004F33;
  --bs-btn-hover-border-color: #004F33;
  --bs-btn-active-color: #FFFFFF;
  --bs-btn-active-bg: #004F33;
  --bs-btn-active-border-color: #004F33;
  --bs-btn-disabled-color: #004F33;
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: #004F33;
  --bs-btn-focus-shadow-rgb: 0, 79, 51;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .btn-outline-secondary{
  --bs-btn-color: #6C757D;
  --bs-btn-border-color: #6C757D;
  --bs-btn-hover-color: #FFFFFF;
  --bs-btn-hover-bg: #6C757D;
  --bs-btn-hover-border-color: #6C757D;
  --bs-btn-active-color: #FFFFFF;
  --bs-btn-active-bg: #6C757D;
  --bs-btn-active-border-color: #6C757D;
  --bs-btn-disabled-color: #6C757D;
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: #6C757D;
  --bs-btn-focus-shadow-rgb: 108, 117, 125;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .btn-primary:not(.btn-sm):not(.btn-lg), html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .btn-secondary:not(.btn-sm):not(.btn-lg), html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .btn-outline-primary:not(.btn-sm):not(.btn-lg), html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .btn-outline-secondary:not(.btn-sm):not(.btn-lg){
  --bs-btn-border-radius: 4px;
  --bs-btn-padding-x: 12px;
  --bs-btn-padding-y: 6px;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .btn, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .btn-sm, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .btn-lg{
  --bs-btn-border-radius: 4px;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .text-bg-primary{ color: #FFFFFF !important; background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity, 1)) !important; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .text-bg-secondary{ color: #FFFFFF !important; background-color: rgba(var(--bs-secondary-rgb), var(--bs-bg-opacity, 1)) !important; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .dropdown-menu{
  --bs-dropdown-link-active-bg: var(--bs-primary);
  --bs-dropdown-link-active-color: #FFFFFF;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .alert-success{
  --bs-alert-color: #000000;
  --bs-alert-bg: #E3F1EA;
  --bs-alert-border-color: #AFD5C3;
  --bs-alert-link-color: #000000;
  --bs-alert-border-radius: 4px;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .alert-danger{
  --bs-alert-color: #000000;
  --bs-alert-bg: #FBE7E9;
  --bs-alert-border-color: #F3B8BE;
  --bs-alert-link-color: #000000;
  --bs-alert-border-radius: 4px;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .alert-warning{
  --bs-alert-color: #000000;
  --bs-alert-bg: #FFF8E1;
  --bs-alert-border-color: #FFE9A8;
  --bs-alert-link-color: #000000;
  --bs-alert-border-radius: 4px;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .alert-info{
  --bs-alert-color: #000000;
  --bs-alert-bg: #E2F9FD;
  --bs-alert-border-color: #AAECFA;
  --bs-alert-link-color: #000000;
  --bs-alert-border-radius: 4px;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .form-control, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .form-select{
  --bs-body-bg: #FFFFFF;
  --bs-body-color: #212529;
  background-color: #FFFFFF;
  color: #212529;
  border-color: #767676;
  border-radius: 4px;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .form-control:not(.form-control-sm):not(.form-control-lg), html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .form-select:not(.form-select-sm):not(.form-select-lg){ padding: 6px 12px; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .form-control:focus, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .form-select:focus{ border-color: var(--mathesio-focus-color); box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--mathesio-focus-color) 25%, transparent); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .form-select:not([multiple]):not([size]){ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23212529' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .form-control.is-valid, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .form-select.is-valid, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .was-validated .form-control:valid, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .was-validated .form-select:valid{ border-color: #198754; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .form-control.is-invalid, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .form-select.is-invalid, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .was-validated .form-control:invalid, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .was-validated .form-select:invalid{ border-color: #DC3545; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .valid-feedback{ color: #198754; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .invalid-feedback{ color: #DC3545; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .table{ --bs-table-color: var(--bs-body-color); --bs-table-bg: var(--bs-body-bg); --bs-table-border-color: #DEE2E6; --bs-table-striped-color: var(--bs-body-color); --bs-table-striped-bg: #F2F2F2; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .table:not(.table-sm) > :not(caption) > * > *{ padding: 8px; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .table > thead{ --bs-table-bg: #F8F9FA; --bs-table-color: #212529; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .admin-sidebar, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .mathesio-main-navigation{
  --bs-offcanvas-bg: #004F33 !important;
  --bs-offcanvas-color: #FFFFFF !important;
  --bs-nav-link-color: #FFFFFF;
  --bs-nav-link-hover-color: #FFFFFF;
  --mathesio-nav-hover-color: #FFFFFF;
  --mathesio-nav-hover-bg: #004D32;
  --mathesio-nav-active-bg: #003F29;
  --mathesio-nav-active-color: #FFFFFF;
  background-color: #004F33;
  color: #FFFFFF;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .admin-sidebar .nav-link, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .mathesio-main-navigation .nav-link{ color: #FFFFFF; border-radius: 4px; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .admin-sidebar .nav-link:hover, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .mathesio-main-navigation .nav-link:hover{ background-color: var(--mathesio-nav-hover-bg); color: var(--mathesio-nav-hover-color); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .admin-sidebar .nav-link.active, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .admin-sidebar .nav-link[aria-current="page"], html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .mathesio-main-navigation .nav-link.active, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .mathesio-main-navigation .nav-link[aria-current="page"]{ background-color: var(--mathesio-nav-active-bg); color: var(--mathesio-nav-active-color); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .navbar{ --bs-navbar-color: var(--mathesio-nav-text); --bs-navbar-brand-color: var(--mathesio-nav-text); --bs-navbar-hover-color: var(--mathesio-nav-text); --bs-navbar-brand-hover-color: var(--mathesio-nav-text); background-color: var(--mathesio-header-bg); color: var(--mathesio-nav-text); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .card, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .dropdown-menu, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .modal-content, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .popover, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .toast{ background-color: var(--mathesio-surface-bg); color: var(--bs-body-color); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .card{ --bs-card-bg: var(--mathesio-surface-bg); --bs-card-color: var(--bs-body-color); --bs-card-border-color: var(--bs-border-color); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .dropdown-menu{ --bs-dropdown-bg: var(--mathesio-surface-bg); --bs-dropdown-color: var(--bs-body-color); --bs-dropdown-link-color: var(--bs-body-color); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .modal-content{ --bs-modal-bg: var(--mathesio-surface-bg); --bs-modal-color: var(--bs-body-color); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .popover{ --bs-popover-bg: var(--mathesio-surface-bg); --bs-popover-body-color: var(--bs-body-color); --bs-popover-header-color: var(--bs-body-color); --bs-popover-header-bg: var(--mathesio-surface-bg); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .toast{ --bs-toast-bg: var(--mathesio-surface-bg); --bs-toast-color: var(--bs-body-color); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .list-group{ --bs-list-group-bg: var(--mathesio-surface-bg); --bs-list-group-color: var(--bs-body-color); --bs-list-group-border-color: var(--bs-border-color); }

html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] {
  --mathesio-primary-contrast: #FFFFFF;
  --mathesio-primary-text: #004F33;
  --mathesio-secondary-text: #6C757D;
  --mathesio-surface-bg: #FFFFFF;
  --mathesio-header-bg: #004F33;
  --bs-link-color: #004F33;
  --bs-link-hover-color: #004F33;
  --bs-link-color-rgb: 0, 79, 51;
  --bs-link-hover-color-rgb: 0, 79, 51;
  background-color: var(--bs-body-bg);
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .table > thead.table-light {
  --bs-table-bg: #F8F9FA;
  --bs-table-color: #212529;
  --bs-table-border-color: var(--bs-border-color);
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .btn-close { filter: none; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .dropdown-menu {
  --bs-dropdown-link-active-bg: #004F33;
  --bs-dropdown-link-active-color: #FFFFFF;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .btn-primary {
  --bs-btn-color: #FFFFFF;
  --bs-btn-border-color: #004F33;
  --bs-btn-hover-bg: #00432B;
  --bs-btn-hover-color: #FFFFFF;
  --bs-btn-active-bg: #003F29;
  --bs-btn-active-color: #FFFFFF;
  --bs-btn-disabled-color: #FFFFFF;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .btn-outline-primary {
  --bs-btn-color: #004F33;
  --bs-btn-border-color: #004F33;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .link-primary { color: #004F33 !important; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .link-primary:hover { color: #004F33 !important; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .link-primary:focus { color: #004F33 !important; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .text-primary { color: #004F33 !important; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .btn-secondary {
  --bs-btn-color: #FFFFFF;
  --bs-btn-border-color: #6C757D;
  --bs-btn-hover-bg: #616970;
  --bs-btn-hover-color: #FFFFFF;
  --bs-btn-active-bg: #5D656C;
  --bs-btn-active-color: #FFFFFF;
  --bs-btn-disabled-color: #FFFFFF;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .btn-outline-secondary {
  --bs-btn-color: #6C757D;
  --bs-btn-border-color: #6C757D;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .link-secondary { color: #6C757D !important; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .link-secondary:hover { color: #6C757D !important; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .link-secondary:focus { color: #6C757D !important; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="light"] .text-secondary { color: #6C757D !important; }

html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"]{
  color-scheme: dark;
  --mathesio-surface-bg: #212529;
  --mathesio-header-bg: #004F33;
  --mathesio-nav-text: #FFFFFF;
  --bs-primary: #004F33;
  --bs-primary-rgb: 0, 79, 51;
  --bs-secondary: #6C757D;
  --bs-secondary-rgb: 108, 117, 125;
  --bs-primary-text-emphasis: #739E8F;
  --bs-primary-text-emphasis-rgb: 115, 158, 143;
  --bs-primary-bg-subtle: #1D2A2A;
  --bs-primary-border-subtle: #15342D;
  --bs-secondary-text-emphasis: #AEB3B8;
  --bs-secondary-text-emphasis-rgb: 174, 179, 184;
  --bs-secondary-bg-subtle: #2A2F33;
  --bs-secondary-border-subtle: #3B4146;
  --bs-body-bg: #212529;
  --bs-body-color: #F8F9FA;
  --bs-body-bg-rgb: 33, 37, 41;
  --bs-body-color-rgb: 248, 249, 250;
  --bs-emphasis-color: #F8F9FA;
  --bs-emphasis-color-rgb: 248, 249, 250;
  --bs-secondary-color: #C2C4C6;
  --bs-secondary-color-rgb: 194, 196, 198;
  --bs-tertiary-color: #A2A4A6;
  --bs-tertiary-color-rgb: 162, 164, 166;
  --bs-secondary-bg: #2A2D31;
  --bs-secondary-bg-rgb: 42, 45, 49;
  --bs-tertiary-bg: #32363A;
  --bs-tertiary-bg-rgb: 50, 54, 58;
  --bs-border-color: #6C6F72;
  --bs-border-color-translucent: #6C6F72;
  --bs-link-color: #004F33;
  --bs-link-color-rgb: 0, 79, 51;
  --bs-link-hover-color: #4D8470;
  --bs-link-hover-color-rgb: 77, 132, 112;
  --bs-body-font-size: 16px;
  --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-body-font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mathesio-logo-display-height: 32px;
  --mathesio-heading-color: #F8F9FA;
  --mathesio-heading-weight: 600;
  --mathesio-focus-color: #3D7964;
  --mathesio-primary-contrast: #FFFFFF;
  --mathesio-form-control-bg: #212529;
  --mathesio-form-control-color: #F8F9FA;
  --mathesio-form-control-border-color: #858B91;
  --mathesio-form-control-border-radius: 4px;
  --mathesio-form-control-padding-x: 12px;
  --mathesio-form-control-padding-y: 6px;
  --mathesio-form-control-focus-color: #3D7964;
  --mathesio-form-control-focus-shadow-color: color-mix(in srgb, var(--mathesio-form-control-focus-color) 25%, transparent);
  --mathesio-form-control-valid-color: #409B71;
  --mathesio-form-control-invalid-color: #E4616E;
  --bs-border-radius: 4px;
  --bs-border-radius-sm: 4px;
  --bs-border-radius-lg: 4px;
  --bs-border-radius-xl: 4px;
  --bs-border-radius-xxl: 4px;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] body{ background-color: var(--bs-body-bg); color: var(--bs-body-color); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] h1, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] h2, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] h3, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] h4, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] h5, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] h6, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .h1, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .h2, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .h3, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .h4, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .h5, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .h6{ color: var(--mathesio-heading-color); font-weight: var(--mathesio-heading-weight); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .btn-primary{
  --bs-btn-color: #FFFFFF;
  --bs-btn-bg: #004F33;
  --bs-btn-border-color: #004F33;
  --bs-btn-hover-color: #FFFFFF;
  --bs-btn-hover-bg: #00432B;
  --bs-btn-hover-border-color: #00432B;
  --bs-btn-active-color: #FFFFFF;
  --bs-btn-active-bg: #003B26;
  --bs-btn-active-border-color: #003B26;
  --bs-btn-disabled-color: #FFFFFF;
  --bs-btn-disabled-bg: #004F33;
  --bs-btn-disabled-border-color: #004F33;
  --bs-btn-focus-shadow-rgb: 0, 79, 51;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .btn-secondary{
  --bs-btn-color: #FFFFFF;
  --bs-btn-bg: #6C757D;
  --bs-btn-border-color: #6C757D;
  --bs-btn-hover-color: #FFFFFF;
  --bs-btn-hover-bg: #5C636A;
  --bs-btn-hover-border-color: #5C636A;
  --bs-btn-active-color: #FFFFFF;
  --bs-btn-active-bg: #51585E;
  --bs-btn-active-border-color: #51585E;
  --bs-btn-disabled-color: #FFFFFF;
  --bs-btn-disabled-bg: #6C757D;
  --bs-btn-disabled-border-color: #6C757D;
  --bs-btn-focus-shadow-rgb: 108, 117, 125;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .btn-outline-primary{
  --bs-btn-color: #004F33;
  --bs-btn-border-color: #004F33;
  --bs-btn-hover-color: #FFFFFF;
  --bs-btn-hover-bg: #004F33;
  --bs-btn-hover-border-color: #004F33;
  --bs-btn-active-color: #FFFFFF;
  --bs-btn-active-bg: #004F33;
  --bs-btn-active-border-color: #004F33;
  --bs-btn-disabled-color: #004F33;
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: #004F33;
  --bs-btn-focus-shadow-rgb: 0, 79, 51;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .btn-outline-secondary{
  --bs-btn-color: #6C757D;
  --bs-btn-border-color: #6C757D;
  --bs-btn-hover-color: #FFFFFF;
  --bs-btn-hover-bg: #6C757D;
  --bs-btn-hover-border-color: #6C757D;
  --bs-btn-active-color: #FFFFFF;
  --bs-btn-active-bg: #6C757D;
  --bs-btn-active-border-color: #6C757D;
  --bs-btn-disabled-color: #6C757D;
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: #6C757D;
  --bs-btn-focus-shadow-rgb: 108, 117, 125;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .btn-primary:not(.btn-sm):not(.btn-lg), html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .btn-secondary:not(.btn-sm):not(.btn-lg), html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .btn-outline-primary:not(.btn-sm):not(.btn-lg), html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .btn-outline-secondary:not(.btn-sm):not(.btn-lg){
  --bs-btn-border-radius: 4px;
  --bs-btn-padding-x: 12px;
  --bs-btn-padding-y: 6px;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .btn, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .btn-sm, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .btn-lg{
  --bs-btn-border-radius: 4px;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .text-bg-primary{ color: #FFFFFF !important; background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity, 1)) !important; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .text-bg-secondary{ color: #FFFFFF !important; background-color: rgba(var(--bs-secondary-rgb), var(--bs-bg-opacity, 1)) !important; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .dropdown-menu{
  --bs-dropdown-link-active-bg: var(--bs-primary);
  --bs-dropdown-link-active-color: #FFFFFF;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .alert-success{
  --bs-alert-color: #FFFFFF;
  --bs-alert-bg: #20312E;
  --bs-alert-border-color: #1E4738;
  --bs-alert-link-color: #FFFFFF;
  --bs-alert-border-radius: 4px;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .alert-danger{
  --bs-alert-color: #FFFFFF;
  --bs-alert-bg: #37272C;
  --bs-alert-border-color: #622B33;
  --bs-alert-link-color: #FFFFFF;
  --bs-alert-border-radius: 4px;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .alert-warning{
  --bs-alert-color: #FFFFFF;
  --bs-alert-bg: #3C3825;
  --bs-alert-border-color: #6F5C1D;
  --bs-alert-link-color: #FFFFFF;
  --bs-alert-border-radius: 4px;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .alert-info{
  --bs-alert-color: #FFFFFF;
  --bs-alert-bg: #1F3941;
  --bs-alert-border-color: #1A5F6F;
  --bs-alert-link-color: #FFFFFF;
  --bs-alert-border-radius: 4px;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .form-control, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .form-select{
  --bs-body-bg: #212529;
  --bs-body-color: #F8F9FA;
  background-color: #212529;
  color: #F8F9FA;
  border-color: #858B91;
  border-radius: 4px;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .form-control:not(.form-control-sm):not(.form-control-lg), html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .form-select:not(.form-select-sm):not(.form-select-lg){ padding: 6px 12px; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .form-control:focus, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .form-select:focus{ border-color: var(--mathesio-focus-color); box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--mathesio-focus-color) 25%, transparent); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .form-select:not([multiple]):not([size]){ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23F8F9FA' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .form-control.is-valid, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .form-select.is-valid, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .was-validated .form-control:valid, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .was-validated .form-select:valid{ border-color: #409B71; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .form-control.is-invalid, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .form-select.is-invalid, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .was-validated .form-control:invalid, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .was-validated .form-select:invalid{ border-color: #E4616E; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .valid-feedback{ color: #409B71; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .invalid-feedback{ color: #E4616E; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .table{ --bs-table-color: var(--bs-body-color); --bs-table-bg: var(--bs-body-bg); --bs-table-border-color: #858B91; --bs-table-striped-color: var(--bs-body-color); --bs-table-striped-bg: #2B3035; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .table:not(.table-sm) > :not(caption) > * > *{ padding: 8px; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .table > thead{ --bs-table-bg: #2B3035; --bs-table-color: #F8F9FA; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .admin-sidebar, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .mathesio-main-navigation{
  --bs-offcanvas-bg: #004F33 !important;
  --bs-offcanvas-color: #FFFFFF !important;
  --bs-nav-link-color: #FFFFFF;
  --bs-nav-link-hover-color: #FFFFFF;
  --mathesio-nav-hover-color: #FFFFFF;
  --mathesio-nav-hover-bg: #054B33;
  --mathesio-nav-active-bg: #2B3035;
  --mathesio-nav-active-color: #F8F9FA;
  background-color: #004F33;
  color: #FFFFFF;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .admin-sidebar .nav-link, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .mathesio-main-navigation .nav-link{ color: #FFFFFF; border-radius: 4px; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .admin-sidebar .nav-link:hover, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .mathesio-main-navigation .nav-link:hover{ background-color: var(--mathesio-nav-hover-bg); color: var(--mathesio-nav-hover-color); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .admin-sidebar .nav-link.active, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .admin-sidebar .nav-link[aria-current="page"], html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .mathesio-main-navigation .nav-link.active, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .mathesio-main-navigation .nav-link[aria-current="page"]{ background-color: var(--mathesio-nav-active-bg); color: var(--mathesio-nav-active-color); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .navbar{ --bs-navbar-color: var(--mathesio-nav-text); --bs-navbar-brand-color: var(--mathesio-nav-text); --bs-navbar-hover-color: var(--mathesio-nav-text); --bs-navbar-brand-hover-color: var(--mathesio-nav-text); background-color: var(--mathesio-header-bg); color: var(--mathesio-nav-text); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .btn-close{ filter: invert(1) grayscale(100%) brightness(200%); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .card, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .dropdown-menu, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .modal-content, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .popover, html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .toast{ background-color: var(--mathesio-surface-bg); color: var(--bs-body-color); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .card{ --bs-card-bg: var(--mathesio-surface-bg); --bs-card-color: var(--bs-body-color); --bs-card-border-color: var(--bs-border-color); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .dropdown-menu{ --bs-dropdown-bg: var(--mathesio-surface-bg); --bs-dropdown-color: var(--bs-body-color); --bs-dropdown-link-color: var(--bs-body-color); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .modal-content{ --bs-modal-bg: var(--mathesio-surface-bg); --bs-modal-color: var(--bs-body-color); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .popover{ --bs-popover-bg: var(--mathesio-surface-bg); --bs-popover-body-color: var(--bs-body-color); --bs-popover-header-color: var(--bs-body-color); --bs-popover-header-bg: var(--mathesio-surface-bg); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .toast{ --bs-toast-bg: var(--mathesio-surface-bg); --bs-toast-color: var(--bs-body-color); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .list-group{ --bs-list-group-bg: var(--mathesio-surface-bg); --bs-list-group-color: var(--bs-body-color); --bs-list-group-border-color: var(--bs-border-color); }

html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] {
  --mathesio-primary-contrast: #FFFFFF;
  --mathesio-primary-text: #669585;
  --mathesio-secondary-text: #858C93;
  --mathesio-surface-bg: #212529;
  --mathesio-header-bg: #004F33;
  --bs-link-color: #669585;
  --bs-link-hover-color: #669585;
  --bs-link-color-rgb: 102, 149, 133;
  --bs-link-hover-color-rgb: 102, 149, 133;
  background-color: var(--bs-body-bg);
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .table > thead.table-light {
  --bs-table-bg: #2B3035;
  --bs-table-color: #F8F9FA;
  --bs-table-border-color: var(--bs-border-color);
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .dropdown-menu {
  --bs-dropdown-link-active-bg: #004F33;
  --bs-dropdown-link-active-color: #FFFFFF;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .btn-primary {
  --bs-btn-color: #FFFFFF;
  --bs-btn-border-color: #3D7964;
  --bs-btn-hover-bg: #00432B;
  --bs-btn-hover-color: #FFFFFF;
  --bs-btn-active-bg: #003F29;
  --bs-btn-active-color: #FFFFFF;
  --bs-btn-disabled-color: #FFFFFF;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .btn-outline-primary {
  --bs-btn-color: #669585;
  --bs-btn-border-color: #669585;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .link-primary { color: #669585 !important; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .link-primary:hover { color: #669585 !important; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .link-primary:focus { color: #669585 !important; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .text-primary { color: #669585 !important; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .btn-secondary {
  --bs-btn-color: #FFFFFF;
  --bs-btn-border-color: #6C757D;
  --bs-btn-hover-bg: #818990;
  --bs-btn-hover-color: #000000;
  --bs-btn-active-bg: #888F96;
  --bs-btn-active-color: #000000;
  --bs-btn-disabled-color: #FFFFFF;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .btn-outline-secondary {
  --bs-btn-color: #858C93;
  --bs-btn-border-color: #858C93;
}
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .link-secondary { color: #858C93 !important; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .link-secondary:hover { color: #858C93 !important; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .link-secondary:focus { color: #858C93 !important; }
html[data-mathesio-color-mode-enabled="true"][data-bs-theme="dark"] .text-secondary { color: #858C93 !important; }
