:root {
  --is-dark-theme: true;
  color-scheme: dark;

  /* Primary — yellow #f0c674 */
  --color-primary: #f0c674;
  --color-primary-contrast: #1a1b26;
  --color-primary-dark-1: #e8be6c;
  --color-primary-dark-2: #dbb06a;
  --color-primary-dark-3: #d1a462;
  --color-primary-dark-4: #c8985a;
  --color-primary-dark-5: #bf8c52;
  --color-primary-dark-6: #b5804a;
  --color-primary-dark-7: #ab7442;
  --color-primary-light-1: #f2ce84;
  --color-primary-light-2: #f4d694;
  --color-primary-light-3: #f6dea4;
  --color-primary-light-4: #f8e6b4;
  --color-primary-light-5: #faeec4;
  --color-primary-light-6: #fcf6d4;
  --color-primary-light-7: #fefee4;
  --color-primary-alpha-10: rgba(240, 198, 116, 0.1);
  --color-primary-alpha-20: rgba(240, 198, 116, 0.2);
  --color-primary-alpha-30: rgba(240, 198, 116, 0.3);
  --color-primary-alpha-40: rgba(240, 198, 116, 0.4);
  --color-primary-alpha-50: rgba(240, 198, 116, 0.5);
  --color-primary-alpha-60: rgba(240, 198, 116, 0.6);
  --color-primary-alpha-70: rgba(240, 198, 116, 0.7);
  --color-primary-alpha-80: rgba(240, 198, 116, 0.8);
  --color-primary-alpha-90: rgba(240, 198, 116, 0.9);
  --color-primary-hover: var(--color-primary-light-1);
  --color-primary-active: var(--color-primary-light-2);

  /* Secondary — gray */
  --color-secondary: #8a8fa0;
  --color-secondary-dark-1: #525865;
  --color-secondary-dark-2: #484d5a;
  --color-secondary-dark-3: #3e424f;
  --color-secondary-dark-4: #343744;
  --color-secondary-dark-5: #2a2c39;
  --color-secondary-dark-6: #20212e;
  --color-secondary-dark-7: #1a1b26;
  --color-secondary-dark-8: #161720;
  --color-secondary-dark-9: #13141c;
  --color-secondary-dark-10: #101118;
  --color-secondary-dark-11: #0d0e14;
  --color-secondary-dark-12: #0a0b10;
  --color-secondary-dark-13: #07080c;
  --color-secondary-light-1: #9a9eb0;
  --color-secondary-light-2: #aab0c0;
  --color-secondary-light-3: #bcc0d0;
  --color-secondary-light-4: #cdd0e0;
  --color-secondary-alpha-10: rgba(92, 99, 112, 0.1);
  --color-secondary-alpha-20: rgba(92, 99, 112, 0.2);
  --color-secondary-alpha-30: rgba(92, 99, 112, 0.3);
  --color-secondary-alpha-40: rgba(92, 99, 112, 0.4);
  --color-secondary-alpha-50: rgba(92, 99, 112, 0.5);
  --color-secondary-alpha-60: rgba(92, 99, 112, 0.6);
  --color-secondary-alpha-70: rgba(92, 99, 112, 0.7);
  --color-secondary-alpha-80: rgba(92, 99, 112, 0.8);
  --color-secondary-alpha-90: rgba(92, 99, 112, 0.9);

  /* Page-level — dark #1a1b26 */
  --color-body: #1a1b26;
  --color-box-body: #1e1f2b;
  --color-text: #cdd6f4;
  --color-text-light: #d0c8a0;
  --color-text-light-1: #ddd4b0;
  --color-text-light-2: #c4ba90;
  --color-text-light-3: #b0a880;
  --color-input-text: #cdd6f4;
  --color-input-background: #22232f;
  --color-input-border: #363848;
  --color-input-border-hover: #d19a66;

  /* Header — darker #13141c */
  --color-header: #13141c;
  --color-nav-bg: #13141c;
  --color-nav-hover-bg: #1e1f2b;
  --color-nav-text: #cdd6f4;

  /* Accent — gold #d19a66 */
  --color-accent: #d19a66;
  --color-small-accent: #d19a66;

  /* Buttons */
  --color-button: #282a36;

  /* Box */
  --color-box-header: #1e1f2b;
  --color-box-body-highlight: #22232f;

  /* Shadow */
  --color-shadow: rgba(0, 0, 0, 0.6);

  /* Code */
  --color-code-bg: #16171f;
  --color-code-sidebar-bg: #13141c;

  /* Diff */
  --color-diff-removed-word-bg: rgba(224, 108, 117, 0.4);
  --color-diff-added-word-bg: rgba(152, 195, 121, 0.4);
  --color-diff-removed-row-bg: rgba(224, 108, 117, 0.1);
  --color-diff-moved-row-bg: rgba(209, 154, 102, 0.1);
  --color-diff-added-row-bg: rgba(152, 195, 121, 0.1);
  --color-diff-removed-row-border: rgba(224, 108, 117, 0.3);
  --color-diff-moved-row-border: rgba(209, 154, 102, 0.3);
  --color-diff-added-row-border: rgba(152, 195, 121, 0.3);

  /* Semantic colors */
  --color-red: #e06c75;
  --color-red-light: #e88a91;
  --color-red-dark-1: #c0555e;
  --color-red-dark-2: #a03e47;
  --color-orange: #d19a66;
  --color-orange-light: #dbb080;
  --color-orange-dark-1: #b88050;
  --color-orange-dark-2: #9f663a;
  --color-yellow: #f0c674;
  --color-yellow-light: #f4d694;
  --color-yellow-dark-1: #d0aa54;
  --color-yellow-dark-2: #b08e34;
  --color-green: #98c379;
  --color-green-light: #aed09a;
  --color-green-dark-1: #7ea85f;
  --color-green-dark-2: #648d45;
  --color-teal: #56b6c2;
  --color-teal-light: #78c8d2;
  --color-teal-dark-1: #3c9ca8;
  --color-teal-dark-2: #22828e;
  --color-blue: #61afef;
  --color-blue-light: #81c1f3;
  --color-blue-dark-1: #4195d5;
  --color-blue-dark-2: #217bbb;
  --color-violet: #c678dd;
  --color-violet-light: #d498e7;
  --color-violet-dark-1: #ac5ec3;
  --color-violet-dark-2: #9244a9;
  --color-purple: #c678dd;
  --color-purple-light: #d498e7;
  --color-purple-dark-1: #ac5ec3;
  --color-purple-dark-2: #9244a9;
  --color-pink: #e06c75;
  --color-pink-light: #e88a91;
  --color-pink-dark-1: #c0555e;
  --color-pink-dark-2: #a03e47;

  /* Labels */
  --color-label-text: #cdd6f4;
  --color-label-bg: #282a36;
  --color-label-active-bg: #363848;
  --color-label-hover-bg: #363848;
  --color-hover: rgba(209, 154, 102, 0.1);
  --color-active: rgba(209, 154, 102, 0.15);

  /* Tooltips */
  --color-tooltip-text: #cdd6f4;
  --color-tooltip-bg: #13141c;

  /* Light text used on colored backgrounds */
  --color-light: #cdd6f4;
  --color-light-dark-5: #1a1b26;

  /* Timeline */
  --color-timeline: #363848;

  /* Highlight */
  --color-highlight-bg: rgba(240, 198, 116, 0.1);
  --color-highlight-fg: #f0c674;

  /* Links */
  --color-link: #d19a66;
  --color-link-hover: #f0c674;

  /* Markdown */
  --color-markdown-table-row: #1e1f2b;
  --color-markdown-code-block: #16171f;
}

