:root {
  /* GitHub Primer palette */
  --gh-canvas-default: #ffffff;
  --gh-canvas-subtle: #f6f8fa;
  --gh-canvas-inset: #f6f8fa;
  --gh-border-default: #d0d7de;
  --gh-border-muted: #d8dee4;
  --gh-fg-default: #1f2328;
  --gh-fg-muted: #656d76;
  --gh-fg-subtle: #6e7781;
  --gh-accent-fg: #0969da;
  --gh-accent-emphasis: #0969da;
  --gh-accent-muted: #0969da66;
  --gh-accent-subtle: #ddf4ff;
  --gh-success-fg: #1a7f37;
  --gh-success-emphasis: #1f883d;
  --gh-success-muted: #4ac26b66;
  --gh-success-subtle: #dafbe1;
  --gh-danger-fg: #d1242f;
  --gh-danger-emphasis: #cf222e;
  --gh-danger-muted: #ff818266;
  --gh-danger-subtle: #ffebe9;
  --gh-attention-fg: #9a6700;
  --gh-attention-emphasis: #bf8700;
  --gh-attention-subtle: #fff8c5;
  --gh-done-fg: #8250df;
  --gh-done-emphasis: #8250df;
  --gh-neutral-muted: #afb8c133;
  --gh-neutral-subtle: #eaeef280;

  /* Forgejo base zinc/steel scales kept for widgets that reference them directly */
  --steel-900: #10161d;
  --steel-800: #171e26;
  --steel-700: #242d38;
  --steel-500: #515f70;
  --steel-400: #6d7d8f;
  --steel-300: #8c9caf;
  --steel-200: #aebed0;
  --steel-100: #d2e0f0;
  --zinc-50: #fafafa;
  --zinc-100: #f4f4f5;
  --zinc-150: #ececee;
  --zinc-200: #e4e4e7;
  --zinc-250: #dcdce0;
  --zinc-300: #d4d4d8;
  --zinc-400: #a1a1aa;
  --zinc-500: #71717a;
  --zinc-600: #52525b;
  --zinc-700: #3f3f46;
  --zinc-800: #27272a;
  --zinc-900: #18181b;

  /* Primary → GitHub accent blue */
  --color-primary: #0969da;
  --color-primary-contrast: #ffffff;
  --color-primary-dark-1: #0860c7;
  --color-primary-dark-2: #0757ba;
  --color-primary-dark-3: #064ea3;
  --color-primary-dark-4: #054896;
  --color-primary-dark-5: #043f83;
  --color-primary-dark-6: #033670;
  --color-primary-dark-7: #022d5e;
  --color-primary-light-1: #218bff;
  --color-primary-light-2: #54aeff;
  --color-primary-light-3: #80ccff;
  --color-primary-light-4: #b6e3ff;
  --color-primary-light-5: #ddf4ff;
  --color-primary-light-6: #f2f8ff;
  --color-primary-light-7: #f6fbff;
  --color-primary-alpha-10: #0969da19;
  --color-primary-alpha-20: #0969da33;
  --color-primary-alpha-30: #0969da4b;
  --color-primary-alpha-40: #0969da66;
  --color-primary-alpha-50: #0969da80;
  --color-primary-alpha-60: #0969da99;
  --color-primary-alpha-70: #0969dab3;
  --color-primary-alpha-80: #0969dacc;
  --color-primary-alpha-90: #0969dae1;
  --color-primary-hover: var(--color-primary-dark-1);
  --color-primary-active: var(--color-primary-dark-2);

  /* Secondary neutrals */
  --color-secondary: #d0d7de;
  --color-secondary-dark-1: #afb8c1;
  --color-secondary-dark-2: #8c959f;
  --color-secondary-dark-3: #6e7781;
  --color-secondary-dark-4: #57606a;
  --color-secondary-dark-5: #424a53;
  --color-secondary-dark-6: #32383f;
  --color-secondary-dark-7: #24292f;
  --color-secondary-dark-8: #1f2328;
  --color-secondary-dark-9: #1b1f24;
  --color-secondary-dark-10: #14171c;
  --color-secondary-dark-11: #0e1116;
  --color-secondary-dark-12: #010409;
  --color-secondary-dark-13: #010409;
  --color-secondary-light-1: #d8dee4;
  --color-secondary-light-2: #eaeef2;
  --color-secondary-light-3: #f6f8fa;
  --color-secondary-light-4: #ffffff;
  --color-secondary-alpha-10: #d0d7de19;
  --color-secondary-alpha-20: #d0d7de33;
  --color-secondary-alpha-30: #d0d7de4b;
  --color-secondary-alpha-40: #d0d7de66;
  --color-secondary-alpha-50: #d0d7de80;
  --color-secondary-alpha-60: #d0d7de99;
  --color-secondary-alpha-70: #d0d7deb3;
  --color-secondary-alpha-80: #d0d7decc;
  --color-secondary-alpha-90: #d0d7dee1;
  --color-secondary-hover: var(--color-secondary-dark-1);
  --color-secondary-active: var(--color-secondary-dark-2);

  /* Console (dark tone, GitHub-like) */
  --color-console-fg: #f0f6fc;
  --color-console-fg-subtle: #8b949e;
  --color-console-bg: #0d1117;
  --color-console-border: #30363d;
  --color-console-hover-bg: #ffffff16;
  --color-console-active-bg: #21262d;
  --color-console-menu-bg: #161b22;
  --color-console-menu-border: #30363d;

  /* Named colors — Primer-aligned */
  --color-red: #cf222e;
  --color-orange: #bc4c00;
  --color-yellow: #bf8700;
  --color-olive: #7d8b17;
  --color-green: #1a7f37;
  --color-teal: #117070;
  --color-blue: #0969da;
  --color-violet: #6639ba;
  --color-purple: #8250df;
  --color-pink: #bf3989;
  --color-brown: #a47252;
  --color-grey: #57606a;
  --color-black: #1f2328;

  --color-red-light: #ff6a69;
  --color-orange-light: #fb8f44;
  --color-yellow-light: #d4a72c;
  --color-olive-light: #a3b017;
  --color-green-light: #2da44e;
  --color-teal-light: #1b9e9e;
  --color-blue-light: #218bff;
  --color-violet-light: #8057d5;
  --color-purple-light: #a475f9;
  --color-pink-light: #e66ab1;
  --color-brown-light: #94674a;
  --color-grey-light: #6e7781;
  --color-black-light: #24292f;

  --color-red-dark-1: #b91c1c;
  --color-orange-dark-1: #953800;
  --color-yellow-dark-1: #9a6700;
  --color-olive-dark-1: #66740f;
  --color-green-dark-1: #116329;
  --color-teal-dark-1: #0e5a5a;
  --color-blue-dark-1: #0757ba;
  --color-violet-dark-1: #512a97;
  --color-purple-dark-1: #6639ba;
  --color-pink-dark-1: #99286e;
  --color-brown-dark-1: #835b42;
  --color-black-dark-1: #0e1116;

  --color-red-dark-2: #a0111f;
  --color-orange-dark-2: #762c00;
  --color-yellow-dark-2: #7d4e00;
  --color-olive-dark-2: #50590c;
  --color-green-dark-2: #0f5323;
  --color-teal-dark-2: #0b4747;
  --color-blue-dark-2: #054896;
  --color-violet-dark-2: #3e2273;
  --color-purple-dark-2: #512a97;
  --color-pink-dark-2: #7c1e59;
  --color-brown-dark-2: #684633;
  --color-black-dark-2: #010409;

  /* ANSI — keep Forgejo defaults */
  --color-ansi-black: #1f2326;
  --color-ansi-red: #cc4848;
  --color-ansi-green: #87ab63;
  --color-ansi-yellow: #cc9903;
  --color-ansi-blue: #3a8ac6;
  --color-ansi-magenta: #d22e8b;
  --color-ansi-cyan: #00918a;
  --color-ansi-white: var(--color-console-fg-subtle);
  --color-ansi-bright-black: #46494d;
  --color-ansi-bright-red: #d15a5a;
  --color-ansi-bright-green: #93b373;
  --color-ansi-bright-yellow: #eaaf03;
  --color-ansi-bright-blue: #4e96cc;
  --color-ansi-bright-magenta: #d74397;
  --color-ansi-bright-cyan: #00b6ad;
  --color-ansi-bright-white: var(--color-console-fg);

  /* Misc */
  --color-gold: #b1983b;
  --color-white: #ffffff;

  /* Diff (GitHub diff colors) */
  --color-diff-added-word-bg: #aceebb;
  --color-diff-removed-word-bg: #ff818266;
  --color-diff-added-row-bg: #e6ffec;
  --color-diff-removed-row-bg: #ffebe9;
  --color-diff-moved-row-bg: #fff8c5;
  --color-diff-added-row-border: #aceebb;
  --color-diff-removed-row-border: #ffcecb;
  --color-diff-moved-row-border: #eac54f;
  --color-diff-inactive: #f6f8fa;

  /* Banners */
  --color-error-border: #ffcecb;
  --color-error-bg: #ffebe9;
  --color-error-bg-active: #ff818266;
  --color-error-bg-hover: #ffcecb;
  --color-error-text: #82071e;
  --color-success-border: #aceebb;
  --color-success-bg: #dafbe1;
  --color-success-text: #0a3622;
  --color-warning-border: #eac54f;
  --color-warning-bg: #fff8c5;
  --color-warning-text: #4d2d00;
  --color-info-border: #b6e3ff;
  --color-info-bg: #ddf4ff;
  --color-info-text: #0a3069;

  /* Badges */
  --color-red-badge: #cf222e;
  --color-red-badge-bg: #cf222e22;
  --color-red-badge-hover-bg: #cf222e44;
  --color-green-badge: #1a7f37;
  --color-green-badge-bg: #1a7f3722;
  --color-green-badge-hover-bg: #1a7f3744;
  --color-yellow-badge: #bf8700;
  --color-yellow-badge-bg: #bf870022;
  --color-yellow-badge-hover-bg: #bf870044;
  --color-orange-badge: #bc4c00;
  --color-orange-badge-bg: #bc4c0022;
  --color-orange-badge-hover-bg: #bc4c0044;

  /* Body / surfaces */
  --color-body: #ffffff;
  --color-box-header: #f6f8fa;
  --color-box-body: #ffffff;
  --color-box-body-highlight: #eaeef2;
  --color-text-dark: #1f2328;
  --color-text: #1f2328;
  --color-text-light: #424a53;
  --color-text-light-1: #57606a;
  --color-text-light-2: #656d76;
  --color-text-light-3: #6e7781;
  --color-footer: #f6f8fa;
  --color-timeline: #d8dee4;
  --color-input-text: #1f2328;
  --color-input-background: #ffffff;
  --color-input-toggle-background: #ffffff;
  --color-input-border: #d0d7de;
  --color-input-border-hover: #afb8c1;
  --color-header-wrapper: #ffffff;
  --color-header-wrapper-transparent: #ffffff00;
  --color-light: #ffffffcc;
  --color-light-mimic-enabled: rgba(0, 0, 0, calc(6 / 255 * 222 / 255 / var(--opacity-disabled)));
  --color-light-border: #d0d7de;
  --color-hover: #afb8c133;
  --color-active: #afb8c155;
  --color-menu: #f6f8fa;
  --color-card: #ffffff;
  --fancy-card-bg: #f6f8fa;
  --fancy-card-border: #d0d7de;
  --color-markup-table-row: #eaeef280;
  --color-markup-code-block: #f6f8fa;
  --color-markup-code-inline: #afb8c140;
  --color-button: #f6f8fa;
  --color-code-bg: #f6f8fa;
  --color-shadow: #8c959f33;
  --color-secondary-bg: #f6f8fa;
  --color-text-focus: #ffffff;
  --color-expand-button: #eaeef2;
  --color-placeholder-text: #6e7781;
  --color-editor-line-highlight: #f6f8fa;
  --color-project-board-bg: #f6f8fa;
  --color-project-board-dark-label: #6e7781;
  --color-caret: #1f2328;
  --color-reaction-bg: #afb8c122;
  --color-reaction-active-bg: #0969da33;
  --color-reaction-hover-bg: #0969da22;
  --color-tooltip-text: #ffffff;
  --color-tooltip-bg: #24292fe6;
  --color-nav-bg: #ffffff;
  --color-nav-hover-bg: #f6f8fa;
  --color-secondary-nav-bg: #ffffff;
  --color-label-text: #1f2328;
  --color-label-bg: #afb8c133;
  --color-label-hover-bg: #afb8c155;
  --color-label-active-bg: #afb8c177;
  --color-label-bg-alt: #afb8c166;
  --color-accent: #0969da;
  --color-small-accent: #ddf4ff;
  --color-highlight-fg: #218bff;
  --color-highlight-bg: #fff8c5;
  --color-overlay-backdrop: #1f232899;
  --color-selection-bg: #0969da;
  --color-selection-fg: #ffffff;

  --checkerboard-color-1: #ffffff;
  --checkerboard-color-2: #eaeef2;
  --color-indicator-offline: #6e7781;
  --color-indicator-offline-20: #6e778133;
  --color-indicator-idle: #bf8700;
  --color-indicator-idle-20: #bf870033;
  --color-indicator-active: #1a7f37;
  --color-indicator-active-20: #1a7f3733;

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

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

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

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

#navbar .item:hover {
  color: #0969da !important;
  background: transparent !important;
}

