gitea-theme-meta-info {
	--theme-display-name: "UniversalRepository";
}

/*
 * UniversalRepository theme for Forgejo
 * Style: misty slate background (#080b0f + slate fog), square corners,
 * glass panels, solid blue buttons (#2563eb, hover #60a5fa), Segoe UI.
 */

:root {
	--is-dark-theme: true;
	--urepo-accent: #2563eb;
	--urepo-accent-hi: #60a5fa;
	--urepo-glass: rgba(255, 255, 255, 0.03);
	--urepo-glass-strong: rgba(255, 255, 255, 0.06);
	--urepo-glass-border: rgba(255, 255, 255, 0.1);
	--urepo-sans: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--urepo-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;

	/* primary */
	--color-primary: #2563eb;
	--color-primary-contrast: #ffffff;
	--color-primary-hover: var(--color-primary-dark-1);
	--color-primary-active: var(--color-primary-dark-2);
	--color-primary-dark-1: #366fed;
	--color-primary-dark-2: #487cee;
	--color-primary-dark-3: #5988f0;
	--color-primary-dark-4: #6b95f1;
	--color-primary-dark-5: #7ca1f3;
	--color-primary-dark-6: #8eaef5;
	--color-primary-dark-7: #9fbaf6;
	--color-primary-light-1: #2159d4;
	--color-primary-light-2: #1d4fbc;
	--color-primary-light-3: #1944a5;
	--color-primary-light-4: #163a8e;
	--color-primary-light-5: #123076;
	--color-primary-light-6: #0e265f;
	--color-primary-light-7: #0a1b48;
	--color-primary-alpha-10: #2563eb1a;
	--color-primary-alpha-20: #2563eb33;
	--color-primary-alpha-30: #2563eb4c;
	--color-primary-alpha-40: #2563eb66;
	--color-primary-alpha-50: #2563eb80;
	--color-primary-alpha-60: #2563eb99;
	--color-primary-alpha-70: #2563ebb2;
	--color-primary-alpha-80: #2563ebcc;
	--color-primary-alpha-90: #2563ebe6;

	/* secondary (borders, buttons, inactive surfaces) */
	--color-secondary: #212b37;
	--color-secondary-button: #2a3542;
	--color-secondary-hover: var(--color-secondary-dark-3);
	--color-secondary-active: var(--color-secondary-dark-5);
	--color-secondary-dark-1: #283243;
	--color-secondary-dark-2: #343e4e;
	--color-secondary-dark-3: #414a59;
	--color-secondary-dark-4: #4d5664;
	--color-secondary-dark-5: #5a626f;
	--color-secondary-dark-6: #666e7a;
	--color-secondary-dark-7: #737a85;
	--color-secondary-dark-8: #7f8590;
	--color-secondary-dark-9: #8c919b;
	--color-secondary-dark-10: #989da5;
	--color-secondary-dark-11: #a5a9b0;
	--color-secondary-dark-12: #b1b5bb;
	--color-secondary-dark-13: #bec1c6;
	--color-secondary-light-1: #162032;
	--color-secondary-light-2: #121a2c;
	--color-secondary-light-3: #0e1526;
	--color-secondary-light-4: #090f20;
	--color-secondary-alpha-10: #94a3b81a;
	--color-secondary-alpha-20: #94a3b833;
	--color-secondary-alpha-30: #94a3b84c;
	--color-secondary-alpha-40: #94a3b866;
	--color-secondary-alpha-50: #94a3b880;
	--color-secondary-alpha-60: #94a3b899;
	--color-secondary-alpha-70: #94a3b8b2;
	--color-secondary-alpha-80: #94a3b8cc;
	--color-secondary-alpha-90: #94a3b8e6;

	/* named colours */
	--color-red: #f2646f;
	--color-red-light: #f58b93;
	--color-red-dark-1: #c2515d;
	--color-red-dark-2: #923e4c;
	--color-red-badge: #6e303f;
	--color-red-badge-bg: #f2646f2e;
	--color-red-badge-hover-bg: #f2646f4c;
	--color-orange: #f59a4a;
	--color-orange-light: #f8b377;
	--color-orange-dark-1: #c47c40;
	--color-orange-dark-2: #945f36;
	--color-orange-badge: #6f492e;
	--color-orange-badge-bg: #f59a4a2e;
	--color-orange-badge-hover-bg: #f59a4a4c;
	--color-yellow: #fbbf24;
	--color-yellow-light: #fccf5b;
	--color-yellow-dark-1: #c99a21;
	--color-yellow-dark-2: #97751f;
	--color-yellow-badge: #72591d;
	--color-yellow-badge-bg: #fbbf242e;
	--color-yellow-badge-hover-bg: #fbbf244c;
	--color-olive: #b5cc4a;
	--color-olive-light: #c8d977;
	--color-olive-dark-1: #91a440;
	--color-olive-dark-2: #6d7d36;
	--color-olive-badge: #535f2e;
	--color-olive-badge-bg: #b5cc4a2e;
	--color-olive-badge-hover-bg: #b5cc4a4c;
	--color-green: #34d399;
	--color-green-light: #67deb2;
	--color-green-dark-1: #2aaa7f;
	--color-green-dark-2: #208165;
	--color-green-badge: #186252;
	--color-green-badge-bg: #34d3992e;
	--color-green-badge-hover-bg: #34d3994c;
	--color-teal: #22d3c5;
	--color-teal-light: #59ded4;
	--color-teal-dark-1: #1caaa2;
	--color-teal-dark-2: #15817f;
	--color-teal-badge: #106265;
	--color-teal-badge-bg: #22d3c52e;
	--color-teal-badge-hover-bg: #22d3c54c;
	--color-blue: #3b82f6;
	--color-blue-light: #6ca1f8;
	--color-blue-dark-1: #3069c9;
	--color-blue-dark-2: #24509d;
	--color-blue-badge: #1c3e7b;
	--color-blue-badge-bg: #3b82f62e;
	--color-blue-badge-hover-bg: #3b82f64c;
	--color-violet: #8b7bff;
	--color-violet-light: #a89cff;
	--color-violet-dark-1: #7064d1;
	--color-violet-dark-2: #544ca2;
	--color-violet-badge: #403b7f;
	--color-violet-badge-bg: #8b7bff2e;
	--color-violet-badge-hover-bg: #8b7bff4c;
	--color-purple: #b57bf0;
	--color-purple-light: #c89cf4;
	--color-purple-dark-1: #9164c5;
	--color-purple-dark-2: #6d4c99;
	--color-purple-badge: #533b79;
	--color-purple-badge-bg: #b57bf02e;
	--color-purple-badge-hover-bg: #b57bf04c;
	--color-pink: #f472b6;
	--color-pink-light: #f795c8;
	--color-pink-dark-1: #c45c96;
	--color-pink-dark-2: #934776;
	--color-pink-badge: #6f375f;
	--color-pink-badge-bg: #f472b62e;
	--color-pink-badge-hover-bg: #f472b64c;
	--color-brown: #c08a5a;
	--color-brown-light: #d0a783;
	--color-brown-dark-1: #9a704d;
	--color-brown-dark-2: #74553f;
	--color-brown-badge: #574135;
	--color-brown-badge-bg: #c08a5a2e;
	--color-brown-badge-hover-bg: #c08a5a4c;
	--color-grey: #8693a3;
	--color-grey-light: #a0acc6;
	--color-grey-dark-1: #687494;
	--color-grey-dark-2: #4e5975;
	--color-grey-badge: #3b445d;
	--color-grey-badge-bg: #8190b32e;
	--color-grey-badge-hover-bg: #8190b34c;
	--color-black: #131b24;
	--color-black-light: #1a2342;
	--color-black-dark-1: #091023;
	--color-black-dark-2: #070d20;
	--color-black-badge: #060b1e;
	--color-black-badge-bg: #0b12262e;
	--color-black-badge-hover-bg: #0b12264c;

	/* ansi / console */
	--color-console-fg: #e8eef2;
	--color-console-fg-subtle: #b2bfca;
	--color-console-bg: #080b0f;
	--color-console-border: #212b37;
	--color-console-hover-bg: #ffffff16;
	--color-console-active-bg: #18212c;
	--color-console-menu-bg: #131b24;
	--color-console-menu-border: #34404f;
	--color-ansi-black: #131b24;
	--color-ansi-red: #f2646f;
	--color-ansi-green: #34d399;
	--color-ansi-yellow: #fbbf24;
	--color-ansi-blue: #3b82f6;
	--color-ansi-magenta: #b57bf0;
	--color-ansi-cyan: #22d3c5;
	--color-ansi-white: #e8eef2;
	--color-ansi-bright-black: #5d6e99;
	--color-ansi-bright-red: #ff8a93;
	--color-ansi-bright-green: #6ee7b7;
	--color-ansi-bright-yellow: #fcd679;
	--color-ansi-bright-blue: #60a5fa;
	--color-ansi-bright-magenta: #d1a6f7;
	--color-ansi-bright-cyan: #67e8f9;
	--color-ansi-bright-white: #ffffff;

	/* diff */
	--color-diff-removed-word-bg: #7a2634;
	--color-diff-added-word-bg: #0f6b4b;
	--color-diff-removed-row-bg: #3a1424;
	--color-diff-moved-row-bg: #4a3a12;
	--color-diff-added-row-bg: #0b3a30;
	--color-diff-removed-row-border: #6a2434;
	--color-diff-moved-row-border: #7a6420;
	--color-diff-added-row-border: #146a50;
	--color-diff-inactive: #0e1f44;

	/* surfaces & text */
	--color-body: #080b0f;
	--color-box-header: #18222d;
	--color-box-body: #131b24;
	--color-box-body-highlight: #1a2430;
	--color-text-dark: #ffffff;
	--color-text: #e2e8f0;
	--color-text-light: #cbd5e1;
	--color-text-light-1: #b4c0d0;
	--color-text-light-2: #94a3b8;
	--color-text-light-3: #7c8ba1;
	--color-footer: #080b0f;
	--color-timeline: #ffffff1f;
	--color-input-text: #ffffff;
	--color-input-background: #0c1218;
	--color-input-toggle-background: #212b37;
	--color-input-border: #ffffff26;
	--color-light: #00000028;
	--color-light-border: #ffffff1a;
	--color-hover: #ffffff12;
	--color-active: #2563eb33;
	--color-menu: #131b24;
	--color-card: #131b24;
	--color-markup-table-row: #ffffff08;
	--color-markup-code-block: #ffffff14;
	--color-markup-code-inline: #ffffff1a;
	--color-button: #131b24;
	--color-code-bg: #0c1218;
	--color-shadow: #00000099;
	--color-secondary-bg: #18212c;
	--color-expand-button: #14233c;
	--color-placeholder-text: #7c8ba1;
	--color-editor-line-highlight: #2563eb1f;
	--color-project-board-bg: #080b0f;
	--color-project-board-dark-label: #020617;
	--color-project-board-light-label: #ffffff;
	--color-reaction-bg: #ffffff12;
	--color-reaction-hover-bg: var(--color-primary-light-4);
	--color-reaction-active-bg: var(--color-primary-light-5);
	--color-tooltip-text: #ffffff;
	--color-tooltip-bg: #080b0ff0;
	--color-nav-bg: #080b0f;
	--color-nav-hover-bg: #ffffff0a;
	--color-nav-text: var(--color-text);
	--color-label-text: var(--color-text);
	--color-label-bg: #33415566;
	--color-label-hover-bg: #334155b3;
	--color-label-active-bg: #334155;
	--color-accent: var(--color-primary-light-1);
	--color-small-accent: var(--color-primary-light-5);
	--color-highlight-fg: #fcd679;
	--color-highlight-bg: #fbbf2433;
	--color-overlay-backdrop: #080b0fb3;
	--color-danger: var(--color-red);
	--color-transparency-grid-light: #1a2a52;
	--color-transparency-grid-dark: #0e1c3d;
	--color-workflow-edge-hover: #5d7fc4;
	--color-workflow-edge-selected: var(--color-primary);
	--color-mention-bg: #fbbf2426;
	--color-mention-text: #fcd679;
	--color-header-wrapper: transparent;
	--color-active-line: #2563eb1f;
	--color-guide-line: #ffffff14;
	--color-git: #f59a4a;

	--color-success-border: #146a50;
	--color-success-bg: #0b3a30;
	--color-success-text: #7ee8bf;
	--color-warning-border: #7a6420;
	--color-warning-bg: #3a300c;
	--color-warning-text: #fcd679;
	--color-error-border: #6a2434;
	--color-error-bg: #3a1424;
	--color-error-text: #ff9aa2;
	--color-info-border: #1e3a8a;
	--color-info-bg: #18222d;
	--color-info-text: #93c5fd;

	--color-added-text: #7ee8bf;
	--color-removed-text: #ff9aa2;

	--color-pr-merged: #8b7bff;
	--color-pr-open: #34d399;
	--color-pr-closed: #f2646f;
	--color-pr-draft: #8693a3;
	--color-issue-open: #34d399;
	--color-issue-closed: #8b7bff;

	--color-syntax-keyword: #60a5fa;
	--color-syntax-string: #7ee8bf;
	--color-syntax-comment: #6f84b5;
	--color-syntax-number: #fcd679;
	--color-syntax-function: #d1a6f7;

	--font-family-monospace: var(--urepo-mono);
	--fonts-regular: var(--urepo-sans);
	--border-radius: 0;
	--border-radius-medium: 0;
	--border-radius-full: 0;

	color-scheme: dark;
}