/* Force all text to be readable on dark background */
body,
body *:not(svg):not(svg *):not(code):not(pre):not(.btn):not(button):not(a):not([class*="color-"]) {
  color: #cdd6f4;
}

/* Muted/secondary/description text — soft warm tone */
[class*="secondary"],
[class*="muted"],
[class*="grey"],
[class*="gray"],
[class*="light"],
[class*="meta"],
[class*="description"],
[class*="placeholder"],
.empty-placeholder,
.empty-placeholder p,
p.large,
.ui.header .sub.header {
  color: #d0c8a0 !important;
}

/* Headers */
h1, h2, h3, h4, h5, h6,
.ui.header {
  color: #cdd6f4 !important;
}

/* Links */
a:not(.btn):not(button) {
  color: #d19a66;
}
a:not(.btn):not(button):hover {
  color: #f0c674;
}

/* Form labels and inputs */
.ui.form .field > label,
label {
  color: #cdd6f4 !important;
}
input, textarea, select {
  color: #cdd6f4 !important;
}

/* Segments, cards, items */
.ui.segment,
.ui.card,
.ui.cards > .card,
.ui.items > .item {
  background: #1e1f2b !important;
  color: #cdd6f4 !important;
}

/* Tables */
table,
.ui.table,
.ui.table thead th,
.ui.table tbody td,
.ui.table tr,
.ui.table tbody tr,
.ui.table tfoot td,
.runner-list td,
.runner-list tr {
  background: #1e1f2b !important;
  color: #cdd6f4 !important;
  border-color: #363848 !important;
}

.ui.table thead th {
  background: #13141c !important;
  color: #d0c8a0 !important;
}

.ui.table tr:hover,
.ui.table tbody tr:hover {
  background: #282a36 !important;
}

/* Striped table rows */
.ui.table tr:nth-child(2n),
.ui.striped.table tr:nth-child(2n) {
  background: #22232f !important;
}

/* Flash messages */
.ui.message,
.ui.positive.message,
.ui.negative.message,
.ui.info.message,
.ui.warning.message,
.flash-message {
  background: #282a36 !important;
  color: #cdd6f4 !important;
  border-color: #363848 !important;
}

/* Dropdowns, menus, popups */
.ui.dropdown .menu,
.ui.popup,
.tippy-box {
  background: #1e1f2b !important;
  color: #cdd6f4 !important;
  border-color: #363848 !important;
}

.ui.dropdown .menu > .item {
  color: #cdd6f4 !important;
}

/* Labels/badges */
.ui.label {
  background: #282a36 !important;
  color: #cdd6f4 !important;
}

/* Admin sidebar */
.ui.secondary.vertical.menu .item,
.ui.vertical.menu .item {
  color: #cdd6f4 !important;
}

.ui.vertical.menu .active.item {
  background: #282a36 !important;
  color: #f0c674 !important;
}

.ui.vertical.menu {
  background: #1e1f2b !important;
  border-color: #363848 !important;
}

/* Text selection */
::selection {
  background: #d19a66 !important;
  color: #1a1b26 !important;
}
::-moz-selection {
  background: #d19a66 !important;
  color: #1a1b26 !important;
}