/* Secondary (repo) nav bar — no extra border (tabs already have one) */
.secondary-nav,
.repository > .header,
.repo-header {
  background-color: #ffffff !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: #f6f8fa !important;
  color: #1f2328 !important;
  border: 1px solid #d0d7de !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: #f3f4f6 !important;
  border-color: #afb8c1 !important;
}

.ui.primary.button,
.ui.primary.buttons .button,
.ui.blue.button,
.ui.blue.buttons .button {
  background-color: var(--color-primary) !important;
  color: #ffffff !important;
  border: 1px solid #1f232826 !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: #f6f8fa !important;
  color: var(--color-primary) !important;
  box-shadow: inset 0 0 0 1px var(--color-border, #d0d7de) !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: #f3f4f6 !important;
  box-shadow: inset 0 0 0 1px #afb8c1 !important;
}

.ui.green.button,
.ui.green.buttons .button {
  background-color: #1f883d !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: #1a7f37 !important;
  border-color: rgba(31,35,40,0.15) !important;
}
.ui.green.button:active,
.ui.green.buttons .button:active {
  background-color: #187533 !important;
}

.ui.basic.green.button,
.ui.basic.green.buttons .button {
  background-color: #ffffff !important;
  color: #1a7f37 !important;
  box-shadow: inset 0 0 0 1px #d0d7de !important;
}

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

/* Labels / tags */
.ui.label {
  border-radius: 2em;
  padding: 0 7px;
  line-height: 18px;
  font-weight: 500;
}
.ui.basic.label {
  background-color: #ffffff;
  border: 1px solid #d0d7de;
  color: var(--color-text);
}
.ui.primary.label,
.ui.primary.labels .label,
.ui.blue.label,
.ui.blue.labels .label {
  background-color: #ddf4ff !important;
  color: #0969da !important;
  border: 1px solid #0969da33 !important;
}

/* sha labels — GitHub monospace chip */
.ui .sha.label {
  background-color: #afb8c133;
  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: #54aeff !important;
}
.repository.file.list #repo-files-table tr:hover {
  background-color: #f6f8fa !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 white text on colored backgrounds */
a.ui.primary.button,
a.ui.blue.button,
a.ui.green.button,
a.ui.red.button,
a.ui.negative.button {
  color: #ffffff !important;
}
a.ui.primary.button:hover,
a.ui.blue.button:hover,
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 #d0d7de !important;
}
.ui.tabular.menu .item {
  color: #1f2328 !important;
  padding: 8px 16px !important;
  font-size: 14px;
  border-radius: 6px 6px 0 0;
  margin-bottom: -1px;
}
.ui.tabular.menu .item:hover {
  background-color: #f6f8fa !important;
}
.ui.tabular.menu .active.item {
  border-bottom: 2px solid #fd8c73 !important;
  font-weight: 600;
  background: transparent !important;
}
.ui.tabular.menu .item .label,
.ui.tabular.menu .item .ui.label {
  background-color: #afb8c133 !important;
  color: #1f2328 !important;
  border: none !important;
  margin-left: 4px;
  font-weight: 500;
}

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