/* ------------------------------------------------------------------ */
/*  Page background: square grid on deep navy                          */
/* ------------------------------------------------------------------ */

html {
	/* the frame colour: top bar, side menu and footer sit directly on it, the page lives in an inset panel */
	background: #080b0f;
}

body {
	min-height: 100vh;
	background: transparent !important;
	color: var(--color-text);
	line-height: 1.6;
}

body::before {
	display: none !important;
}

body,
.ui.menu,
.ui.button,
.ui.input input,
.ui.form input,
.ui.form textarea,
.ui.dropdown,
.ui.label,
.ui.modal,
button,
input,
select,
textarea {
	font-family: var(--urepo-sans);
}

.full.height,
.page-content,
.page-content.repository,
.page-content.explore,
.page-content.dashboard,
.page-content.home {
	background: transparent !important;
}

/* strict square forms everywhere */
.ui.button,
.ui.buttons .button,
.ui.label,
.ui.segment,
.ui.attached.segment,
.ui.card,
.ui.cards > .card,
.ui.table,
.ui.attached.table,
.ui.attached.header,
.ui.message,
.ui.input input,
.ui.form input,
.ui.form textarea,
.ui.selection.dropdown,
.ui.dropdown .menu,
.ui.popup,
.ui.modal,
.tippy-box,
.ui.menu,
.markup pre,
.markup code,
.code-view,
.repo-topic,
.ui.progress,
.ui.progress .bar {
	border-radius: 0 !important;
}

/* ------------------------------------------------------------------ */
/*  Navbar: sticky translucent bar                                     */
/* ------------------------------------------------------------------ */

#navbar {
	position: sticky;
	top: 0;
	z-index: 100;
	/* like the landing page: no solid bar, just the items floating over the background */
	background: linear-gradient(180deg, rgba(8, 11, 15, 0.7) 0%, rgba(8, 11, 15, 0.25) 100%);
	border-bottom: 0;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	box-shadow: none;
}

#navbar .item {
	color: #e2e8f0;
	font-weight: 700;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
	border: 1px solid transparent;
	border-radius: 0 !important;
	transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

#navbar a.item:hover,
#navbar .item.active,
#navbar .ui.dropdown.item:hover,
#navbar .ui.dropdown.item.active {
	color: #60a5fa;
	background: rgba(255, 255, 255, 0.03);
	border-color: rgba(255, 255, 255, 0.1);
}

