:root {
  /* GitHub Primer palette */
  --gh-canvas-default: #0d1117;
  --gh-canvas-subtle: #161b22;
  --gh-canvas-inset: #161b22;
  --gh-border-default: #3d444d;
  --gh-border-muted: #21262d;
  --gh-fg-default: #f0f6fc;
  --gh-fg-muted: #9198a1;
  --gh-fg-subtle: #6e7681;
  --gh-accent-fg: #4493f8;
  --gh-accent-emphasis: #1f6feb;
  --gh-accent-muted: #4493f866;
  --gh-accent-subtle: #002333;
  --gh-success-fg: #3fb950;
  --gh-success-emphasis: #238636;
  --gh-success-muted: #2ea04366;
  --gh-success-subtle: #033a16;
  --gh-danger-fg: #f85149;
  --gh-danger-emphasis: #da3633;
  --gh-danger-muted: #f8514966;
  --gh-danger-subtle: #67060c;
  --gh-attention-fg: #d29922;
  --gh-attention-emphasis: #9e6a03;
  --gh-attention-subtle: #291d00;
  --gh-done-fg: #ab7df8;
  --gh-done-emphasis: #8957e5;
  --gh-neutral-muted: #484f5833;
  --gh-neutral-subtle: #21262d80;

  /* Forgejo base zinc/steel scales kept for widgets that reference them directly */
  --steel-900: #cdd8e4;
  --steel-800: #cfd8e3;
  --steel-700: #c6d0dc;
  --steel-500: #8e9daf;
  --steel-400: #6f8093;
  --steel-300: #4f6074;
  --steel-200: #2e3f52;
  --steel-100: #0f1e2f;
  --zinc-50: #0f0f0f;
  --zinc-100: #0f0f10;
  --zinc-150: #0e0e10;
  --zinc-200: #18181b;
  --zinc-250: #1f1f23;
  --zinc-300: #27272b;
  --zinc-400: #55555e;
  --zinc-500: #85858e;
  --zinc-600: #a4a4ad;
  --zinc-700: #b9b9c0;
  --zinc-800: #d5d5d8;
  --zinc-900: #e4e4e7;

  /* Primary → GitHub accent blue */
  --color-primary: #4493f8;
  --color-primary-contrast: #0d1117;
  --color-primary-dark-1: #3390fc;
  --color-primary-dark-2: #4195fc;
  --color-primary-dark-3: #58a4fd;
  --color-primary-dark-4: #65acfe;
  --color-primary-dark-5: #79b7fe;
  --color-primary-dark-6: #8cc2ff;
  --color-primary-dark-7: #9fccff;
  --color-primary-light-1: #006ade;
  --color-primary-light-2: #005aab;
  --color-primary-light-3: #004c7f;
  --color-primary-light-4: #002d49;
  --color-primary-light-5: #002333;
  --color-primary-light-6: #001833;
  --color-primary-light-7: #00111f;
  --color-primary-alpha-10: #4493f819;
  --color-primary-alpha-20: #4493f833;
  --color-primary-alpha-30: #4493f84b;
  --color-primary-alpha-40: #4493f866;
  --color-primary-alpha-50: #4493f880;
  --color-primary-alpha-60: #4493f899;
  --color-primary-alpha-70: #4493f8b3;
  --color-primary-alpha-80: #4493f8cc;
  --color-primary-alpha-90: #4493f8e1;
  --color-primary-hover: var(--color-primary-dark-1);
  --color-primary-active: var(--color-primary-dark-2);

  /* Secondary neutrals */
  --color-secondary: #3d444d;
  --color-secondary-dark-1: #484f58;
  --color-secondary-dark-2: #9198a1;
  --color-secondary-dark-3: #6e7681;
  --color-secondary-dark-4: #9198a1;
  --color-secondary-dark-5: #acb4bd;
  --color-secondary-dark-6: #c0c6cd;
  --color-secondary-dark-7: #c9d1d9;
  --color-secondary-dark-8: #f0f6fc;
  --color-secondary-dark-9: #e2e5e9;
  --color-secondary-dark-10: #e1e4ea;
  --color-secondary-dark-11: #e0e4eb;
  --color-secondary-dark-12: #010409;
  --color-secondary-dark-13: #010409;
  --color-secondary-light-1: #21262d;
  --color-secondary-light-2: #21262d;
  --color-secondary-light-3: #161b22;
  --color-secondary-light-4: #0d1117;
  --color-secondary-alpha-10: #3d444d19;
  --color-secondary-alpha-20: #3d444d33;
  --color-secondary-alpha-30: #3d444d4b;
  --color-secondary-alpha-40: #3d444d66;
  --color-secondary-alpha-50: #3d444d80;
  --color-secondary-alpha-60: #3d444d99;
  --color-secondary-alpha-70: #3d444db3;
  --color-secondary-alpha-80: #3d444dcc;
  --color-secondary-alpha-90: #3d444de1;
  --color-secondary-hover: var(--color-secondary-dark-1);
  --color-secondary-active: var(--color-secondary-dark-2);

  /* Console (Actions run log viewer — must stay light-on-black, this panel is always dark) */
  --color-console-fg: #f0f6fc;
  --color-console-fg-subtle: #9198a1;
  --color-console-bg: #010409;
  --color-console-border: #3d444d;
  --color-console-hover-bg: #ffffff1a;
  --color-console-active-bg: #ffffff26;
  --color-console-menu-bg: #161b22;
  --color-console-menu-border: #3d444d;

  /* Named colors — Primer-aligned */
  --color-red: #f85149;
  --color-orange: #ff8f43;
  --color-yellow: #d29922;
  --color-olive: #dceb71;
  --color-green: #3fb950;
  --color-teal: #8df0f0;
  --color-blue: #4493f8;
  --color-violet: #ab7df8;
  --color-purple: #ab7df8;
  --color-pink: #c93d91;
  --color-brown: #af7b59;
  --color-grey: #9198a1;
  --color-black: #f0f6fc;

  --color-red-light: #b62324;
  --color-orange-light: #bf4e00;
  --color-yellow-light: #ba9b12;
  --color-olive-light: #deec4b;
  --color-green-light: #2ea043;
  --color-teal-light: #5ee7e7;
  --color-blue-light: #006ade;
  --color-violet-light: #5227ab;
  --color-purple-light: #211047;
  --color-pink-light: #981660;
  --color-brown-light: #b78869;
  --color-grey-light: #6e7681;
  --color-black-light: #c9d1d9;

  --color-red-dark-1: #fa5e55;
  --color-orange-dark-1: #ffa26a;
  --color-yellow-dark-1: #d29922;
  --color-olive-dark-1: #e4f388;
  --color-green-dark-1: #56d364;
  --color-teal-dark-1: #a3f3f3;
  --color-blue-dark-1: #4195fc;
  --color-violet-dark-1: #b7baf6;
  --color-purple-dark-1: #ab7df8;
  --color-pink-dark-1: #da63ad;
  --color-brown-dark-1: #bf957a;
  --color-black-dark-1: #e0e4eb;

  --color-red-dark-2: #ffa198;
  --color-orange-dark-2: #ffb589;
  --color-yellow-dark-2: #ffd082;
  --color-olive-dark-2: #ebf5a4;
  --color-green-dark-2: #aaf2bf;
  --color-teal-dark-2: #bbf6f6;
  --color-blue-dark-2: #65acfe;
  --color-violet-dark-2: #a78adf;
  --color-purple-dark-2: #b7baf6;
  --color-pink-dark-2: #e381bf;
  --color-brown-dark-2: #cdaa96;
  --color-black-dark-2: #010409;

  /* ANSI — keep Forgejo defaults */
  --color-ansi-black: #e3e6e8;
  --color-ansi-red: #ba3030;
  --color-ansi-green: #789e52;
  --color-ansi-yellow: #ffca30;
  --color-ansi-blue: #3589c9;
  --color-ansi-magenta: #d5298b;
  --color-ansi-cyan: #6efff8;
  --color-ansi-white: var(--color-console-fg-subtle);
  --color-ansi-bright-black: #b2b5b9;
  --color-ansi-bright-red: #a82b2b;
  --color-ansi-bright-green: #6c8e4a;
  --color-ansi-bright-yellow: #ffc212;
  --color-ansi-bright-blue: #307bb4;
  --color-ansi-bright-magenta: #c0247d;
  --color-ansi-bright-cyan: #49fff6;
  --color-ansi-bright-white: var(--color-console-fg);

  /* Misc */
  --color-gold: #c7ad4b;
  --color-white: #0d1117;

  /* Diff (GitHub diff colors) */
  --color-diff-added-word-bg: #2ea043;
  --color-diff-removed-word-bg: #f8514966;
  --color-diff-added-row-bg: #033a16;
  --color-diff-removed-row-bg: #67060c;
  --color-diff-moved-row-bg: #291d00;
  --color-diff-added-row-border: #2ea043;
  --color-diff-removed-row-border: #da3633;
  --color-diff-moved-row-border: #9e6a03;
  --color-diff-inactive: #161b22;

  /* Banners */
  --color-error-border: #da3633;
  --color-error-bg: #67060c;
  --color-error-bg-active: #f8514966;
  --color-error-bg-hover: #da3633;
  --color-error-text: #ffdcd7;
  --color-success-border: #2ea043;
  --color-success-bg: #033a16;
  --color-success-text: #aff5b4;
  --color-warning-border: #9e6a03;
  --color-warning-bg: #291d00;
  --color-warning-text: #ffdfb6;
  --color-info-border: #002d49;
  --color-info-bg: #002333;
  --color-info-text: #a5d6ff;

  /* Badges */
  --color-red-badge: #f85149;
  --color-red-badge-bg: #f8514922;
  --color-red-badge-hover-bg: #f8514944;
  --color-green-badge: #3fb950;
  --color-green-badge-bg: #3fb95022;
  --color-green-badge-hover-bg: #3fb95044;
  --color-yellow-badge: #d29922;
  --color-yellow-badge-bg: #d2992222;
  --color-yellow-badge-hover-bg: #d2992244;
  --color-orange-badge: #ff8f43;
  --color-orange-badge-bg: #ff8f4322;
  --color-orange-badge-hover-bg: #ff8f4344;

  /* Body / surfaces */
  --color-body: #0d1117;
  --color-box-header: #161b22;
  --color-box-body: #0d1117;
  --color-box-body-highlight: #21262d;
  --color-text-dark: #f0f6fc;
  --color-text: #f0f6fc;
  --color-text-light: #acb4bd;
  --color-text-light-1: #9198a1;
  --color-text-light-2: #9198a1;
  --color-text-light-3: #6e7681;
  --color-footer: #161b22;
  --color-timeline: #21262d;
  --color-input-text: #f0f6fc;
  --color-input-background: #0d1117;
  --color-input-toggle-background: #0d1117;
  --color-input-border: #3d444d;
  --color-input-border-hover: #484f58;
  --color-header-wrapper: #0d1117;
  --color-header-wrapper-transparent: #0d111700;
  --color-light: #0d1117cc;
  --color-light-mimic-enabled: rgba(0, 0, 0, calc(6 / 255 * 222 / 255 / var(--opacity-disabled)));
  --color-light-border: #3d444d;
  --color-hover: #484f5833;
  --color-active: #484f5855;
  --color-menu: #161b22;
  --color-card: #0d1117;
  --fancy-card-bg: #161b22;
  --fancy-card-border: #3d444d;
  --color-markup-table-row: #21262d80;
  --color-markup-code-block: #161b22;
  --color-markup-code-inline: #484f5840;
  --color-button: #161b22;
  --color-code-bg: #161b22;
  --color-shadow: #9198a133;
  --color-secondary-bg: #161b22;
  --color-text-focus: #ffffff;
  --color-expand-button: #21262d;
  --color-placeholder-text: #6e7681;
  --color-editor-line-highlight: #161b22;
  --color-project-board-bg: #161b22;
  --color-project-board-dark-label: #6e7681;
  --color-caret: #f0f6fc;
  --color-reaction-bg: #484f5822;
  --color-reaction-active-bg: #4493f833;
  --color-reaction-hover-bg: #4493f822;
  --color-tooltip-text: #ffffff;
  --color-tooltip-bg: #000000f0;
  --color-nav-bg: #0d1117;
  --color-nav-hover-bg: #161b22;
  --color-secondary-nav-bg: #0d1117;
  --color-label-text: #f0f6fc;
  --color-label-bg: #484f5833;
  --color-label-hover-bg: #484f5855;
  --color-label-active-bg: #484f5877;
  --color-label-bg-alt: #484f5866;
  --color-accent: #4493f8;
  --color-small-accent: #002333;
  --color-highlight-fg: #79c0ff;
  --color-highlight-bg: #291d00;
  --color-overlay-backdrop: #f0f6fc99;
  --color-selection-bg: #4493f8;
  --color-selection-fg: #0d1117;

  --checkerboard-color-1: #0d1117;
  --checkerboard-color-2: #21262d;
  --color-indicator-offline: #6e7681;
  --color-indicator-offline-20: #6e768133;
  --color-indicator-idle: #d29922;
  --color-indicator-idle-20: #d2992233;
  --color-indicator-active: #3fb950;
  --color-indicator-active-20: #3fb95033;

  accent-color: var(--color-accent);
  color-scheme: dark;
}