/* Repository header / stats row */
.repository .header-wrapper {
  background-color: #ffffff !important;
  border-bottom: 1px solid #d0d7de !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: #f6f8fa !important;
  border: 1px solid #d0d7de !important;
  color: #1f2328 !important;
}

/* PR branch chips */
.issue.list .branches .branch,
.issue-meta-branch,
.flex-text-inline .branch {
  background-color: #afb8c133;
  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 #d0d7de !important;
  border-radius: 6px !important;
  background-color: #ffffff !important;
  overflow: hidden;
}

/* Top toolbar (Open / Closed / search) — gray header strip */
.issue-list-toolbar {
  background-color: #f6f8fa !important;
  border-bottom: 1px solid #d0d7de !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: #656d76 !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: #1f2328 !important;
  background-color: transparent !important;
}

/* Each row */
.flex-list .flex-item,
.issue.list > .item {
  padding: 8px 16px !important;
  border-top: 1px solid #d8dee4 !important;
  background-color: #ffffff !important;
  transition: background-color .1s ease;
}
.flex-list .flex-item:hover,
.issue.list > .item:hover {
  background-color: #f6f8fa !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: #1a7f37 !important;
}
.flex-item-icon .octicon-git-merge {
  color: #8250df !important;
}
.flex-item-icon .octicon-git-pull-request-closed,
.flex-item-icon .octicon-issue-closed {
  color: #cf222e !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: #1f2328 !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: #0969da !important;
  text-decoration: none !important;
}

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

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

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

