@import url("./theme-forgejo-dark.css");
@import url("./ft-derive.css");
@import url("./ft-chamfer.css");
@import url("./ft-syntax.css");

@font-face { font-family: "Chakra Petch"; src: url("../fonts/forgejo-themes/chakra-petch-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url("../fonts/forgejo-themes/chakra-petch-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url("../fonts/forgejo-themes/chakra-petch-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url("../fonts/forgejo-themes/chakra-petch-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Share Tech Mono"; src: url("../fonts/forgejo-themes/share-tech-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --ft-bg: #0b1019; --ft-surface: #26191f; --ft-surface-2: #36222b; --ft-border: #66303a;
  --ft-text: #efe6e8; --ft-muted: #aaa0a4;
  --ft-accent: #38eef5; --ft-accent-text: #04181b;
  --ft-accent-2: #ffd343;
  --ft-ui-red: #f0675f;
  --ft-success: #46dc9c; --ft-warning: #ff9d2e; --ft-danger: #ff5f58; --ft-info: #4da3ff;
  --ft-diff-add: #46dc9c; --ft-diff-del: #ff5f58; --ft-diff-strength: 20%;
  --ft-syn-comment: #aaa0a4; --ft-syn-keyword: #ff6f6a; --ft-syn-type: #b69bff; --ft-syn-string: #f3d466;
  --ft-syn-number: #ff9d5c; --ft-syn-func: #38eef5; --ft-syn-const: #ff8f8a; --ft-syn-attr: #5fb0ff;
  --ft-syn-op: #cfc4c8; --ft-syn-meta: #aaa0a4;
  --ft-font-ui: "Chakra Petch", system-ui, "Segoe UI", sans-serif;
  --ft-font-code: "Share Tech Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ft-font-size: 14px;
  --ft-radius: 2px;
  --page-spacing: 16px;
}

/* dark red to dark blue backdrop; red = navigation, cyan = act, yellow = selected; chamfered buttons and badges */
body { background: linear-gradient(180deg, #3d1115 0%, #26101a 30%, #0f1119 70%, var(--ft-bg) 100%) fixed; }
body { line-height: 1.55; }
h1, h2, h3, h4, h5, h6, .ui.header { font-weight: 600; letter-spacing: 0.02em; }
.ui.menu .item, .ui.label, .ui.table th { text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.85em; }
:root { --color-nav-bg: transparent; --color-secondary-nav-bg: transparent; }
#navbar {
  border-bottom: 0;
  background-image: linear-gradient(90deg, var(--ft-danger), color-mix(in srgb, var(--ft-danger) 15%, transparent));
  background-size: 100% 2px;
  background-position: bottom;
  background-repeat: no-repeat;
}
.ui.menu .active.item, .ui.secondary.pointing.menu .active.item { color: var(--ft-accent); }
.ui.table th, .ui.label { color: color-mix(in srgb, var(--ft-text) 78%, var(--ft-accent)); }
.ui.menu .item { color: var(--ft-ui-red); }
.ui.vertical.menu .active.item { color: var(--ft-accent); }
.ui.menu .active.item, .ui.secondary.pointing.menu .active.item { border-color: var(--ft-accent); border-bottom-width: 2px; }
.ui.red.label.notification_count, .notification_count { background-color: var(--ft-accent-2); color: #1d1500; }
.ui.button, .ui.menu .item, .ui.table tbody tr, .flex-list .flex-item { transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s, filter .15s; }
.ui.primary.button:hover, .ui.primary.buttons .button:hover { filter: brightness(1.1); }
.ui.menu .item:hover { color: var(--ft-accent); }
.ui.table tbody tr:hover { background: var(--ft-surface-2); box-shadow: inset 2px 0 0 var(--ft-accent); }
/* yellow text carries a yellow border and icon: folders and tab counters */
svg.octicon-file-directory-fill, svg.octicon-file-directory-open-fill,
.repository.file.list #repo-files-table tbody .svg.octicon-file-directory-fill,
.repository.file.list #repo-files-table tbody .svg.octicon-file-directory-open-fill { color: var(--ft-accent-2); }
.ui.menu .item > .ui.label { color: var(--ft-accent-2); border: 1px solid var(--ft-accent-2); --ft-edge: currentcolor; }
/* list rows start flush with the content edge: extend the highlight and draw the marker outside */
#repo-files-table tbody tr:has(.octicon-file-directory-fill):hover { box-shadow: inset 2px 0 0 var(--ft-accent-2); }
#repo-files-table tbody tr:has(.octicon-file-directory-fill):hover td.name a { color: var(--ft-accent-2); }
.flex-list .flex-item:hover { background: var(--ft-surface-2); box-shadow: -6px 0 0 var(--ft-surface-2), -8px 0 0 var(--ft-accent); }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--ft-accent);
  outline-offset: 1px;
  box-shadow: 0 0 6px color-mix(in srgb, var(--ft-accent) 40%, transparent);
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