/* ---------- Component tweaks ---------- */

/* Top navbar — flat GitHub look */
.full.height > .ui.top.secondary.menu,
#navbar {
  background-color: #0d1117 !important;
  border-bottom: 1px solid #3d444d !important;
  box-shadow: none !important;
  padding: 8px 16px !important;
}

#navbar .item {
  font-size: 14px;
  font-weight: 500;
  color: #f0f6fc !important;
}

#navbar .item:hover {
  color: #4493f8 !important;
  background: transparent !important;
}

/* Secondary (repo) nav bar — no extra border (tabs already have one) */
.secondary-nav,
.repository > .header,
.repo-header {
  background-color: #0d1117 !important;
  border-bottom: none !important;
}

/* Buttons — GitHub Primer style */
.ui.button,
.ui.basic.button,
.ui.basic.buttons .button {
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  padding: 5px 16px;
  line-height: 20px;
  transition: background-color .2s cubic-bezier(.3,0,.5,1),
              border-color .2s cubic-bezier(.3,0,.5,1),
              box-shadow .2s cubic-bezier(.3,0,.5,1);
}

/* Default (grey) button — GitHub "btn" look */
.ui.button:not(.primary):not(.blue):not(.green):not(.red):not(.negative):not(.basic):not(.labeled):not(.icon) {
  background-color: #161b22 !important;
  color: #f0f6fc !important;
  border: 1px solid #3d444d !important;
  box-shadow: 0 1px 0 rgba(31,35,40,0.04) !important;
}
.ui.button:not(.primary):not(.blue):not(.green):not(.red):not(.negative):not(.basic):not(.labeled):not(.icon):hover {
  background-color: #0d0f11 !important;
  border-color: #484f58 !important;
}