/* Trailing (milestone, assignees, comment count) */
.flex-item-trailing {
  color: #656d76 !important;
  font-size: 12px;
}
.flex-item-trailing a {
  color: #656d76 !important;
}
.flex-item-trailing a:hover {
  color: #0969da !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: #f6f8fa !important;
  color: #1f2328 !important;
  border: 1px solid #d0d7de !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: #f3f4f6 !important;
  border-color: #afb8c1 !important;
}
.repo-buttons .ui.labeled.button > .ui.basic.label {
  background-color: #ffffff !important;
  color: #1f2328 !important;
  border: 1px solid #d0d7de !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 #d0d7de;
  margin-bottom: 16px;
}
.issue-title-header .issue-title h1,
.issue-title #issue-title-display h1 {
  font-size: 32px !important;
  font-weight: 400 !important;
  color: #1f2328 !important;
  line-height: 1.25 !important;
  margin: 0 !important;
}
.issue-title-header .issue-title .index,
#issue-title-display .index {
  color: #656d76 !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: #1f883d !important;
  color: #ffffff !important;
}
.issue-state-label.ui.purple.label {
  background-color: #8250df !important;
  color: #ffffff !important;
}
.issue-state-label.ui.red.label {
  background-color: #cf222e !important;
  color: #ffffff !important;
}
.issue-state-label.ui.grey.label {
  background-color: #6e7781 !important;
  color: #ffffff !important;
}