.secondary-nav,
.page-content > .secondary-nav {
	background: rgba(8, 11, 15, 0.6) !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
	box-shadow: none !important;
}

/* repo pages: the tab menu draws the divider itself, so the bar must not add a second one */
.page-content.repository .secondary-nav,
.page-content.repository > .secondary-nav {
	border-bottom: 0 !important;
}

.page-content.repository .secondary-nav .ui.tabular.menu {
	border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
	box-shadow: none !important;
}

.ui.secondary.menu:not(.pointing) .item,
.ui.secondary.menu:not(.pointing) .active.item {
	border: 1px solid transparent;
	border-radius: 0 !important;
}

.ui.secondary.menu:not(.pointing) .active.item,
.ui.secondary.menu:not(.pointing) a.item:hover {
	color: #60a5fa;
	background: rgba(255, 255, 255, 0.03);
	border-color: rgba(255, 255, 255, 0.1);
}

/* ------------------------------------------------------------------ */
/*  Panels / cards: glass with strict edges                            */
/* ------------------------------------------------------------------ */

.ui.segment,
.ui.attached.segment,
.ui.segments,
.ui.card,
.ui.cards > .card,
.ui.table,
.ui.attached.table,
.issue.list > .item,
.repository .diff-detail-box,
.repository .diff-file-box,
.ui.message {
	border-color: var(--urepo-glass-border) !important;
}

.ui.segment,
.ui.attached.segment,
.ui.card,
.ui.cards > .card,
.ui.attached.table,
.ui.table,
.repository .diff-file-box,
.repository .file-view,
#repo-files-table {
	background: rgba(19, 27, 36, 0.72);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.ui.attached.segment,
.ui.attached.table {
	box-shadow: none;
}

/* "card" look from the style sheet: blue accent on top */
.ui.card,
.ui.cards > .card {
	border-top: 4px solid #2563eb !important;
}

.ui.top.attached.header,
.ui.attached.header,
.ui.table > thead > tr > th,
.repository.file.list #repo-files-table .repo-file-item.commit-list-item,
.commit-header-row {
	background: rgba(255, 255, 255, 0.05);
	color: #cbd5e1;
	font-weight: 600;
}

.ui.table tbody tr:hover,
.repository.file.list #repo-files-table .repo-file-item:hover {
	background: rgba(37, 99, 235, 0.12) !important;
}

/* ------------------------------------------------------------------ */
/*  Buttons: square, solid blue with glow                              */
/* ------------------------------------------------------------------ */

.ui.button,
.ui.buttons .button {
	font-weight: 600;
	transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s, transform 0.2s;
}

.ui.basic.button,
.ui.basic.buttons .button {
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #e2e8f0;
	background: transparent;
}

.ui.basic.button:hover,
.ui.basic.buttons .button:hover {
	border-color: #60a5fa;
	background: rgba(37, 99, 235, 0.15);
	color: #ffffff;
}

.ui.primary.button,
.ui.primary.buttons .button,
.ui.green.button,
.ui.green.buttons .button,
button.ui.primary,
a.ui.primary.button {
	color: #ffffff !important;
	border: 1px solid transparent !important;
	background-color: #2563eb !important;
	background-image: none !important;
	box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4) !important;
	opacity: 1;
}

.ui.primary.button:hover,
.ui.primary.button:focus,
.ui.primary.button:active,
.ui.primary.buttons .button:hover,
.ui.green.button:hover,
.ui.green.button:focus,
.ui.green.button:active,
.ui.green.buttons .button:hover,
button.ui.primary:hover,
button.ui.primary:focus,
button.ui.primary:active {
	color: #ffffff !important;
	background-color: #60a5fa !important;
	background-image: none !important;
	box-shadow: 0 6px 20px rgba(96, 165, 250, 0.6) !important;
	transform: translateY(-2px);
}

.ui.primary.button.disabled,
.ui.primary.button:disabled,
.ui.green.button.disabled,
.ui.green.button:disabled {
	opacity: 0.45;
	box-shadow: none !important;
	transform: none;
}

/* ------------------------------------------------------------------ */
/*  Inputs                                                             */
/* ------------------------------------------------------------------ */

.ui.input input,
.ui.form input:not([type]),
.ui.form input[type='text'],
.ui.form input[type='search'],
.ui.form input[type='email'],
.ui.form input[type='password'],
.ui.form input[type='url'],
.ui.form input[type='number'],
.ui.form textarea,
.ui.selection.dropdown,
.ui.form select {
	background: rgba(8, 11, 15, 0.7);
	border-color: rgba(255, 255, 255, 0.15);
	color: #ffffff;
}

.ui.input input:focus,
.ui.form input:focus,
.ui.form textarea:focus,
.ui.selection.dropdown:focus,
.ui.selection.active.dropdown {
	border-color: #60a5fa;
	box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25);
}

/* ------------------------------------------------------------------ */
/*  Links, headings, code                                              */
/* ------------------------------------------------------------------ */

a,
.ui.breadcrumb a,
.markup a {
	color: #60a5fa;
}

a:hover,
.markup a:hover {
	color: #93c5fd;
}

h1, h2, h3, h4, h5, h6,
.markup h1, .markup h2, .markup h3, .markup h4 {
	color: #ffffff;
}

.markup h1,
.markup h2 {
	border-bottom-color: rgba(255, 255, 255, 0.1);
}

.markup code,
.markup tt,
code.inline-code-block {
	background: rgba(255, 255, 255, 0.08);
}

.markup pre,
.markup .highlight pre,
.code-view,
.file-view.code-view {
	background: rgba(8, 11, 15, 0.8);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.markup blockquote {
	border-left: 4px solid #2563eb;
	background: rgba(37, 99, 235, 0.1);
	color: var(--color-text);
}

.markup table th,
.markup table td {
	border-color: rgba(255, 255, 255, 0.1);
}

/* ------------------------------------------------------------------ */
/*  Labels / menus / modals                                            */
/* ------------------------------------------------------------------ */

.ui.dropdown .menu,
.ui.menu .dropdown.item .menu,
.ui.popup,
.tippy-box {
	background: #131b24;
	border: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
	z-index: 1000;
}

.ui.secondary.pointing.menu .active.item,
.ui.tabular.menu .active.item {
	color: #ffffff;
	border-color: #2563eb;
}

.ui.secondary.pointing.menu .item:hover {
	color: #60a5fa;
}

.ui.modal {
	background: #131b24;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-top: 4px solid #2563eb;
}

.ui.modal > .header {
	background: rgba(255, 255, 255, 0.04);
	color: #ffffff;
}

/* ------------------------------------------------------------------ */
/*  Navbar layout (markup comes from custom base/head_navbar.tmpl):     */
/*  logo | PR / Issues / Milestones icons + counts | search (centred) | */
/*  notifications, create, profile                                      */
/* ------------------------------------------------------------------ */

#navbar .urepo-nav-link {
	gap: 0.45rem;
}

#navbar .urepo-nav-link > svg {
	flex-shrink: 0;
}

/* guards against leftovers of the older script/CSS (cached copies): one icon, one badge, one search box */
#navbar .urepo-nav-link .urepo-ico,
#navbar .urepo-nav-link > svg ~ svg {
	display: none !important;
}

#navbar .urepo-nav-link::before,
#navbar .urepo-nav-link::after {
	content: none !important;
	display: none !important;
}

#navbar .urepo-nav-link .urepo-count ~ .urepo-count {
	display: none !important;
}

#navbar .urepo-search:not(.not-mobile) {
	display: none !important;
}