.ui.primary.button,
.ui.primary.buttons .button,
.ui.blue.button,
.ui.blue.buttons .button {
  background-color: var(--color-primary) !important;
  color: #0d1117 !important;
  border: 1px solid #f0f6fc26 !important;
}
.ui.primary.button:hover,
.ui.primary.buttons .button:hover,
.ui.blue.button:hover,
.ui.blue.buttons .button:hover {
  background-color: var(--color-primary-dark-1) !important;
}

.ui.basic.primary.button,
.ui.basic.primary.buttons .button,
.ui.basic.blue.button,
.ui.basic.blue.buttons .button {
  background-color: #161b22 !important;
  color: var(--color-primary) !important;
  box-shadow: inset 0 0 0 1px var(--color-border, #3d444d) !important;
}
.ui.basic.primary.button:hover,
.ui.basic.primary.buttons .button:hover,
.ui.basic.blue.button:hover,
.ui.basic.blue.buttons .button:hover {
  background-color: #0d0f11 !important;
  box-shadow: inset 0 0 0 1px #484f58 !important;
}

.ui.green.button,
.ui.green.buttons .button {
  background-color: #238636 !important;
  color: #ffffff !important;
  border: 1px solid rgba(31,35,40,0.15) !important;
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(31,35,40,0.1), inset 0 1px 0 rgba(255,255,255,0.03) !important;
}
.ui.green.button:hover,
.ui.green.buttons .button:hover {
  background-color: #29903b !important;
  border-color: rgba(31,35,40,0.15) !important;
}
.ui.green.button:active,
.ui.green.buttons .button:active {
  background-color: #2e9a40 !important;
}

.ui.basic.green.button,
.ui.basic.green.buttons .button {
  background-color: #0d1117 !important;
  color: #3fb950 !important;
  box-shadow: inset 0 0 0 1px #3d444d !important;
}

.ui.red.button,
.ui.red.buttons .button,
.ui.negative.button {
  background-color: #da3633 !important;
  color: #ffffff !important;
  border-radius: 6px;
}
.ui.basic.red.button,
.ui.basic.red.buttons .button {
  color: #f85149 !important;
  background-color: #0d1117 !important;
  box-shadow: inset 0 0 0 1px #3d444d !important;
}

/* Labels / tags */
.ui.label {
  border-radius: 2em;
  padding: 0 7px;
  line-height: 18px;
  font-weight: 500;
}
.ui.basic.label {
  background-color: #0d1117;
  border: 1px solid #3d444d;
  color: var(--color-text);
}
.ui.primary.label,
.ui.primary.labels .label,
.ui.blue.label,
.ui.blue.labels .label {
  background-color: #002333 !important;
  color: #4493f8 !important;
  border: 1px solid #4493f833 !important;
}

/* sha labels — GitHub monospace chip */
.ui .sha.label {
  background-color: #484f5833;
  color: var(--color-text) !important;
  border-radius: 6px;
  padding: 2px 6px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* Repo file list */
.repository.file.list #repo-files-table tbody .svg.octicon-file-directory,
.repository.file.list #repo-files-table tbody .svg.octicon-file-directory-fill,
.repository.file.list #repo-files-table tbody .svg.octicon-file-submodule,
.svg-icon.directory[data-v-0fac5124] {
  color: #4493f8 !important;
}
.repository.file.list #repo-files-table tr:hover {
  background-color: #161b22 !important;
}
.repository.file.list #repo-files-table td.name a,
.repository.file.list #repo-files-table td.name a.muted {
  color: var(--color-text) !important;
  font-weight: 400;
}
.repository.file.list #repo-files-table td.message a,
.repository.file.list #repo-files-table td.message a.muted,
.repository.file.list #repo-files-table td.message a.default-link {
  color: var(--color-text-light-2) !important;
}
.repository.file.list #repo-files-table td.name a:hover,
.repository.file.list #repo-files-table td.message a:hover {
  color: var(--color-primary) !important;
  text-decoration: underline;
}