.issue-title-meta,
.time-desc,
.pull-desc {
  color: #656d76 !important;
  font-size: 14px;
}
.issue-title-meta a,
.time-desc a,
.pull-desc a {
  color: #1f2328 !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: #d0d7de;
  z-index: 0;
}

/* Comment card */
.timeline-item .comment.box,
.conversation-holder.ui.segments,
.ui.segments.conversation-holder {
  border: 1px solid #d0d7de !important;
  border-radius: 6px !important;
  background-color: #ffffff !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: #f6f8fa !important;
  border-bottom: 1px solid #d0d7de !important;
  padding: 8px 16px !important;
  color: #1f2328 !important;
  font-weight: 400 !important;
}
.comment > .header a.author,
.comment-header .author {
  color: #1f2328 !important;
  font-weight: 600 !important;
}

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

/* 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 #afb8c1 !important;
  color: #656d76 !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 #d0d7de !important;
  border-radius: 6px !important;
  background-color: #ffffff !important;
  padding: 16px !important;
}
.merge-section .merge-button,
#pull-request-merge-form .ui.green.button {
  background-color: #1f883d !important;
  color: #ffffff !important;
  font-weight: 500;
}

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

/* Hunk header — @@ -N,M +N,M @@ */
.blob-hunk,
td.blob-hunk,
tr.section .blob-hunk {
  background-color: #ddf4ff !important;
  color: #57606a !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: #e6ffec !important;
}
tr.del-code td.lines-code,
td.lines-code.del-code,
tr.del-code .lines-code {
  background-color: #ffebe9 !important;
}
tr.add-code td.lines-num,
tr.add-code .lines-num {
  background-color: #ccffd8 !important;
  color: #1a7f37 !important;
}
tr.del-code td.lines-num,
tr.del-code .lines-num {
  background-color: #ffd7d5 !important;
  color: #82071e !important;
}
td.lines-num,
.lines-num {
  color: #8c959f !important;
  background-color: #ffffff !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: #aceebb !important;
}
td.lines-code.del-code .removed-code,
.removed-code {
  background-color: #ff818266 !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 #d0d7de !important;
  border-radius: 6px !important;
  padding: 5px 12px !important;
  font-size: 14px !important;
  color: #1f2328 !important;
  background-color: #ffffff !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: #0969da !important;
  box-shadow: 0 0 0 3px #0969da33 !important;
  outline: none !important;
}