@media (min-width: 768px) {
	#navbar {
		min-height: 3.4rem;
	}

	/* icon only: the label stays in the DOM for screen readers */
	#navbar .urepo-nav-link {
		padding: 0.4rem 0.7rem;
	}

	#navbar .urepo-nav-link > svg {
		display: block;
		width: 20px;
		height: 20px;
	}

	#navbar .urepo-nav-link .urepo-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	/* search box in the middle of the bar */
	#navbar .urepo-search {
		position: absolute;
		left: 50%;
		top: 50%;
		transform: translate(-50%, -50%);
		width: min(30rem, 34vw);
		min-width: 14rem;
		margin: 0;
	}
}

/* phones: normal text menu, no icons */
@media (max-width: 767.98px) {
	#navbar .urepo-nav-link > svg {
		display: none;
	}
}

/* Explore search box with live results */
.urepo-search {
	position: relative;
}

.urepo-search input[type='text'] {
	box-sizing: border-box;
	width: 100%;
	height: 2.4rem;
	padding: 0 0.9rem 0 2.4rem;
	font: inherit;
	font-size: 0.92rem;
	color: #ffffff;
	background: rgba(8, 11, 15, 0.7);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 0;
	outline: none;
}

.urepo-search input[type='text']::placeholder {
	color: #94a3b8;
}

.urepo-search input[type='text']:focus {
	border-color: #60a5fa;
	box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25);
}

.urepo-search::before {
	content: '';
	position: absolute;
	left: 0.8rem;
	top: 50%;
	z-index: 1;
	width: 16px;
	height: 16px;
	transform: translateY(-50%);
	pointer-events: none;
	background-color: #94a3b8;
	-webkit-mask: var(--urepo-search-icon) center / contain no-repeat;
	mask: var(--urepo-search-icon) center / contain no-repeat;
	--urepo-search-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z'/%3E%3C/svg%3E");
}

.urepo-search-results {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: 1000;
	max-height: 70vh;
	overflow-y: auto;
	text-align: left;
	background: #131b24;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-top: 3px solid #2563eb;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

.urepo-search-results[hidden] {
	display: none;
}

.urepo-search-results .urepo-sr-title {
	padding: 0.6rem 0.9rem 0.3rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #94a3b8;
}

.urepo-search-results a.urepo-sr-item {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.5rem 0.9rem;
	color: #e2e8f0;
	text-decoration: none;
	border-left: 2px solid transparent;
}

.urepo-search-results a.urepo-sr-item img {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	border-radius: 0;
	object-fit: cover;
}

.urepo-search-results .urepo-sr-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.urepo-search-results .urepo-sr-name {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-weight: 600;
	color: #ffffff;
}

.urepo-search-results .urepo-sr-desc {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 0.8rem;
	color: #94a3b8;
}

.urepo-search-results a.urepo-sr-item:hover,
.urepo-search-results a.urepo-sr-item.is-active {
	background: rgba(37, 99, 235, 0.2);
	border-left-color: #60a5fa;
}

.urepo-search-results .urepo-sr-empty,
.urepo-search-results .urepo-sr-all {
	display: block;
	padding: 0.65rem 0.9rem;
	font-size: 0.85rem;
	color: #94a3b8;
	text-decoration: none;
}

.urepo-search-results .urepo-sr-all {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	color: #60a5fa;
}

.urepo-search-results .urepo-sr-all:hover,
.urepo-search-results .urepo-sr-all.is-active {
	background: rgba(37, 99, 235, 0.2);
	color: #ffffff;
}

/* counters injected by urepo-navbar.js */
#navbar .urepo-count {
	display: inline-block;
	min-width: 1.25rem;
	padding: 0 0.4rem;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.45;
	text-align: center;
	color: #ffffff;
	background: rgba(37, 99, 235, 0.3);
	border: 1px solid rgba(96, 165, 250, 0.35);
}

#navbar .urepo-count.is-zero {
	color: #94a3b8;
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(255, 255, 255, 0.1);
}

#navbar .urepo-count[hidden] {
	display: none;
}

/* nicer PR / Issues / Milestones buttons: one bordered button each, icon + count inside, same height as the search box */
@media (min-width: 768px) {
	#navbar .urepo-nav-link {
		display: inline-flex !important;
		align-items: center;
		gap: 0.5rem;
		height: 2.4rem;
		margin: 0 0.2rem !important;
		padding: 0 0.8rem !important;
		background: rgba(8, 11, 15, 0.55);
		border: 1px solid rgba(255, 255, 255, 0.12) !important;
		color: #cbd5e1;
	}

	#navbar .urepo-nav-link > svg {
		width: 18px;
		height: 18px;
	}

	#navbar a.urepo-nav-link:hover {
		color: #ffffff;
		background: rgba(37, 99, 235, 0.22);
		border-color: rgba(96, 165, 250, 0.55) !important;
	}

	#navbar .urepo-count {
		min-width: 0;
		padding: 0 0 0 0.55rem;
		font-size: 0.82rem;
		line-height: 1;
		color: #93c5fd;
		background: transparent;
		border: 0;
		border-left: 1px solid rgba(255, 255, 255, 0.14);
	}

	#navbar .urepo-count.is-zero {
		color: #7c8ba1;
		background: transparent;
		border-color: rgba(255, 255, 255, 0.14);
	}
}

/* ------------------------------------------------------------------ */
/*  Segmented toggles (Open / Closed / All, etc.)                      */
/* ------------------------------------------------------------------ */

.switch,
.list-header-toggle,
.ui.compact.menu,
.ui.menu.compact {
	display: inline-flex !important;
	align-items: stretch;
	min-height: 0;
	margin: 0;
	background: rgba(19, 27, 36, 0.72) !important;
	border: 1px solid rgba(255, 255, 255, 0.12) !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	overflow: hidden;
}

.switch > .item,
.list-header-toggle > .item,
.ui.compact.menu > .item,
.ui.menu.compact > .item {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin: 0 !important;
	padding: 0.55rem 1rem !important;
	border: 0 !important;
	border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
	border-radius: 0 !important;
	color: #cbd5e1;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	background: transparent;
	transition: background-color 0.3s, color 0.3s;
}

.switch > .item:first-child,
.list-header-toggle > .item:first-child,
.ui.compact.menu > .item:first-child,
.ui.menu.compact > .item:first-child {
	border-left: 0 !important;
}

.switch > .item::before,
.list-header-toggle > .item::before,
.switch > .item::after,
.list-header-toggle > .item::after,
.ui.compact.menu > .item::before,
.ui.compact.menu > .item::after {
	display: none !important;
}

.switch > .item svg,
.list-header-toggle > .item svg,
.ui.compact.menu > .item svg {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	margin: 0 !important;
	vertical-align: middle;
}

.switch > .item:hover,
.list-header-toggle > .item:hover,
.ui.compact.menu > .item:hover,
.ui.menu.compact > .item:hover {
	color: #ffffff;
	background: rgba(255, 255, 255, 0.05);
}

.switch > .item.active,
.list-header-toggle > .item.active,
.ui.compact.menu > .item.active,
.ui.menu.compact > .item.active {
	color: #ffffff;
	font-weight: 600;
	background: rgba(37, 99, 235, 0.28);
	box-shadow: inset 0 -2px 0 #2563eb;
}

/* toggles as separate buttons, same look as the navbar buttons (overrides the joined bar above) */
.switch,
.list-header-toggle,
.ui.compact.menu,
.ui.menu.compact {
	gap: 0.4rem;
	background: transparent !important;
	border: 0 !important;
	overflow: visible;
}