/* Links — exclude buttons so `<a class="ui ... button">` keeps its own text color */
a:not(.button):not(.ui.button):not(.item):not(.label),
.ui.breadcrumb a {
  color: var(--color-primary) !important;
}
a:not(.button):not(.ui.button):not(.item):not(.label):hover,
.ui.breadcrumb a:hover {
  text-decoration: underline;
}
a.muted {
  color: var(--color-text) !important;
}
a.muted:hover {
  color: var(--color-primary) !important;
}

/* Ensure button-like anchors keep readable text on colored backgrounds */
a.ui.primary.button,
a.ui.blue.button {
  color: #0d1117 !important;
}
a.ui.primary.button:hover,
a.ui.blue.button:hover {
  color: #0d1117 !important;
  text-decoration: none !important;
}
a.ui.green.button,
a.ui.red.button,
a.ui.negative.button {
  color: #ffffff !important;
}
a.ui.green.button:hover,
a.ui.red.button:hover,
a.ui.negative.button:hover {
  color: #ffffff !important;
  text-decoration: none !important;
}

/* Repo menu tabs — GitHub style with orange underline */
.ui.tabular.menu {
  border-bottom: 1px solid #3d444d !important;
}
.ui.tabular.menu .item {
  color: #f0f6fc !important;
  padding: 8px 16px !important;
  font-size: 14px;
  border-radius: 6px 6px 0 0;
  margin-bottom: -1px;
}
.ui.tabular.menu .item:hover {
  background-color: #161b22 !important;
}
.ui.tabular.menu .active.item {
  border-bottom: 2px solid #f78166 !important;
  font-weight: 600;
  background: transparent !important;
}
.ui.tabular.menu .item .label,
.ui.tabular.menu .item .ui.label {
  background-color: #484f5833 !important;
  color: #f0f6fc !important;
  border: none !important;
  margin-left: 4px;
  font-weight: 500;
}