/* ---------- Dropdown menus — tight GitHub look ---------- */
.ui.dropdown .menu,
.ui.selection.dropdown .menu {
  border: 1px solid #d0d7de !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: #1f2328 !important;
  border-bottom: none !important;
}
.ui.dropdown .menu > .item:hover,
.ui.selection.dropdown .menu > .item:hover {
  background-color: #0969da !important;
  color: #ffffff !important;
}
.ui.dropdown .menu > .divider {
  border-top: 1px solid #d0d7de !important;
  margin: 4px 0 !important;
}
.ui.dropdown .menu > .header {
  background-color: #f6f8fa !important;
  color: #1f2328 !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: #afb8c1 transparent;
}
::-webkit-scrollbar-thumb {
  background-color: #afb8c1;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background-color: #8c959f;
}

/* ---------- 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: #ffffff !important;
  color: #1f2328 !important;
}
.markup .chroma,
.markdown .chroma,
.markup pre .chroma,
.markdown pre .chroma {
  background-color: transparent !important;
  color: #1f2328 !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: #8c959f !important;
}

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

/* Keywords */
.chroma .k,  .chroma .kc, .chroma .kd, .chroma .kn,
.chroma .kp, .chroma .kr, .chroma .kt {
  color: #cf222e !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: #0a3069 !important;
}

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

/* Functions / names */
.chroma .nf { color: #8250df !important; }
.chroma .nx { color: #1f2328 !important; }
.chroma .nc, .chroma .nn { color: #953800 !important; }
.chroma .nb, .chroma .bp { color: #0550ae !important; }
.chroma .nv, .chroma .vc, .chroma .vg, .chroma .vi {
  color: #953800 !important;
}

/* Operators / punctuation */
.chroma .o, .chroma .ow { color: #cf222e !important; }
.chroma .p { color: #1f2328 !important; }

/* HTML / XML tags & attributes */
.chroma .nt { color: #116329 !important; }
.chroma .na { color: #0550ae !important; }

/* Generic (diff, errors, headings inside code) */
.chroma .gd { color: #82071e; background-color: #ffebe9 !important; }
.chroma .gi { color: #116329; background-color: #dafbe1 !important; }
.chroma .gh { color: #0550ae !important; font-weight: 600; }
.chroma .gu { color: #0550ae !important; }
.chroma .err { color: #82071e !important; background-color: #ffebe9 !important; }

/* Highlighted line */
.chroma .hl,
.file-view .lines-code .active,
.file-view .active {
  background-color: #fff8c5 !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 #1a7f37;
  color: #1a7f37;
}
.repository .ui.attached.isSigned.isVerified.message {
  background-color: #dafbe1;
  color: var(--color-text);
  box-shadow: none;
}