.switch > .item,
.list-header-toggle > .item,
.ui.compact.menu > .item,
.ui.menu.compact > .item {
	min-height: 2.4rem;
	padding: 0 1rem !important;
	background: rgba(8, 11, 15, 0.55);
	border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.switch > .item:first-child,
.list-header-toggle > .item:first-child,
.ui.compact.menu > .item:first-child,
.ui.menu.compact > .item:first-child {
	border-left: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.switch > .item:hover,
.list-header-toggle > .item:hover,
.ui.compact.menu > .item:hover,
.ui.menu.compact > .item:hover {
	background: rgba(37, 99, 235, 0.16);
	border-color: rgba(96, 165, 250, 0.45) !important;
}

.switch > .item.active,
.list-header-toggle > .item.active,
.ui.compact.menu > .item.active,
.ui.menu.compact > .item.active {
	background: rgba(37, 99, 235, 0.3);
	border-color: #3b82f6 !important;
	box-shadow: none;
}

/* ------------------------------------------------------------------ */
/*  Footer                                                             */
/* ------------------------------------------------------------------ */

footer.page-footer {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 3rem;
	padding: 1.1rem 1rem;
	/* like the landing page: transparent, centred bold text, language switcher in the left corner */
	background: transparent;
	border-top: 0;
	color: #cbd5e1;
	font-family: var(--urepo-sans);
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.5;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

footer.page-footer *,
footer.page-footer .ui.dropdown,
footer.page-footer .ui.dropdown .menu .item {
	font-family: var(--urepo-sans) !important;
	font-size: 0.875rem;
	font-weight: 700;
}

footer.page-footer .left-links {
	justify-content: center;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	/* "Version:" and "17.0.1" are separate flex items, so keep the gap small */
	gap: 0.25rem 0.4rem;
}

footer.page-footer .right-links {
	position: absolute;
	left: clamp(1rem, 3vw, 3rem);
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	gap: 0;
	line-height: 1;
}

footer.page-footer .right-links > a,
footer.page-footer .right-links #footer-theme-selector {
	display: none !important;
}

footer.page-footer .right-links,
footer.page-footer .right-links > *,
footer.page-footer .right-links > * > :not(.menu) {
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

footer.page-footer .right-links {
	width: max-content;
	justify-content: flex-start;
}

footer.page-footer .right-links > .ui.dropdown.language {
	position: relative;
	display: inline-flex !important;
	justify-content: flex-start !important;
	width: max-content !important;
	min-width: 0 !important;
	border: 0 !important;
	text-indent: 0;
	text-align: left;
}

footer.page-footer .right-links > .ui.dropdown.language > .flex-text-inline {
	justify-content: flex-start;
	margin: 0 !important;
	padding: 0 !important;
}

footer.page-footer .right-links .menu {
	left: 0 !important;
	right: auto !important;
	min-width: 12rem;
	max-height: min(60vh, 24rem);
	overflow-y: auto;
	padding: 0.25rem 0;
	border: 1px solid rgba(96, 165, 250, 0.35);
	border-radius: 0;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6);
	scrollbar-width: thin;
}

footer.page-footer .right-links .menu .item {
	padding: 0.5rem 1rem !important;
	white-space: nowrap;
}

@media (max-width: 40rem) {
	footer.page-footer {
		flex-direction: column;
		gap: 0.6rem;
	}

	footer.page-footer {
		align-items: center;
	}

	footer.page-footer .right-links {
		position: static;
		transform: none;
		width: 100%;
		justify-content: center;
	}

	footer.page-footer .right-links > .ui.dropdown.language {
		margin: 0 auto !important;
	}
}

footer.page-footer strong,
footer.page-footer b {
	font-weight: 700 !important;
	color: #e2e8f0;
}

footer.page-footer a,
footer.page-footer .ui.dropdown {
	color: #cbd5e1;
	text-decoration: none;
}

footer.page-footer a:hover,
footer.page-footer .ui.dropdown:hover {
	color: #60a5fa;
}

footer.page-footer .ui.dropdown .menu {
	background: #131b24;
}

footer.page-footer .ui.dropdown .menu .item {
	color: #cbd5e1;
}

footer.page-footer .ui.dropdown .menu .item:hover,
footer.page-footer .ui.dropdown .menu .item.selected {
	color: #60a5fa;
	background: rgba(255, 255, 255, 0.05);
}

/* ------------------------------------------------------------------ */
/*  Repo home: file list + "About" sidebar (needs custom home.tmpl)    */
/* ------------------------------------------------------------------ */

.urepo-repo-layout.has-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 19rem;
	gap: 2rem;
	align-items: start;
}

.urepo-repo-main {
	min-width: 0;
}

.urepo-repo-sidebar {
	display: flex;
	flex-direction: column;
	gap: 1.4rem;
	min-width: 0;
	padding: 1.5rem 1.4rem;
	border: 1px solid var(--urepo-glass-border);
	border-top: 4px solid #2563eb;
	border-radius: 0;
	background: rgba(19, 27, 36, 0.72);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* one font and one size scale for everything in the sidebar */
.urepo-repo-sidebar,
.urepo-repo-sidebar *,
.urepo-repo-sidebar button,
.urepo-repo-sidebar input,
.urepo-repo-sidebar .ui.label {
	font-family: var(--urepo-sans) !important;
}

.urepo-repo-sidebar {
	font-size: 0.92rem;
	line-height: 1.5;
}

.urepo-repo-sidebar #manage_topic {
	padding: 0;
	font-size: 0.85rem;
	font-weight: 400;
	line-height: 1.5;
	color: #94a3b8;
	background: none;
	border: 0;
	cursor: pointer;
}

.urepo-repo-sidebar #manage_topic:hover {
	color: #60a5fa;
	text-decoration: underline;
}

.urepo-repo-sidebar .repo-description .link {
	display: block;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	word-break: normal !important;
	overflow-wrap: normal !important;
}

.urepo-side-block + .urepo-side-block {
	padding-top: 1.4rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.urepo-side-title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 0.75rem;
	font-size: 1.1rem;
	font-weight: 700;
	color: #60a5fa;
}

.urepo-side-block .repo-description {
	display: flex !important;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.6rem;
	margin: 0 0 0.75rem;
	color: #e2e8f0;
	line-height: 1.55;
}

.urepo-side-block .repo-description #repo-desc {
	width: 100%;
	overflow-wrap: anywhere;
}

.urepo-side-block .repo-description .urepo-side-link {
	width: 100%;
	min-width: 0;
}

.urepo-side-block .repo-description .no-description {
	color: #94a3b8;
}

.urepo-side-block .repo-topics {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
}

.urepo-side-block .repo-topic.ui.label {
	margin: 0;
	padding: 0.3rem 0.7rem;
	font-size: 0.8rem;
	color: #60a5fa;
	background: rgba(37, 99, 235, 0.15);
	border: 1px solid rgba(96, 165, 250, 0.3);
}

.urepo-side-block .repo-topic.ui.label:hover {
	background: rgba(37, 99, 235, 0.35);
	color: #ffffff;
}

/* topics: nicer chips, "manage topics" as a dashed chip, edit form stacked full width */
.urepo-side-block .repo-topic.ui.label {
	font-weight: 600;
	line-height: 1.2;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.urepo-side-block .repo-topic.ui.label:hover {
	border-color: rgba(96, 165, 250, 0.7);
}

.urepo-repo-sidebar #manage_topic {
	padding: 0.3rem 0.7rem;
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1.2;
	color: #94a3b8;
	background: transparent;
	border: 1px dashed rgba(255, 255, 255, 0.25);
}

.urepo-repo-sidebar #manage_topic:hover {
	color: #93c5fd;
	text-decoration: none;
	border-color: rgba(96, 165, 250, 0.7);
	background: rgba(37, 99, 235, 0.12);
}

.urepo-repo-sidebar #topic_edit {
	flex-direction: column !important;
	align-items: stretch;
	gap: 0.6rem !important;
	margin: 0.6rem 0 !important;
}

.urepo-repo-sidebar #topic_edit > div {
	width: 100%;
	min-width: 0;
}

.urepo-repo-sidebar #topic_edit .ui.dropdown,
.urepo-repo-sidebar #topic_edit input[type='text'] {
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
	min-height: 2.4rem;
	background: rgba(8, 11, 15, 0.7);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #ffffff;
}

.urepo-repo-sidebar #topic_edit .ui.dropdown:focus-within,
.urepo-repo-sidebar #topic_edit input[type='text']:focus {
	border-color: #3b82f6;
}