/* Commit/info segment */
.ui .info.segment.top {
  background-color: #161b22 !important;
  border: 1px solid #3d444d !important;
  border-radius: 6px 6px 0 0 !important;
}

/* Repository header / stats row */
.repository .header-wrapper {
  background-color: #0d1117 !important;
  border-bottom: 1px solid #3d444d !important;
}

/* Clone URL field — monospace with subtle border */
.clone-panel input,
.repo-clone-url,
input.url-field {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace !important;
  font-size: 12px !important;
  background-color: #161b22 !important;
  border: 1px solid #3d444d !important;
  color: #f0f6fc !important;
}

/* PR branch chips */
.issue.list .branches .branch,
.issue-meta-branch,
.flex-text-inline .branch {
  background-color: #484f5833;
  border-radius: 6px;
  padding: 2px 6px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
}
.issue.list .branches .truncated-name {
  color: var(--color-text);
}

/* ---------- Issue / PR list (Forgejo 15 flex layout) — GitHub row look ---------- */
/* Outer bordered container */
.issue-list-container,
.page-content.repository.issue-list .flex-list {
  border: 1px solid #3d444d !important;
  border-radius: 6px !important;
  background-color: #0d1117 !important;
  overflow: hidden;
}

/* Top toolbar (Open / Closed / search) — gray header strip */
.issue-list-toolbar {
  background-color: #161b22 !important;
  border-bottom: 1px solid #3d444d !important;
  padding: 12px 16px !important;
  border-radius: 6px 6px 0 0 !important;
}
.issue-list-toolbar .ui.buttons .button,
.issue-list-toolbar .ui.compact.buttons .button {
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #9198a1 !important;
  font-weight: 600 !important;
  padding: 4px 8px !important;
}
.issue-list-toolbar .ui.buttons .button.active,
.issue-list-toolbar .ui.compact.buttons .button.active {
  color: #f0f6fc !important;
  background-color: transparent !important;
}

/* Each row */
.flex-list .flex-item,
.issue.list > .item {
  padding: 8px 16px !important;
  border-top: 1px solid #21262d !important;
  background-color: #0d1117 !important;
  transition: background-color .1s ease;
}
.flex-list .flex-item:hover,
.issue.list > .item:hover {
  background-color: #161b22 !important;
}
.flex-list .flex-item:first-child,
.issue.list > .item:first-child {
  border-top: none !important;
}

/* Left icon column */
.flex-item-icon {
  padding-top: 4px;
}
.flex-item-icon .svg {
  width: 16px;
  height: 16px;
}
/* Open PR = green, merged = purple, closed = red */
.flex-item-icon .octicon-git-pull-request,
.flex-item-icon .octicon-issue-opened {
  color: #3fb950 !important;
}
.flex-item-icon .octicon-git-merge {
  color: #ab7df8 !important;
}
.flex-item-icon .octicon-git-pull-request-closed,
.flex-item-icon .octicon-issue-closed {
  color: #f85149 !important;
}

