/* Instance-wide UI skin: JetBrainsMono Nerd Font for code + Tokyo Night
 * syntax colors. Served from Forgejo's custom dir
 * (/data/gitea/public/assets/css/) at /assets/css/custom.css, injected on
 * every page via templates/custom/header.tmpl. */

/* Self-hosted woff2 (Nerd Fonts v3.5.1, sibling ../fonts/ dir) so the font
 * renders on machines without it installed; local() lets machines that do
 * have it skip the ~1 MB downloads. */
@font-face {
    font-family: "JetBrainsMono Nerd Font";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: local("JetBrainsMono Nerd Font"),
         local("JetBrainsMonoNF-Regular"),
         url("../fonts/JetBrainsMonoNerdFont-Regular.woff2") format("woff2");
}
@font-face {
    font-family: "JetBrainsMono Nerd Font";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: local("JetBrainsMono Nerd Font Italic"),
         local("JetBrainsMonoNF-Italic"),
         url("../fonts/JetBrainsMonoNerdFont-Italic.woff2") format("woff2");
}
@font-face {
    font-family: "JetBrainsMono Nerd Font";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: local("JetBrainsMono Nerd Font SemiBold"),
         local("JetBrainsMonoNF-SemiBold"),
         url("../fonts/JetBrainsMonoNerdFont-SemiBold.woff2") format("woff2");
}
@font-face {
    font-family: "JetBrainsMono Nerd Font";
    font-style: italic;
    font-weight: 600;
    font-display: swap;
    src: local("JetBrainsMono Nerd Font SemiBold Italic"),
         local("JetBrainsMonoNF-SemiBoldItalic"),
         url("../fonts/JetBrainsMonoNerdFont-SemiBoldItalic.woff2") format("woff2");
}
@font-face {
    font-family: "JetBrainsMono Nerd Font";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: local("JetBrainsMono Nerd Font Bold"),
         local("JetBrainsMonoNF-Bold"),
         url("../fonts/JetBrainsMonoNerdFont-Bold.woff2") format("woff2");
}
@font-face {
    font-family: "JetBrainsMono Nerd Font";
    font-style: italic;
    font-weight: 700;
    font-display: swap;
    src: local("JetBrainsMono Nerd Font Bold Italic"),
         local("JetBrainsMonoNF-BoldItalic"),
         url("../fonts/JetBrainsMonoNerdFont-BoldItalic.woff2") format("woff2");
}

.code-inner,
.lines-num,
code,
pre {
    font-family: "JetBrainsMono Nerd Font", "JetBrains Mono", monospace !important;
    font-weight: 600 !important;
}

/* Keep Forgejo's lazy issue-popup mount out of file-view flow. */
#repo-files-table a.ref-issue + div:empty:not([class]),
#repo-file-commit-box .message-wrapper > a.ref-issue + div:empty:not([class]) {
    display: none;
}

/* ── Tokyo Night for Forgejo (Chroma) v2 ── */

.code-inner { color: #a9b1d6 !important; }

/* keywords: func, if, return, var … */
.chroma .k, .chroma .kd, .chroma .kr,
.chroma .kp, .chroma .ow                 { color: #bb9af7 !important; }
/* package / import / preprocessor */
.chroma .kn, .chroma .cp                 { color: #7dcfff !important; }
/* nil, true, false */
.chroma .kc, .chroma .no                 { color: #ff9e64 !important; }
/* types: string, bool, error — magenta, not cyan */
.chroma .kt                              { color: #bb9af7 !important; }
/* builtins: len, make, append */
.chroma .nb                              { color: #2ac3de !important; }
/* self / this */
.chroma .bp                              { color: #f7768e !important; }
/* function names & calls */
.chroma .nf, .chroma .fm, .chroma .nd    { color: #7aa2f7 !important; }
/* operators: :=  !=  ==  && */
.chroma .o                               { color: #89ddff !important; }
/* punctuation and = */
.chroma .p                               { color: #a9b1d6 !important; }
/* identifiers, variables, class names */
.chroma .n, .chroma .nx, .chroma .nv, .chroma .vi,
.chroma .nc, .chroma .nn, .chroma .ni    { color: #c0caf5 !important; }
/* strings */
.chroma .s, .chroma .s1, .chroma .s2, .chroma .sb,
.chroma .sh, .chroma .sx, .chroma .sd    { color: #9ece6a !important; }
.chroma .se                              { color: #bb9af7 !important; }
.chroma .sr                              { color: #b4f9f8 !important; }
/* comments */
.chroma .c, .chroma .c1, .chroma .cm,
.chroma .cs, .chroma .ch                 { color: #565f89 !important;
                                           font-style: italic !important; }
/* numbers */
.chroma .m, .chroma .mi, .chroma .mf, .chroma .mh,
.chroma .mo, .chroma .mb, .chroma .il    { color: #ff9e64 !important; }
/* HTML/XML tags & attributes */
.chroma .nt                              { color: #f7768e !important; }
.chroma .na                              { color: #bb9af7 !important; }
/* markdown headings, errors */
.chroma .gh, .chroma .gu                 { color: #7aa2f7 !important; }
.chroma .err                             { color: #db4b4b !important; }