.urepo-repo-sidebar #topic_edit .ui.label {
	margin: 0.15rem 0.3rem 0.15rem 0;
	color: #93c5fd;
	background: rgba(37, 99, 235, 0.2);
	border: 1px solid rgba(96, 165, 250, 0.35);
}

.urepo-repo-sidebar #topic_edit > div:last-child {
	display: flex;
	justify-content: flex-end;
	gap: 0.5rem;
}

.urepo-repo-sidebar #topic_edit > div:last-child .ui.button {
	margin: 0;
	min-height: 2.2rem;
}

.urepo-side-link {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin: 0;
	color: #60a5fa;
	text-decoration: none;
	word-break: break-word;
}

.urepo-side-link.muted {
	color: #cbd5e1;
}

.urepo-side-link:hover {
	color: #ffffff;
}

.urepo-side-link svg {
	flex-shrink: 0;
	color: #94a3b8;
}

.urepo-side-link b {
	color: #ffffff;
}

.urepo-side-stats {
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	margin-top: 1.1rem;
}

/* stock commits / branches / tags / size / language summary, laid out vertically */
.urepo-side-summary .ui.segments,
.urepo-side-summary .ui.segment {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
}

.urepo-side-summary .sub-menu,
.urepo-side-summary .repository-menu {
	display: flex !important;
	flex-direction: column;
	align-items: flex-start !important;
	justify-content: flex-start !important;
	gap: 0.7rem;
}

.urepo-side-summary .ui.segments .ui.segment.sub-menu,
.urepo-side-summary .ui.segments .ui.segment.repository-menu {
	margin-bottom: 1.1rem !important;
}

.urepo-side-summary .sub-menu .item,
.urepo-side-summary .repository-menu .item {
	display: flex;
	align-items: center;
	justify-content: flex-start !important;
	gap: 0.55rem;
	width: 100%;
	margin: 0 !important;
	padding: 0 !important;
	text-align: left;
	color: #cbd5e1;
}

.urepo-side-summary .sub-menu .item:hover {
	color: #60a5fa;
}

.urepo-side-summary .sub-menu .item svg {
	color: #94a3b8;
}

.urepo-side-summary .sub-menu b {
	color: #ffffff;
}

.urepo-side-summary .language-stats,
.urepo-side-summary .ui.segments .ui.segment.language-stats {
	height: 8px !important;
	margin-top: 0 !important;
	overflow: hidden;
	border-radius: 0 !important;
}

.urepo-side-summary .language-stats .bar,
.urepo-side-summary .language-stats > * {
	border-radius: 0 !important;
}

@media (max-width: 62rem) {
	.urepo-repo-layout.has-sidebar {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.5rem;
	}
}

/* ------------------------------------------------------------------ */
/*  Misc polish                                                        */
/* ------------------------------------------------------------------ */

:focus-visible {
	outline: 2px solid #60a5fa;
	outline-offset: 3px;
}

::selection {
	background: rgba(37, 99, 235, 0.55);
	color: #ffffff;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #212b37; border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: #2a3a52; }

.ui.progress .bar { background: #2563eb; }

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
		animation: none !important;
	}
	.ui.primary.button:hover,
	.ui.green.button:hover {
		transform: none;
	}
}


/* ------------------------------------------------------------------ */
/*  FRAME LAYOUT (GitLab-style): one solid frame = top bar + side menu  */
/*  + footer, and the page content is an inset rounded panel.           */
/*  Needs custom base/head_navbar.tmpl (it renders .urepo-sidebar).     */
/* ------------------------------------------------------------------ */

#navbar {
	min-height: 3rem !important;
	height: 3rem;
	padding: 0 0.75rem;
	background: #080b0f !important;
	border-bottom: 0 !important;
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
	box-shadow: none !important;
}

#navbar .urepo-brand-name {
	margin-left: 0.6rem;
	font-size: 1.05rem;
	font-weight: 700;
	color: #e6ebf2;
}

#navbar #navbar-logo {
	display: inline-flex;
	align-items: center;
	padding-left: 0.25rem;
	padding-right: 0.5rem;
}

.urepo-sidebar {
	display: none;
}

@media (min-width: 900px) {
	/* PR / Issues / Milestones live in the side menu now */
	#navbar .urepo-nav-link {
		display: none !important;
	}

	#navbar .urepo-search {
		width: min(34rem, 38vw);
	}

	#navbar .urepo-search input[type='text'] {
		height: 2rem;
		font-size: 0.85rem;
		background: #131b24;
		border: 1px solid #243040;
		border-radius: 6px;
	}

	body:not(:has(.urepo-landing)) .urepo-sidebar {
		display: flex;
		flex-direction: column;
		gap: 2px;
		position: fixed;
		top: 3rem;
		left: 0;
		bottom: 0;
		z-index: 40;
		width: 208px;
		box-sizing: border-box;
		padding: 0.5rem;
		overflow-x: hidden;
		overflow-y: auto;
		background: #080b0f;
		font-family: var(--urepo-sans);
	}

	body:not(:has(.urepo-landing)) .full.height > .page-content {
		margin: 0 8px 8px 208px;
		min-width: 0;
		border: 1px solid #243040;
		border-radius: 10px;
		background: #0f151c !important;
	}

	body:not(:has(.urepo-landing)) footer.page-footer {
		margin-left: 208px;
	}

	/* the content must fit beside the side menu instead of using the fixed container widths */
	body:not(:has(.urepo-landing)) .full.height > .page-content .ui.container {
		width: min(1360px, calc(100% - 3rem)) !important;
		max-width: none !important;
		margin-left: auto !important;
		margin-right: auto !important;
	}

	/* collapsed side menu: icons only */
	html.urepo-collapsed .urepo-sidebar {
		width: 56px;
	}

	html.urepo-collapsed body:not(:has(.urepo-landing)) .full.height > .page-content {
		margin-left: 56px;
	}

	html.urepo-collapsed body:not(:has(.urepo-landing)) footer.page-footer {
		margin-left: 56px;
	}

	html.urepo-collapsed :is(.urepo-sidebar, .urepo-ctx-nav) .urepo-side-label,
	html.urepo-collapsed :is(.urepo-sidebar, .urepo-ctx-nav) .urepo-count,
	html.urepo-collapsed :is(.urepo-sidebar, .urepo-ctx-nav) .urepo-side-heading {
		display: none !important;
	}

	html.urepo-collapsed :is(.urepo-sidebar, .urepo-ctx-nav) .urepo-side-link,
	html.urepo-collapsed :is(.urepo-sidebar, .urepo-ctx-nav) .urepo-side-collapse {
		justify-content: center;
		padding: 0;
	}
}

/* panel top edge: the repo header bar must follow the rounded corners */
.full.height > .page-content > .secondary-nav {
	background: transparent !important;
	border-radius: 10px 10px 0 0;
}