/* Title — large, bold, dark */
.flex-item-title .issue-title,
a.issue-title,
.issue.list .item .title a {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #f0f6fc !important;
  line-height: 1.25 !important;
  text-decoration: none !important;
}
.flex-item-title .issue-title:hover,
a.issue-title:hover,
.issue.list .item .title a:hover {
  color: #4493f8 !important;
  text-decoration: none !important;
}

/* PR/issue number chip inside title — muted */
.flex-item-title .issue-index,
.issue-title .index {
  color: #9198a1 !important;
  font-weight: 400 !important;
}

/* Meta / description row */
.flex-item-body.issue-meta,
.issue-meta,
.issue.list .item .desc {
  font-size: 12px !important;
  color: #9198a1 !important;
  margin-top: 4px !important;
}
.flex-item-body.issue-meta a,
.issue-meta a,
.issue.list .item .desc a {
  color: #9198a1 !important;
}
.flex-item-body.issue-meta a:hover,
.issue-meta a:hover,
.issue.list .item .desc a:hover {
  color: #4493f8 !important;
  text-decoration: underline;
}
.flex-item-body .text.grey {
  color: #9198a1 !important;
}

/* Labels block — slight spacing */
.flex-item-title .labels-list {
  margin-left: 4px;
}

/* Trailing (milestone, assignees, comment count) */
.flex-item-trailing {
  color: #9198a1 !important;
  font-size: 12px;
}
.flex-item-trailing a {
  color: #9198a1 !important;
}
.flex-item-trailing a:hover {
  color: #4493f8 !important;
}

/* ---------- Repo header: Watch / Star / Fork as GitHub counter buttons ---------- */
.repo-buttons .ui.labeled.button {
  border-radius: 6px !important;
  overflow: hidden;
}
.repo-buttons .ui.labeled.button > .button,
.repo-buttons .ui.labeled.button > .ui.compact.small.basic.button {
  background-color: #161b22 !important;
  color: #f0f6fc !important;
  border: 1px solid #3d444d !important;
  border-right: none !important;
  font-weight: 500 !important;
  font-size: 12px !important;
  padding: 3px 12px !important;
  box-shadow: none !important;
  border-radius: 6px 0 0 6px !important;
}
.repo-buttons .ui.labeled.button > .button:hover,
.repo-buttons .ui.labeled.button > .ui.compact.small.basic.button:hover {
  background-color: #0d0f11 !important;
  border-color: #484f58 !important;
}
.repo-buttons .ui.labeled.button > .ui.basic.label {
  background-color: #0d1117 !important;
  color: #f0f6fc !important;
  border: 1px solid #3d444d !important;
  font-weight: 500 !important;
  font-size: 12px !important;
  padding: 3px 10px !important;
  border-radius: 0 6px 6px 0 !important;
}

/* ---------- PR / Issue detail — header ---------- */
.issue-title-header {
  padding-bottom: 8px;
  border-bottom: 1px solid #3d444d;
  margin-bottom: 16px;
}
.issue-title-header .issue-title h1,
.issue-title #issue-title-display h1 {
  font-size: 32px !important;
  font-weight: 400 !important;
  color: #f0f6fc !important;
  line-height: 1.25 !important;
  margin: 0 !important;
}
.issue-title-header .issue-title .index,
#issue-title-display .index {
  color: #9198a1 !important;
  font-weight: 300 !important;
  margin-left: 8px;
}

/* Status pill — Open/Merged/Closed/Draft */
.issue-state-label.ui.label {
  font-size: 14px !important;
  font-weight: 500 !important;
  padding: 5px 12px !important;
  border-radius: 2em !important;
  border: 1px solid transparent !important;
  line-height: 20px;
}
.issue-state-label.ui.green.label {
  background-color: #238636 !important;
  color: #ffffff !important;
}
.issue-state-label.ui.purple.label {
  background-color: #8957e5 !important;
  color: #ffffff !important;
}
.issue-state-label.ui.red.label {
  background-color: #da3633 !important;
  color: #ffffff !important;
}
.issue-state-label.ui.grey.label {
  background-color: #656c76 !important;
  color: #ffffff !important;
}

.issue-title-meta,
.time-desc,
.pull-desc {
  color: #9198a1 !important;
  font-size: 14px;
}
.issue-title-meta a,
.time-desc a,
.pull-desc a {
  color: #f0f6fc !important;
  font-weight: 500;
}

/* ---------- PR / Issue comments (timeline) ---------- */
.conversation-holder,
.timeline-item.comment {
  position: relative;
}

