html[data-site-theme="dark"] {
  color-scheme: dark !important;
  --bg-main: #1b1918;
  --bg-secondary: #252220;
  --surface-card: #282523;
  --text-main: #f0ece8;
  --text-secondary: #c9c1bc;
  --text-muted: #aaa19b;
  --border-color: #514a46;
  --primary: #8b0000;
  --primary-hover: #a11212;
  --text-on-primary: #ffffff;
  --success: #72cc96;
  --error: #ff7b88;
  --warning: #f0bd62;
  --info: #82aaff;
  --shadow-sm: 0 6px 18px rgb(0 0 0 / 35%);
  --shadow-md: 0 18px 45px rgb(0 0 0 / 42%);
  --site-theme-bg: #191716;
  --site-theme-surface: #282523;
  --site-theme-text: #f0ece8;
  --site-theme-muted: #b7ada7;
  --site-theme-border: #514a46;
  --site-theme-accent: #f0a0a0;
  --site-theme-control-bg: #2b2826;
  background-color: var(--site-theme-bg) !important;
  color: var(--site-theme-text) !important;
}

html[data-site-theme="dark"] body {
  color-scheme: dark !important;
  background-color: var(--site-theme-bg) !important;
  color: var(--site-theme-text) !important;
}

html[data-site-theme="dark"] input:not([type="color"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html[data-site-theme="dark"] select,
html[data-site-theme="dark"] textarea {
  color-scheme: dark;
  background-color: var(--site-theme-control-bg) !important;
  border-color: var(--site-theme-border) !important;
  color: var(--site-theme-text) !important;
}

html[data-site-theme="dark"] ::file-selector-button {
  color: var(--site-theme-text);
  background-color: var(--site-theme-surface);
  border-color: var(--site-theme-border);
}

html[data-site-app="np-hard"][data-site-theme="dark"] {
  --muted: #aeb8ad;
  --green: #d2e8a6;
  --line: #465247;
  --dark: #e7eee5;
}

html[data-site-app="np-hard"][data-site-theme="dark"] .topbar {
  background: #222722;
  border-color: var(--site-theme-border);
}

html[data-site-app="np-hard"][data-site-theme="dark"] .brand {
  color: var(--site-theme-accent);
}

html[data-site-app="np-hard"][data-site-theme="dark"] .nav-item:hover {
  background: #302c29;
  color: var(--site-theme-accent);
}

html[data-site-app="np-hard"][data-site-theme="dark"] .sidebar-note {
  background: linear-gradient(130deg, #302c29, #262a26);
  border-color: var(--site-theme-border);
}

html[data-site-app="np-hard"][data-site-theme="dark"] .feature {
  color: var(--site-theme-text);
  background: linear-gradient(135deg, #29352a, #222923);
  border-color: #465247;
}

html[data-site-app="np-hard"][data-site-theme="dark"] .puzzle-card,
html[data-site-app="np-hard"][data-site-theme="dark"] .play-panel,
html[data-site-app="np-hard"][data-site-theme="dark"] .mission,
html[data-site-app="np-hard"][data-site-theme="dark"] .stats-row,
html[data-site-app="np-hard"][data-site-theme="dark"] .personal-best,
html[data-site-app="np-hard"][data-site-theme="dark"] .secondary,
html[data-site-app="np-hard"][data-site-theme="dark"] .search,
html[data-site-app="np-hard"][data-site-theme="dark"] .card,
html[data-site-app="np-hard"][data-site-theme="dark"] .panel,
html[data-site-app="np-hard"][data-site-theme="dark"] .modal {
  color: var(--site-theme-text);
  background-color: var(--site-theme-surface);
  border-color: var(--site-theme-border);
}

html[data-site-app="np-hard"][data-site-theme="dark"] .feature-label span,
html[data-site-app="np-hard"][data-site-theme="dark"] .card-icon,
html[data-site-app="np-hard"][data-site-theme="dark"] .game-title-icon,
html[data-site-app="np-hard"][data-site-theme="dark"] .count-badge,
html[data-site-app="np-hard"][data-site-theme="dark"] .card-arrow,
html[data-site-app="np-hard"][data-site-theme="dark"] .nav-count,
html[data-site-app="np-hard"][data-site-theme="dark"] .active .nav-count {
  color: var(--site-theme-accent);
  background: #3a2a2a;
}

html[data-site-app="np-hard"][data-site-theme="dark"] .filter.selected {
  color: var(--site-theme-accent);
  background: #3a2a2a;
  border-color: var(--site-theme-accent);
}

html[data-site-app="np-hard"][data-site-theme="dark"] .page-heading h1,
html[data-site-app="np-hard"][data-site-theme="dark"] .feature h2 {
  color: var(--site-theme-accent);
}

html[data-site-app="np-hard"][data-site-theme="dark"] .meter {
  background: #494440;
}

@media (max-width: 650px) {
  html[data-site-app="np-hard"][data-site-theme="dark"] .feature-copy {
    background: linear-gradient(90deg, #252321 30%, rgb(37 35 33 / 93%) 65%, transparent);
  }
}

html[data-site-app="python-blocks"][data-site-theme="dark"] {
  --border-color: #514a46;
  --background-color: #1b1918;
  --background-box-title: #292624;
  --dfBackgroundColor: #1b1918;
  --dfBackgroundImage: radial-gradient(#625a55 1px, transparent 1px);
  --dfNodeBackgroundColor: #292624;
  --dfNodeTextColor: #f0ece8;
  --dfNodeBorderColor: #d58a8a;
  --dfNodeBoxShadowColor: rgb(0 0 0 / 45%);
}

html[data-site-app="python-blocks"][data-site-theme="dark"] h1,
html[data-site-app="python-blocks"][data-site-theme="dark"] h2,
html[data-site-app="python-blocks"][data-site-theme="dark"] h3,
html[data-site-app="python-blocks"][data-site-theme="dark"] h4 {
  color: var(--site-theme-accent) !important;
}

html[data-site-app="python-blocks"][data-site-theme="dark"] .bg-white {
  background-color: var(--site-theme-surface) !important;
}

html[data-site-app="python-blocks"][data-site-theme="dark"] .text-black,
html[data-site-app="python-blocks"][data-site-theme="dark"] .text-gray-900,
html[data-site-app="python-blocks"][data-site-theme="dark"] .text-gray-800 {
  color: var(--site-theme-text) !important;
}

html[data-site-app="python-blocks"][data-site-theme="dark"] .sb-header,
html[data-site-app="python-blocks"][data-site-theme="dark"] .code-panel,
html[data-site-app="python-blocks"][data-site-theme="dark"] .section-shell,
html[data-site-app="python-blocks"][data-site-theme="dark"] .zone-selector {
  color: var(--site-theme-text);
  background: var(--site-theme-surface);
  border-color: var(--site-theme-border);
}

html[data-site-app="python-blocks"][data-site-theme="dark"] .sb-title,
html[data-site-app="python-blocks"][data-site-theme="dark"] .back-link,
html[data-site-app="python-blocks"][data-site-theme="dark"] .panel-title {
  color: var(--site-theme-accent);
}

html[data-site-app="python-blocks"][data-site-theme="dark"] .sb-canvas {
  background-color: #1b1918;
  background-image: radial-gradient(circle, rgb(177 168 160 / 32%) 1px, transparent 1px);
}

html[data-site-app="python-blocks"][data-site-theme="dark"] .panel-header,
html[data-site-app="python-blocks"][data-site-theme="dark"] .collapsed-toggle {
  color: var(--site-theme-text);
  background: #302c29;
  border-color: var(--site-theme-border);
}

html[data-site-app="python-blocks"][data-site-theme="dark"] .section-heading,
html[data-site-app="python-blocks"][data-site-theme="dark"] .runtime-subtitle,
html[data-site-app="python-blocks"][data-site-theme="dark"] .panel-subtitle {
  color: var(--site-theme-muted);
}

html[data-site-app="python-blocks"][data-site-theme="dark"] .import-input {
  color: var(--site-theme-text);
  background: #1b1918;
  border-color: var(--site-theme-border);
}

html[data-site-app="python-blocks"][data-site-theme="dark"] .clear-btn,
html[data-site-app="python-blocks"][data-site-theme="dark"] .mode-btn:not(.mode-btn--active),
html[data-site-app="python-blocks"][data-site-theme="dark"] .runtime-btn:not(.runtime-btn--primary),
html[data-site-app="python-blocks"][data-site-theme="dark"] .copy-btn:not(.copied),
html[data-site-app="python-blocks"][data-site-theme="dark"] .ghost-btn {
  color: var(--site-theme-text);
  background: var(--site-theme-control-bg);
  border-color: var(--site-theme-border);
}

html[data-site-app="python-blocks"][data-site-theme="dark"] .runtime-btn:hover:not(:disabled),
html[data-site-app="python-blocks"][data-site-theme="dark"] .copy-btn:not(.copied):hover {
  color: var(--site-theme-accent);
  background: #3a302e;
  border-color: var(--site-theme-accent);
}

html[data-site-app="python-blocks"][data-site-theme="dark"] .zone-selector__item {
  color: var(--site-theme-text);
  background: #24211f;
}

html[data-site-app="python-blocks"][data-site-theme="dark"] .zone-selector__item:hover,
html[data-site-app="python-blocks"][data-site-theme="dark"] .zone-selector__item--active {
  background: #3a2a2a;
}

html[data-site-app="python-blocks"][data-site-theme="dark"] .zone-selector__item small {
  color: var(--site-theme-muted);
}

html[data-site-app="python-blocks"][data-site-theme="dark"] .expr-select option {
  color: #f0ece8;
  background: #282523;
}

html[data-site-app="python-blocks"][data-site-theme="dark"] .expr-textarea,
html[data-site-app="python-blocks"][data-site-theme="dark"] .expr-input,
html[data-site-app="python-blocks"][data-site-theme="dark"] .expr-select {
  color: #ffffff !important;
  background: rgb(0 0 0 / 22%) !important;
  border-color: rgb(255 255 255 / 26%) !important;
}

html[data-site-app="hoare-logic"][data-site-theme="dark"] {
  --bg-main: #1b1918;
  --bg-secondary: #252220;
  --text-main: #f0ece8;
  --text-secondary: #c9c1bc;
  --color-on-dark: #ffffff;
  --accent-statement-soft: #3a3023;
  --accent-statement-text: #f0c77c;
  --accent-statement-border: #866c3c;
  --accent-expression-soft: #222d41;
  --accent-expression-text: #a9c5ff;
  --accent-expression-border: #536a98;
  --success: #72cc96;
  --error: #ff7b88;
  --warning: #f0bd62;
  --info: #82aaff;
  --divider: #514a46;
  --shadow-soft: 0 2px 8px rgb(0 0 0 / 35%);
  --shadow-strong: 0 14px 36px rgb(0 0 0 / 50%);
}

html[data-site-app="hoare-logic"][data-site-theme="dark"] h1,
html[data-site-app="hoare-logic"][data-site-theme="dark"] h2,
html[data-site-app="hoare-logic"][data-site-theme="dark"] h3,
html[data-site-app="hoare-logic"][data-site-theme="dark"] h4,
html[data-site-app="hoare-logic"][data-site-theme="dark"] a {
  color: var(--site-theme-accent);
}

html[data-site-app="hoare-logic"][data-site-theme="dark"] .btn-secondary:hover {
  background: #342d2a;
}

html[data-site-app="hoare-logic"][data-site-theme="dark"] .btn-small.btn-danger:hover {
  background: #3a2426;
}

html[data-site-app="xml-weaver"][data-site-theme="dark"] {
  --color-text: #f0ece8;
  --color-text-muted: #b7ada7;
  --color-text-soft: #d0c8c2;
  --color-text-accent: #f0a0a0;
  --color-text-accent-strong: #ffb9b9;
  --color-border: #625a55;
  --color-border-subtle: #49433f;
  --color-border-selected: #e79a9a;
  --color-surface-body: #191716;
  --color-surface-base: #24211f;
  --color-surface-active: #302c29;
  --color-surface-overlay: rgb(36 33 31 / 96%);
  --color-surface-panel: #24211f;
  --color-surface-tab: #302c29;
  --color-surface-pill: #302c29;
  --color-surface-chip: #302c29;
  --color-surface-attribute: #27303a;
  --color-surface-meta: #302c29;
  --color-surface-placeholder: rgb(230 138 0 / 14%);
  --color-surface-selected: rgb(231 154 154 / 14%);
  --color-backdrop: rgb(0 0 0 / 65%);
  --color-connector: rgb(177 168 160 / 48%);
  --color-connector-strong: rgb(231 154 154 / 68%);
  --color-danger-text: #ff8585;
  --color-migration-text: #c4a4ff;
}

html[data-site-app="stammbaum"][data-site-theme="dark"] {
  --ink: #f0ece8;
  --muted-ink: #b7ada7;
  --paper: #282523;
  --canvas: #1e1c1b;
  --line: #514a46;
  --teal-deep: #274846;
  --shadow: 0 6px 16px rgb(0 0 0 / 38%);
}

html[data-site-app="stammbaum"][data-site-theme="dark"] .app-shell {
  background:
    radial-gradient(circle at 12% 8%, rgb(199 155 75 / 8%), transparent 24rem),
    linear-gradient(135deg, #201e1c 0%, #191716 52%, #171615 100%);
}

html[data-site-app="stammbaum"][data-site-theme="dark"] .topbar {
  background: rgb(29 27 25 / 92%);
  border-color: var(--site-theme-border);
}

html[data-site-app="stammbaum"][data-site-theme="dark"] .brand-lockup h1,
html[data-site-app="stammbaum"][data-site-theme="dark"] .toolbar-button:not(.toolbar-button--active),
html[data-site-app="stammbaum"][data-site-theme="dark"] .add-person-button {
  color: #c4d6ce;
}

html[data-site-app="stammbaum"][data-site-theme="dark"] .toolbar-button:not(.toolbar-button--accent):not(.toolbar-button--active),
html[data-site-app="stammbaum"][data-site-theme="dark"] .add-person-button {
  background: rgb(255 255 255 / 6%);
  border-color: rgb(196 214 206 / 24%);
}

html[data-site-app="stammbaum"][data-site-theme="dark"] .inspector-panel {
  background: rgb(40 37 35 / 94%);
  border-color: var(--site-theme-border);
}

html[data-site-app="background-generator"][data-site-theme="dark"] .background-generator-app {
  color: var(--site-theme-text);
  background-color: transparent;
}

html[data-site-app="background-generator"][data-site-theme="dark"] .background-generator-app h1,
html[data-site-app="background-generator"][data-site-theme="dark"] .background-generator-app h2,
html[data-site-app="background-generator"][data-site-theme="dark"] .background-generator-app h3,
html[data-site-app="background-generator"][data-site-theme="dark"] .background-generator-app h4,
html[data-site-app="background-generator"][data-site-theme="dark"] .background-generator-app strong {
  color: var(--site-theme-accent);
}

html[data-site-app="background-generator"][data-site-theme="dark"] .background-generator-app fieldset,
html[data-site-app="background-generator"][data-site-theme="dark"] .background-generator-app .preview-panel {
  background-color: var(--site-theme-surface);
  border-color: var(--site-theme-border);
}

html[data-site-app="background-generator"][data-site-theme="dark"] .background-generator-app label,
html[data-site-app="background-generator"][data-site-theme="dark"] .background-generator-app input,
html[data-site-app="background-generator"][data-site-theme="dark"] .background-generator-app select,
html[data-site-app="background-generator"][data-site-theme="dark"] .background-generator-app textarea {
  color: var(--site-theme-text);
}

html[data-site-app="background-generator"][data-site-theme="dark"] .background-generator-app .preview-area {
  background: #1b1918;
  border-color: #625a55;
}

html[data-site-app="background-generator"][data-site-theme="dark"] .background-generator-app [data-role="meta"] {
  color: var(--site-theme-muted);
}

html[data-site-app="parallelismus"][data-site-theme="dark"] .parallelismus-app .controls select,
html[data-site-app="parallelismus"][data-site-theme="dark"] .parallelismus-app .controls input,
html[data-site-app="parallelismus"][data-site-theme="dark"] .parallelismus-app .controls button,
html[data-site-app="parallelismus"][data-site-theme="dark"] .parallelismus-app .add-relation-form select,
html[data-site-app="parallelismus"][data-site-theme="dark"] .parallelismus-app .add-relation-form input {
  color: var(--site-theme-text);
  background: var(--site-theme-control-bg);
  border-color: var(--site-theme-border);
}

html[data-site-app="parallelismus"][data-site-theme="dark"] .parallelismus-app .controls button {
  background: linear-gradient(180deg, #393431, #2b2826);
}

html[data-site-app="parallelismus"][data-site-theme="dark"] .parallelismus-app .word-box {
  color: var(--site-theme-text);
  border-color: var(--site-theme-border);
}

html[data-site-app="parallelismus"][data-site-theme="dark"] .parallelismus-app .word-box.has-relation {
  background: linear-gradient(180deg, #3a3026, #302a23);
  border-color: #806544;
}

html[data-site-app="parallelismus"][data-site-theme="dark"] .parallelismus-app .word-english {
  color: var(--site-theme-text);
}

html[data-site-app="parallelismus"][data-site-theme="dark"] .parallelismus-app .members-list {
  background: #211f1e;
  border-color: var(--site-theme-border);
}

html[data-site-app="hebr-isch"][data-site-theme="dark"] .brand h1,
html[data-site-app="hebr-isch"][data-site-theme="dark"] .welcome h2,
html[data-site-app="hebr-isch"][data-site-theme="dark"] .stat-value,
html[data-site-app="hebr-isch"][data-site-theme="dark"] .alphabet-title h2,
html[data-site-app="hebr-isch"][data-site-theme="dark"] .nav:hover,
html[data-site-app="hebr-isch"][data-site-theme="dark"] .nav.active,
html[data-site-app="hebr-isch"][data-site-theme="dark"] .section-head button,
html[data-site-app="hebr-isch"][data-site-theme="dark"] .eyebrow {
  color: var(--site-theme-accent);
}

html[data-site-app="hebr-isch"][data-site-theme="dark"] .answer:hover {
  color: var(--site-theme-accent);
  border-color: var(--site-theme-accent);
}

html[data-site-app="koine-griechisch"][data-site-theme="dark"] h1,
html[data-site-app="koine-griechisch"][data-site-theme="dark"] h2,
html[data-site-app="koine-griechisch"][data-site-theme="dark"] h3,
html[data-site-app="koine-griechisch"][data-site-theme="dark"] .brand,
html[data-site-app="koine-griechisch"][data-site-theme="dark"] .nav:hover,
html[data-site-app="koine-griechisch"][data-site-theme="dark"] .nav.active,
html[data-site-app="koine-griechisch"][data-site-theme="dark"] .path-card > span,
html[data-site-app="koine-griechisch"][data-site-theme="dark"] .count,
html[data-site-app="koine-griechisch"][data-site-theme="dark"] .eyebrow,
html[data-site-app="koine-griechisch"][data-site-theme="dark"] .sound {
  color: var(--site-theme-accent);
}

html[data-site-app="koine-griechisch"][data-site-theme="dark"] .answer:hover,
html[data-site-app="koine-griechisch"][data-site-theme="dark"] .quiet:hover,
html[data-site-app="koine-griechisch"][data-site-theme="dark"] .verse-actions button:hover {
  color: var(--site-theme-accent);
  border-color: var(--site-theme-accent);
}

html[data-site-app="office"][data-site-theme="dark"] {
  --page-bg: #191716;
  --ink: #f0ece8;
  --muted: #b7ada7;
  --line: #514a46;
  --paper: #282523;
  --accent: #7669e5;
  --accent-soft: #302d46;
}

html[data-site-app="office"][data-site-theme="dark"] #editor .ProseMirror[data-page-mode="document"],
html[data-site-app="office"][data-site-theme="dark"] #editor .ProseMirror[data-page-mode="presentation"] {
  --paper: #fbfbf8;
  --ink: #24231f;
}

html[data-site-app="buchfalten"][data-site-theme="dark"] {
  --bg-1: #191716;
  --bg-2: #252220;
  --ink: #f0ece8;
  --muted: #b7ada7;
  --accent: #8b0000;
  --accent-dark: #a11212;
  --panel: #282523;
  --stroke: #514a46;
  --surface: #302c29;
  --shadow: 0 10px 28px rgb(0 0 0 / 38%);
}

html[data-site-app="buchfalten"][data-site-theme="dark"] h1,
html[data-site-app="buchfalten"][data-site-theme="dark"] h2,
html[data-site-app="buchfalten"][data-site-theme="dark"] h3,
html[data-site-app="buchfalten"][data-site-theme="dark"] h4,
html[data-site-app="buchfalten"][data-site-theme="dark"] h5,
html[data-site-app="buchfalten"][data-site-theme="dark"] h6 {
  color: var(--site-theme-accent) !important;
}

html[data-site-app="buchfalten"][data-site-theme="dark"] .mode-switch,
html[data-site-app="buchfalten"][data-site-theme="dark"] .text-composer {
  background: #302c29;
}

html[data-site-app="buchfalten"][data-site-theme="dark"] .mode-btn.active,
html[data-site-app="buchfalten"][data-site-theme="dark"] .text-grid input,
html[data-site-app="buchfalten"][data-site-theme="dark"] .text-grid select {
  color: var(--site-theme-text);
  background: #24211f;
}

html[data-site-app="buchfalten"][data-site-theme="dark"] .preview {
  background: #24211f;
  border-color: var(--site-theme-border);
}

html[data-site-app="csv-editor"][data-site-theme="dark"] {
  --bg: #191716;
  --panel: #282523;
  --panel-alt: #302c29;
  --ink: #f0ece8;
  --muted: #b7ada7;
  --line: #514a46;
  --accent: #8b0000;
  --accent-strong: #a11212;
  --danger: #ff7b88;
  --warn: #f0bd62;
  --numeric: #22384c;
  --shadow: 0 6px 18px rgb(0 0 0 / 38%);
}

html[data-site-app="csv-editor"][data-site-theme="dark"] h1,
html[data-site-app="csv-editor"][data-site-theme="dark"] h2,
html[data-site-app="csv-editor"][data-site-theme="dark"] h3,
html[data-site-app="csv-editor"][data-site-theme="dark"] h4 {
  color: var(--site-theme-accent);
}

html[data-site-app="csv-editor"][data-site-theme="dark"] #choose-file,
html[data-site-app="csv-editor"][data-site-theme="dark"] #sample-data,
html[data-site-app="csv-editor"][data-site-theme="dark"] #previous-page,
html[data-site-app="csv-editor"][data-site-theme="dark"] #next-page,
html[data-site-app="csv-editor"][data-site-theme="dark"] .small-button,
html[data-site-app="csv-editor"][data-site-theme="dark"] .filter-row select,
html[data-site-app="csv-editor"][data-site-theme="dark"] .filter-row input {
  color: var(--site-theme-text);
  background: var(--site-theme-control-bg);
  border-color: var(--site-theme-border);
}

html[data-site-app="csv-editor"][data-site-theme="dark"] th,
html[data-site-app="csv-editor"][data-site-theme="dark"] td {
  color: var(--site-theme-text);
  background: #24211f;
}

html[data-site-app="csv-editor"][data-site-theme="dark"] th {
  background: #302c29;
}

html[data-site-app="csv-editor"][data-site-theme="dark"] th.numeric {
  background: #22384c;
}

html[data-site-app="csv-editor"][data-site-theme="dark"] .row-number {
  background: #302c29;
}

html[data-site-app="csv-editor"][data-site-theme="dark"] th.row-number {
  background: #393431;
}

html[data-site-app="csv-editor"][data-site-theme="dark"] .cell-error {
  color: #ff9a94;
  background: #3a2426;
}

html[data-site-app="csv-editor"][data-site-theme="dark"] .sort-button.active {
  color: #9addc3;
  background: #263b32;
  border-color: #527a67;
}

html[data-site-app="csv-editor"][data-site-theme="dark"] td textarea {
  background: transparent !important;
}

html[data-site-app="csv-editor"][data-site-theme="dark"] .import-body.dragging {
  background: #263b32;
}

html[data-site-app="diabetes-gui"][data-site-theme="dark"] {
  --ink: #f0ece8;
  --muted: #b7ada7;
  --paper: #191716;
  --card: #282523;
  --line: #514a46;
  --accent: #8b0000;
  --accent-2: #a11212;
  --shadow: 0 10px 28px rgb(0 0 0 / 38%);
}

html[data-site-app="diabetes-gui"][data-site-theme="dark"] h1,
html[data-site-app="diabetes-gui"][data-site-theme="dark"] h2,
html[data-site-app="diabetes-gui"][data-site-theme="dark"] h3,
html[data-site-app="diabetes-gui"][data-site-theme="dark"] h4 {
  color: var(--site-theme-accent) !important;
}

html[data-site-app="diabetes-gui"][data-site-theme="dark"] .btn-secondary,
html[data-site-app="diabetes-gui"][data-site-theme="dark"] .dialog-icon-btn {
  color: var(--site-theme-text);
  background: var(--site-theme-surface);
  border-color: var(--site-theme-border);
}

html[data-site-app="diabetes-gui"][data-site-theme="dark"] .export-dialog {
  color: var(--site-theme-text);
  background: var(--site-theme-surface);
}

html[data-site-app="diabetes-gui"][data-site-theme="dark"] .export-dialog::backdrop {
  background: rgb(0 0 0 / 72%);
}

html[data-site-app="diabetes-gui"][data-site-theme="dark"] #monthSelect {
  color: var(--site-theme-text) !important;
  background: var(--site-theme-control-bg) !important;
  border-color: var(--site-theme-border) !important;
}

html[data-site-app="diabetes-gui"][data-site-theme="dark"] thead th {
  color: #e0ebe5;
  background: linear-gradient(180deg, #303b36, #28332e);
}

html[data-site-app="diabetes-gui"][data-site-theme="dark"] tbody td {
  color: var(--site-theme-text);
  border-color: var(--site-theme-border);
}

html[data-site-app="diabetes-gui"][data-site-theme="dark"] tbody td.value-high {
  color: #ffaaa1;
  background: rgb(166 53 42 / 28%);
}

html[data-site-app="diabetes-gui"][data-site-theme="dark"] tbody td.value-low {
  color: #a9d2ff;
  background: rgb(42 109 163 / 30%);
}

html[data-site-app="diabetes-gui"][data-site-theme="dark"] tbody tr:hover {
  background: rgb(35 90 149 / 18%);
}

html[data-site-app="diabetes-gui"][data-site-theme="dark"] tbody tr.selected {
  background: rgb(214 90 44 / 22%);
}

html[data-site-app="diabetes-gui"][data-site-theme="dark"] tbody tr.day-empty {
  color: var(--site-theme-muted);
}

html[data-site-app="diabetes-gui"][data-site-theme="dark"] .stack-list li {
  background: #302c29;
}

html[data-site-app="linkedin-wysiwyg"][data-site-theme="dark"] {
  --bg: #191716;
  --panel: #282523;
  --ink: #f0ece8;
  --muted: #b7ada7;
  --border: #514a46;
  --accent: #8b0000;
  --accent-strong: #a11212;
  --shadow: 0 10px 28px rgb(0 0 0 / 38%);
  --shadow-soft: 0 1px 3px rgb(0 0 0 / 38%);
}

html[data-site-app="linkedin-wysiwyg"][data-site-theme="dark"] h1,
html[data-site-app="linkedin-wysiwyg"][data-site-theme="dark"] h2,
html[data-site-app="linkedin-wysiwyg"][data-site-theme="dark"] h3,
html[data-site-app="linkedin-wysiwyg"][data-site-theme="dark"] .panel-kicker {
  color: var(--site-theme-accent);
}

html[data-site-app="linkedin-wysiwyg"][data-site-theme="dark"] .format-toggle.active {
  background: #3b2929;
}

html[data-site-app="linkedin-wysiwyg"][data-site-theme="dark"] .secondary-action:hover,
html[data-site-app="linkedin-wysiwyg"][data-site-theme="dark"] .format-toggle:hover {
  background: #393431;
}

html[data-site-app="linkedin-wysiwyg"][data-site-theme="dark"] .linkedin-card {
  color: #1a1a1a;
  background: #ffffff;
  border-color: #d8d8d8;
}

html[data-site-app="linkedin-wysiwyg"][data-site-theme="dark"] .linkedin-card .author-meta {
  color: #5b5b5b;
}

html[data-site-app="linkedin-wysiwyg"][data-site-theme="dark"] .preview-copy {
  color: #1a1a1a;
}

html[data-site-app="reverse-chart"][data-site-theme="dark"] {
  --bg: #191716;
  --ink: #f0ece8;
  --muted: #b7ada7;
  --line: #514a46;
  --panel: #282523;
  --accent: #8b0000;
  --accent-dark: #a11212;
  --shadow: 0 12px 30px rgb(0 0 0 / 40%);
}

html[data-site-app="reverse-chart"][data-site-theme="dark"] h1,
html[data-site-app="reverse-chart"][data-site-theme="dark"] h2,
html[data-site-app="reverse-chart"][data-site-theme="dark"] h3,
html[data-site-app="reverse-chart"][data-site-theme="dark"] h4 {
  color: var(--site-theme-accent);
}

html[data-site-app="reverse-chart"][data-site-theme="dark"] .sidebar {
  background: rgb(34 31 29 / 96%);
}

html[data-site-app="reverse-chart"][data-site-theme="dark"] button.secondary,
html[data-site-app="reverse-chart"][data-site-theme="dark"] .segmented button:not(.active),
html[data-site-app="reverse-chart"][data-site-theme="dark"] .icon-button {
  color: var(--site-theme-text);
  background: var(--site-theme-control-bg);
  border-color: var(--site-theme-border);
}

html[data-site-app="reverse-chart"][data-site-theme="dark"] .readout {
  background: #21312d;
  border-color: #45675b;
}

html[data-site-app="reverse-chart"][data-site-theme="dark"] .count {
  background: #302c29;
}

html[data-site-app="reverse-chart"][data-site-theme="dark"] .chart-frame {
  background:
    linear-gradient(45deg, #34312f 25%, transparent 25%),
    linear-gradient(-45deg, #34312f 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #34312f 75%),
    linear-gradient(-45deg, transparent 75%, #34312f 75%);
  background-color: #24211f;
}

html[data-site-app="reverse-chart"][data-site-theme="dark"] .chart-frame.drag-over {
  background-color: #21312d;
}