:is(.urepo-sidebar, .urepo-ctx-nav) .urepo-side-group {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

:is(.urepo-sidebar, .urepo-ctx-nav) .urepo-side-repo[hidden] {
	display: none;
}

html.urepo-repo-ctx :is(.urepo-sidebar, .urepo-ctx-nav) .urepo-side-global {
	display: none;
}

:is(.urepo-sidebar, .urepo-ctx-nav) .urepo-side-link,
:is(.urepo-sidebar, .urepo-ctx-nav) .urepo-side-collapse {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 34px;
	box-sizing: border-box;
	padding: 0 10px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #a3afbf;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
}

:is(.urepo-sidebar, .urepo-ctx-nav) .urepo-side-link svg,
:is(.urepo-sidebar, .urepo-ctx-nav) .urepo-side-collapse svg {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
}

:is(.urepo-sidebar, .urepo-ctx-nav) .urepo-side-link:hover,
:is(.urepo-sidebar, .urepo-ctx-nav) .urepo-side-collapse:hover {
	color: #ffffff;
	background: #131b24;
}

:is(.urepo-sidebar, .urepo-ctx-nav) .urepo-side-link.active,
:is(.urepo-sidebar, .urepo-ctx-nav) .urepo-side-link[aria-current='page'] {
	color: #d6e4ff;
	background: #1d2c47;
}

:is(.urepo-sidebar, .urepo-ctx-nav) .urepo-side-label {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

:is(.urepo-sidebar, .urepo-ctx-nav) .urepo-count {
	margin-left: auto;
	padding: 0;
	min-width: 0;
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	color: #93c5fd;
	background: transparent;
	border: 0;
}

:is(.urepo-sidebar, .urepo-ctx-nav) .urepo-count.is-zero {
	color: #7c8ba1;
}

:is(.urepo-sidebar, .urepo-ctx-nav) .urepo-count[hidden] {
	display: none;
}

:is(.urepo-sidebar, .urepo-ctx-nav) .urepo-side-sep {
	height: 1px;
	margin: 6px 8px;
	background: #243040;
}

:is(.urepo-sidebar, .urepo-ctx-nav) .urepo-side-heading {
	padding: 6px 10px 2px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #7c8ba1;
}

:is(.urepo-sidebar, .urepo-ctx-nav) .urepo-side-collapse {
	margin-top: auto;
	width: 100%;
}

/* repo tabs are mirrored into the side menu by urepo-navbar-v3.js; then the original tab bar goes away */
html.urepo-repo-ctx .page-content.repository .secondary-nav overflow-menu {
	display: none !important;
}


/* below 900px (phones, small tablets) there is no side menu at all: the normal Forgejo menu is used */
@media (max-width: 899.98px) {
	.urepo-sidebar {
		display: none !important;
	}
}

/* no empty band between the panel and the footer: the panel grows to fill the window */
body:not(:has(.urepo-landing)) .full.height {
	display: flex;
	flex-direction: column;
	flex: 1 0 auto;
	width: 100%;
	/* Forgejo leaves ~80px of bottom padding here: that was the empty band between the panel and the footer */
	padding-bottom: 0 !important;
}

body:not(:has(.urepo-landing)) .full.height > .page-content {
	flex: 1 0 auto;
}

body:not(:has(.urepo-landing)) footer.page-footer {
	margin-top: 0;
	padding: 0.7rem 1rem;
}

/* links without an icon (settings menu entries) keep the text aligned with the iconed ones */
:is(.urepo-sidebar, .urepo-ctx-nav) .urepo-side-link.no-icon {
	padding-left: 38px;
}

:is(.urepo-sidebar, .urepo-ctx-nav) .urepo-side-link.no-icon:first-child {
	padding-left: 10px;
}

html.urepo-collapsed :is(.urepo-sidebar, .urepo-ctx-nav) .urepo-side-link.no-icon {
	display: none;
}

/* settings pages: the vertical menu lives in the side menu, so the page content gets the full width */
html.urepo-vm-ctx .page-content .flex-container-nav {
	display: none !important;
}

html.urepo-vm-ctx .page-content .flex-container-main {
	flex: 1 1 auto;
	width: 100%;
	max-width: none;
}

/* ------------------------------------------------------------------ */
/*  Page-specific side menus, rendered by the templates (no script):   */
/*  repo/header.tmpl            -> .urepo-ctx-repo   (repo tabs)        */
/*  *settings/navbar.tmpl, admin -> .urepo-ctx-settings (settings menu) */
/*  On desktop they replace the global list; on phones they stay as    */
/*  Forgejo draws them (the tab bar / the settings column).            */
/* ------------------------------------------------------------------ */

.urepo-ctx-repo,
.urepo-ctx-back {
	display: none;
}

@media (min-width: 900px) {
	.page-content.repository .secondary-nav overflow-menu {
		display: none !important;
	}

	body:has(.urepo-ctx-nav) .urepo-sidebar .urepo-side-global {
		display: none;
	}

	body:not(:has(.urepo-landing)) .urepo-ctx-nav {
		display: flex !important;
		flex-direction: column;
		gap: 2px;
		position: fixed;
		top: 3rem;
		left: 0;
		bottom: 48px;
		z-index: 41;
		width: 208px;
		max-width: none;
		box-sizing: border-box;
		margin: 0 !important;
		padding: 0.5rem;
		overflow-x: hidden;
		overflow-y: auto;
		background: #080b0f;
		border: 0;
		font-family: var(--urepo-sans);
	}

	/* on settings pages the settings menu is shown, not the repo tabs */
	body:has(.urepo-ctx-settings) aside.urepo-ctx-repo {
		display: none !important;
	}

	.urepo-ctx-back {
		display: flex;
	}

	.urepo-ctx-settings .ui.fluid.vertical.menu {
		display: flex;
		flex-direction: column;
		gap: 2px;
		width: 100% !important;
		margin: 0 !important;
		background: transparent !important;
		border: 0 !important;
		box-shadow: none !important;
	}

	.urepo-ctx-settings .ui.vertical.menu .item {
		display: flex;
		align-items: center;
		min-height: 34px;
		box-sizing: border-box;
		margin: 0 !important;
		padding: 0 10px !important;
		border: 0 !important;
		border-radius: 6px !important;
		background: transparent;
		color: #a3afbf;
		font-size: 13px;
		font-weight: 500;
		line-height: 1.2;
		text-decoration: none;
	}

	.urepo-ctx-settings .ui.vertical.menu .item::before {
		display: none !important;
	}

	.urepo-ctx-settings .ui.vertical.menu a.item:hover,
	.urepo-ctx-settings .ui.vertical.menu summary:hover {
		color: #ffffff;
		background: #131b24;
	}

	.urepo-ctx-settings .ui.vertical.menu .item.active,
	.urepo-ctx-settings .ui.vertical.menu summary.active {
		color: #d6e4ff;
		background: #1d2c47;
	}

	.urepo-ctx-settings .ui.vertical.menu .header.item {
		min-height: 0;
		padding: 10px 10px 4px !important;
		font-size: 11px;
		font-weight: 700;
		letter-spacing: 0.04em;
		text-transform: uppercase;
		color: #7c8ba1;
		background: transparent;
	}

	.urepo-ctx-settings .ui.vertical.menu details.item {
		display: block;
		padding: 0 !important;
	}

	.urepo-ctx-settings .ui.vertical.menu details.item > summary {
		display: flex;
		align-items: center;
		min-height: 34px;
		padding: 0 10px;
		border-radius: 6px;
		cursor: pointer;
	}

	.urepo-ctx-settings .ui.vertical.menu details.item > .menu {
		position: static;
		display: flex;
		flex-direction: column;
		gap: 2px;
		margin: 2px 0 0 !important;
		padding: 0 0 0 14px;
		border: 0;
		background: transparent;
		box-shadow: none;
	}

	/* collapsed: repo tabs keep only their icons, settings menus (no icons) disappear */
	html.urepo-collapsed .urepo-ctx-nav {
		width: 56px;
	}


	html.urepo-collapsed .urepo-ctx-repo .urepo-ctx-back {
		display: none;
	}
}

.urepo-ctx-repo .urepo-side-heading {
	padding: 8px 10px 6px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	color: #e6ebf2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* back link: a real icon instead of a text arrow */
.urepo-ctx-back svg {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
}

.urepo-ctx-back {
	gap: 8px;
}

@media (min-width: 900px) {
	.urepo-ctx-settings .ui.vertical.menu .item.urepo-ctx-back {
		gap: 8px;
		margin-bottom: 4px !important;
		color: #7c8ba1;
	}

	.urepo-ctx-settings .ui.vertical.menu .item.urepo-ctx-back:hover {
		color: #ffffff;
	}

	/* breathing room at the bottom of the framed panel */
	body:not(:has(.urepo-landing)) .full.height > .page-content {
		padding-bottom: 1.5rem !important;
	}
}

/* repo settings: the entries live under "Settings" in the repo side menu (GitLab style) */
.urepo-side-chev {
	display: inline-flex;
	margin-left: auto;
	color: #7c8ba1;
}

.urepo-side-chev svg {
	width: 16px;
	height: 16px;
}

.urepo-side-sub {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 2px 0 6px;
}

.urepo-ctx-nav .urepo-side-sub-link {
	height: 32px;
	padding-left: 38px;
	font-weight: 500;
}

.urepo-ctx-nav .urepo-side-sub-inner .urepo-side-sub-link {
	padding-left: 52px;
}

.urepo-side-sub-group > summary {
	list-style: none;
}

.urepo-side-sub-group > summary::-webkit-details-marker {
	display: none;
}

.urepo-side-sub-group > summary::after {
	content: '';
	flex-shrink: 0;
	width: 6px;
	height: 6px;
	margin-left: auto;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(-45deg);
	transition: transform 0.15s;
}

.urepo-side-sub-group[open] > summary::after {
	transform: rotate(45deg);
}

html.urepo-collapsed .urepo-side-chev {
	display: none !important;
}

@media (min-width: 900px) {
	.urepo-ctx-repo-settings {
		display: none !important;
	}
}

/* the "Settings" row itself is not filled while one of its entries is the current page (GitLab style) */
.urepo-ctx-repo .urepo-side-link.active:has(+ .urepo-side-sub) {
	background: transparent;
	color: #e6ebf2;
}

/* collapsed side menu: "Settings" shows its entries in a flying panel on hover (GitLab style) */
.urepo-side-fly-title {
	display: none;
}

@media (min-width: 900px) {
	html.urepo-collapsed .urepo-ctx-nav {
		overflow: visible;
	}

	html.urepo-collapsed .urepo-side-item {
		position: relative;
	}

	html.urepo-collapsed .urepo-side-item > .urepo-side-sub {
		display: none;
	}

	html.urepo-collapsed .urepo-side-item:hover > .urepo-side-sub,
	html.urepo-collapsed .urepo-side-item:focus-within > .urepo-side-sub {
		display: flex !important;
		position: absolute;
		left: 100%;
		top: -4px;
		z-index: 60;
		min-width: 12.5rem;
		margin: 0;
		padding: 6px;
		border-left: 8px solid transparent; /* hover bridge between the icon and the panel */
		background: #10161d;
		background-clip: padding-box;
		box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6);
		max-height: calc(100vh - 6rem);
		overflow-y: auto;
	}

	html.urepo-collapsed .urepo-side-item > .urepo-side-sub .urepo-side-fly-title {
		display: block;
		padding: 6px 10px 8px;
		font-size: 13px;
		font-weight: 700;
		color: #e6ebf2;
	}

	html.urepo-collapsed .urepo-side-item > .urepo-side-sub .urepo-side-sub-link {
		justify-content: flex-start;
		height: 32px;
		padding: 0 12px !important;
	}

	html.urepo-collapsed .urepo-side-item > .urepo-side-sub .urepo-side-sub-inner .urepo-side-sub-link {
		padding-left: 26px !important;
	}

	html.urepo-collapsed .urepo-side-item > .urepo-side-sub .urepo-side-sub-inner {
		display: flex;
	}
}

/* settings menus (user / admin / org): every entry has an icon, so the collapsed menu shows icons only */
@media (min-width: 900px) {
	.urepo-ctx-settings .ui.vertical.menu .item,
	.urepo-ctx-settings .ui.vertical.menu details.item > summary {
		gap: 10px;
	}

	.urepo-ctx-settings .ui.vertical.menu .item svg {
		flex-shrink: 0;
		width: 18px;
		height: 18px;
	}

	.urepo-ctx-settings .ui.vertical.menu details.item > summary {
		list-style: none;
	}

	.urepo-ctx-settings .ui.vertical.menu details.item > summary::-webkit-details-marker {
		display: none;
	}

	.urepo-ctx-settings .ui.vertical.menu details.item > summary::after {
		content: '';
		flex-shrink: 0;
		width: 6px;
		height: 6px;
		margin-left: auto;
		border-right: 1.5px solid currentColor;
		border-bottom: 1.5px solid currentColor;
		transform: rotate(-45deg);
		transition: transform 0.15s;
	}

	.urepo-ctx-settings .ui.vertical.menu details.item[open] > summary::after {
		transform: rotate(45deg);
	}

	html.urepo-collapsed .urepo-ctx-settings .ui.vertical.menu .item,
	html.urepo-collapsed .urepo-ctx-settings .ui.vertical.menu details.item > summary {
		justify-content: center;
		padding: 0 !important;
	}

	html.urepo-collapsed .urepo-ctx-settings .ui.vertical.menu .header.item,
	html.urepo-collapsed .urepo-ctx-settings .ui.vertical.menu details.item > summary::after {
		display: none;
	}

	html.urepo-collapsed .urepo-ctx-settings .ui.vertical.menu details.item > .menu {
		padding-left: 0;
	}
}

/* side menus: no visible scrollbar line */
.urepo-sidebar,
.urepo-ctx-nav,
.urepo-ctx-nav .ui.vertical.menu {
	scrollbar-width: none;
}

.urepo-sidebar::-webkit-scrollbar,
.urepo-ctx-nav::-webkit-scrollbar {
	display: none;
	width: 0;
}

/* collapsed settings menu: a group (details) opens as a flying window with its sub items */
@media (min-width: 900px) {
	html.urepo-collapsed .urepo-ctx-settings .ui.vertical.menu details.item {
		position: relative;
	}

	/* closed <details> content is hidden by the browser: force it to be renderable */
	html.urepo-collapsed .urepo-ctx-settings .ui.vertical.menu details.item::details-content {
		content-visibility: visible;
		display: block;
	}

	html.urepo-collapsed .urepo-ctx-settings .ui.vertical.menu details.item > .menu {
		display: none !important;
	}

	html.urepo-collapsed .urepo-ctx-settings .ui.vertical.menu details.item:hover > .menu,
	html.urepo-collapsed .urepo-ctx-settings .ui.vertical.menu details.item:focus-within > .menu {
		display: flex !important;
		position: absolute;
		left: 100%;
		top: -4px;
		z-index: 60;
		min-width: 12.5rem;
		margin: 0 !important;
		padding: 6px 6px 6px 14px !important;
		border-left: 8px solid transparent; /* hover bridge */
		background: #10161d;
		background-clip: padding-box;
		border-radius: 8px;
		box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6);
	}

	html.urepo-collapsed .urepo-ctx-settings .ui.vertical.menu details.item > .menu .item {
		justify-content: flex-start;
		padding: 0 10px !important;
		min-height: 32px;
	}

	html.urepo-collapsed .urepo-ctx-settings .ui.vertical.menu details.item > .menu .item .urepo-side-label {
		display: inline !important;
	}
}

/* collapsed: icons of groups (details) sit exactly on the same line as plain items */
@media (min-width: 900px) {
	html.urepo-collapsed .urepo-ctx-settings .ui.vertical.menu > details.item,
	html.urepo-collapsed .urepo-ctx-settings .ui.vertical.menu > .item {
		box-sizing: border-box;
		width: 100%;
		margin: 0 !important;
		border: 0 !important;
		padding: 0 !important;
	}

	html.urepo-collapsed .urepo-ctx-settings .ui.vertical.menu > details.item > summary {
		box-sizing: border-box;
		width: 100%;
		min-height: 34px;
		margin: 0 !important;
		padding: 0 !important;
		justify-content: center;
		gap: 0;
	}

	html.urepo-collapsed .urepo-ctx-settings .ui.vertical.menu > .item > svg,
	html.urepo-collapsed .urepo-ctx-settings .ui.vertical.menu > details.item > summary > svg {
		margin: 0 !important;
		flex: 0 0 18px;
	}
}

/* footer text exactly centred vertically */
footer.page-footer,
body:not(:has(.urepo-landing)) footer.page-footer {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	line-height: 1;
}

footer.page-footer .left-links,
footer.page-footer .left-links > * {
	margin: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	line-height: 1.2;
	align-self: center;
}