/* Timeline vertical line (Forgejo uses ::before on .timeline) */
.timeline {
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 30px;
  width: 2px;
  background-color: #3d444d;
  z-index: 0;
}

/* Comment card */
.timeline-item .comment.box,
.conversation-holder.ui.segments,
.ui.segments.conversation-holder {
  border: 1px solid #3d444d !important;
  border-radius: 6px !important;
  background-color: #0d1117 !important;
  box-shadow: none !important;
  overflow: hidden;
}

/* Comment header strip */
.timeline-item .comment .header,
.conversation-holder .comment > .header,
.ui.segment.comment-header,
.comment > .header {
  background-color: #161b22 !important;
  border-bottom: 1px solid #3d444d !important;
  padding: 8px 16px !important;
  color: #f0f6fc !important;
  font-weight: 400 !important;
}
.comment > .header a.author,
.comment-header .author {
  color: #f0f6fc !important;
  font-weight: 600 !important;
}

/* Comment body */
.comment .text.comment-content,
.comment .render-content {
  padding: 16px !important;
  color: #f0f6fc;
}

/* Author role badge (Owner/Member/Contributor) — GitHub pill */
.comment .role-labels .ui.label,
.timeline-item .role-labels .ui.label {
  background-color: transparent !important;
  border: 1px solid #484f58 !important;
  color: #9198a1 !important;
  border-radius: 2em !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  padding: 0 7px !important;
  line-height: 18px !important;
}

/* Merge box — large call-to-action panel */
.merge-section,
#pull-request-merge-form,
.pull-merge-box {
  border: 1px solid #3d444d !important;
  border-radius: 6px !important;
  background-color: #0d1117 !important;
  padding: 16px !important;
}
.merge-section .merge-button,
#pull-request-merge-form .ui.green.button {
  background-color: #238636 !important;
  color: #ffffff !important;
  font-weight: 500;
}

/* ---------- Diff view ---------- */
.diff-file-box {
  border: 1px solid #3d444d !important;
  border-radius: 6px !important;
  overflow: hidden;
  margin-bottom: 16px;
  background-color: #0d1117 !important;
}
.diff-file-header {
  background-color: #161b22 !important;
  border-bottom: 1px solid #3d444d !important;
  padding: 8px 16px !important;
  font-size: 13px !important;
  color: #f0f6fc !important;
}
.diff-file-header .file {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: #f0f6fc;
}

/* Hunk header — @@ -N,M +N,M @@ */
.blob-hunk,
td.blob-hunk,
tr.section .blob-hunk {
  background-color: #0c2d6b !important;
  color: #9198a1 !important;
  font-size: 12px !important;
  padding: 4px 10px !important;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* Added / removed line rows */
tr.add-code td.lines-code,
td.lines-code.add-code,
tr.add-code .lines-code {
  background-color: #033a16 !important;
}
tr.del-code td.lines-code,
td.lines-code.del-code,
tr.del-code .lines-code {
  background-color: #67060c !important;
}
tr.add-code td.lines-num,
tr.add-code .lines-num {
  background-color: #033a16 !important;
  color: #3fb950 !important;
}
tr.del-code td.lines-num,
tr.del-code .lines-num {
  background-color: #67060c !important;
  color: #ffdcd7 !important;
}
td.lines-num,
.lines-num {
  color: #9198a1 !important;
  background-color: #0d1117 !important;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* Inline added/removed word highlight */
td.lines-code.add-code .added-code,
.added-code {
  background-color: #2ea043 !important;
}
td.lines-code.del-code .removed-code,
.removed-code {
  background-color: #f8514966 !important;
}

/* ---------- Form inputs — Primer focus rings ---------- */
.ui.input > input,
.ui.form input[type="text"],
.ui.form input[type="password"],
.ui.form input[type="email"],
.ui.form input[type="search"],
.ui.form input[type="number"],
.ui.form input[type="url"],
.ui.form textarea,
.ui.selection.dropdown {
  border: 1px solid #3d444d !important;
  border-radius: 6px !important;
  padding: 5px 12px !important;
  font-size: 14px !important;
  color: #f0f6fc !important;
  background-color: #0d1117 !important;
  box-shadow: none !important;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ui.input > input:focus,
.ui.form input[type="text"]:focus,
.ui.form input[type="password"]:focus,
.ui.form input[type="email"]:focus,
.ui.form input[type="search"]:focus,
.ui.form input[type="number"]:focus,
.ui.form input[type="url"]:focus,
.ui.form textarea:focus,
.ui.selection.dropdown:focus,
.ui.selection.dropdown.active {
  border-color: #4493f8 !important;
  box-shadow: 0 0 0 3px #4493f833 !important;
  outline: none !important;
}

/* ---------- Dropdown menus — tight GitHub look ---------- */
.ui.dropdown .menu,
.ui.selection.dropdown .menu {
  border: 1px solid #3d444d !important;
  border-radius: 6px !important;
  box-shadow: 0 8px 24px rgba(140,149,159,0.2) !important;
  padding: 4px 0 !important;
  margin-top: 4px !important;
}
.ui.dropdown .menu > .item,
.ui.selection.dropdown .menu > .item {
  padding: 6px 12px !important;
  font-size: 14px !important;
  color: #f0f6fc !important;
  border-bottom: none !important;
}
.ui.dropdown .menu > .item:hover,
.ui.selection.dropdown .menu > .item:hover {
  background-color: #4493f8 !important;
  color: #0d1117 !important;
}
.ui.dropdown .menu > .divider {
  border-top: 1px solid #3d444d !important;
  margin: 4px 0 !important;
}
.ui.dropdown .menu > .header {
  background-color: #161b22 !important;
  color: #f0f6fc !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 8px 12px !important;
}

/* Code blocks — GitHub font stack */
code,
pre,
.monospace {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* Scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: #484f58 transparent;
}
::-webkit-scrollbar-thumb {
  background-color: #484f58;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background-color: #9198a1;
}

/* ---------- Syntax highlighting (chroma) — GitHub Light palette ---------- */
/* File viewer only — fenced code in markdown should inherit pre bg */
.file-view.code-view .chroma,
.code-view .chroma {
  background-color: #0d1117 !important;
  color: #f0f6fc !important;
}
.markup .chroma,
.markdown .chroma,
.markup pre .chroma,
.markdown pre .chroma {
  background-color: transparent !important;
  color: #f0f6fc !important;
}
/* Fenced code blocks in README — flat GitHub gray */
.markup pre,
.markdown pre,
.markup .code-block,
.markdown .code-block {
  background-color: var(--color-markup-code-block) !important;
  border-radius: 6px !important;
  padding: 16px !important;
}

/* Line numbers */
.chroma .ln,
.chroma .lnt,
.file-view .lines-num,
.file-view .lines-num span {
  color: #9198a1 !important;
}

/* Comments */
.chroma .c,  .chroma .ch, .chroma .cm, .chroma .c1,
.chroma .cs, .chroma .cp, .chroma .cpf {
  color: #6e7681 !important;
  font-style: normal !important;
}

/* Keywords */
.chroma .k,  .chroma .kc, .chroma .kd, .chroma .kn,
.chroma .kp, .chroma .kr, .chroma .kt {
  color: #f85149 !important;
}

/* Strings */
.chroma .s,  .chroma .sa, .chroma .sb, .chroma .sc,
.chroma .dl, .chroma .sd, .chroma .s2, .chroma .se,
.chroma .sh, .chroma .si, .chroma .sx, .chroma .sr,
.chroma .s1, .chroma .ss {
  color: #a5d6ff !important;
}

/* Numbers */
.chroma .m,  .chroma .mb, .chroma .mf, .chroma .mh,
.chroma .mi, .chroma .il, .chroma .mo {
  color: #4d9cfe !important;
}

/* Functions / names */
.chroma .nf { color: #d2a8ff !important; }
.chroma .nx { color: #f0f6fc !important; }
.chroma .nc, .chroma .nn { color: #ffa26a !important; }
.chroma .nb, .chroma .bp { color: #4d9cfe !important; }
.chroma .nv, .chroma .vc, .chroma .vg, .chroma .vi {
  color: #ffa26a !important;
}

/* Operators / punctuation */
.chroma .o, .chroma .ow { color: #f85149 !important; }
.chroma .p { color: #f0f6fc !important; }

/* HTML / XML tags & attributes */
.chroma .nt { color: #7ee787 !important; }
.chroma .na { color: #4d9cfe !important; }

/* Generic (diff, errors, headings inside code) */
.chroma .gd { color: #ffdcd7; background-color: #67060c !important; }
.chroma .gi { color: #aff5b4; background-color: #033a16 !important; }
.chroma .gh { color: #4d9cfe !important; font-weight: 600; }
.chroma .gu { color: #4d9cfe !important; }
.chroma .err { color: #ffdcd7 !important; background-color: #67060c !important; }

/* Highlighted line */
.chroma .hl,
.file-view .lines-code .active,
.file-view .active {
  background-color: #291d00 !important;
}

/* Signed commit accents */
.repository #commits-table td.sha .sha.label.isSigned.isVerified .detail.icon,
.repository #repo-files-table .sha.label.isSigned.isVerified .detail.icon,
.repository #rev-list .sha.label.isSigned.isVerified .detail.icon {
  border-left: 1px solid #3fb950;
  color: #3fb950;
}
.repository .ui.attached.isSigned.isVerified.message {
  background-color: #033a16;
  color: var(--color-text);
  box-shadow: none;
}
