/* Realliance Forge typography: Atkinson Hyperlegible (body), Fredoka (headings), Noto Sans Mono (code).
   Self-hosted OFL fonts, latin subset (cluster/forgejo/custom/FONTS.md). Loaded on every page by
   templates/custom/header.tmpl, after the theme sheet, so it applies to every selectable theme.
   Forgejo derives all text from --fonts-proportional and --fonts-monospace; only those are replaced. */

@font-face{font-family:"Atkinson Hyperlegible";font-style:normal;font-weight:400;font-display:swap;src:url("../fonts/atkinson-hyperlegible-Regular.6bfd7bdd.woff2") format("woff2")}
@font-face{font-family:"Atkinson Hyperlegible";font-style:italic;font-weight:400;font-display:swap;src:url("../fonts/atkinson-hyperlegible-Italic.2b0d2720.woff2") format("woff2")}
@font-face{font-family:"Atkinson Hyperlegible";font-style:normal;font-weight:700;font-display:swap;src:url("../fonts/atkinson-hyperlegible-Bold.88941f37.woff2") format("woff2")}
@font-face{font-family:"Atkinson Hyperlegible";font-style:italic;font-weight:700;font-display:swap;src:url("../fonts/atkinson-hyperlegible-BoldItalic.ab97d8a1.woff2") format("woff2")}
@font-face{font-family:"Fredoka";font-style:normal;font-weight:300 700;font-display:swap;src:url("../fonts/fredoka-latin.ea2eb254.woff2") format("woff2")}
@font-face{font-family:"Noto Sans Mono";font-style:normal;font-weight:100 900;font-display:swap;src:url("../fonts/noto-sans-mono-latin.c35407ae.woff2") format("woff2")}

:root{
  --fonts-proportional: "Atkinson Hyperlegible", -apple-system, "Segoe UI", system-ui, "Noto Sans", "Noto Sans Hebrew", Roboto, "Helvetica Neue", Arial;
  --fonts-monospace: "Noto Sans Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace, var(--fonts-emoji);
  --fonts-heading: "Fredoka", var(--fonts-proportional), sans-serif, var(--fonts-emoji);
}

/* Radius variant B (approved) + heading narrowing: Fredoka on real headings only; .ui.header stays Atkinson.
   Forgejo 15: --border-radius (small), --border-radius-medium; Fomantic hard-codes some corners, listed below. */

/* --- narrowed Fredoka: real headings only --- */
:where(h1,h2,h3,h4):not(.ui.header),
.markup h1,.markup h2,.markup h3,.markup h4,.markup h5,.markup h6,
.repo-header .flex-item-title{font-family:var(--fonts-heading)}
.ui.header{font-family:var(--fonts-regular)}

/* --- radius variables --- */
:root{--border-radius:8px;--border-radius-medium:12px}

/* avatars are rounded squares via var(--border-radius); keep them as they were */
.ui.avatar,img.ui.avatar,.ui.avatar img,.ui.avatar svg{border-radius:4px}

/* small: buttons, inputs, labels, selects, dropdown fields, menu items (direct children only: an item inside a dropdown menu
   that sits in a secondary menu stays a square list row, as stock draws it, not a pill that bumps the menu border) */
.ui.button,.ui.basic.button,.ui.basic.buttons .button,.ui.input>input,.ui.input textarea,.ui.form textarea,
.ui.form select,.ui.form input[type=text],.ui.form input[type=password],.ui.form input[type=email],
.ui.form input[type=search],.ui.form input[type=url],.ui.form input[type=number],.ui.form input:not([type]),
.ui.selection.dropdown,.ui.search.selection .prompt,.ui.label,.ui.secondary.menu>.item,.ui.secondary.menu>.active.item,
.ui.secondary.vertical.menu>.item{border-radius:8px}
.ui.buttons .button:first-child{border-radius:8px 0 0 8px}
.ui.buttons .button:last-child{border-radius:0 8px 8px 0}
.ui.buttons .button:only-child{border-radius:8px}
.ui.vertical.buttons .button:only-child{border-radius:8px}
.ui.input>input:focus,.ui.form textarea:focus{border-radius:8px}

/* medium: boxes, menus, dropdown menus, modals, popups */
.ui.segment,.ui.segments,.ui.grid.segment,.ui.menu,.ui.modal,.ui.dropdown .menu,.ui.dropdown .menu .menu,
.ui.floating.dropdown .menu,.ui.floating.dropdown>.menu,.ui.pointing.dropdown>.menu,.ui.inline.dropdown .menu,
.ui.search>.results,.ui.secondary.menu .dropdown.item>.menu,.ui.popup{border-radius:12px}
.ui.dropdown .menu .menu,.ui.dropdown .right.menu>.menu,.ui.dropdown .menu .right.menu,
.ui.dropdown>.left.menu .menu,.ui.dropdown .menu .left.menu{border-radius:12px!important}
.ui.floating.dropdown .menu,.ui.floating.dropdown>.menu{border-radius:12px!important}
.ui.segments:not(.horizontal)>.segment:first-child{border-radius:12px 12px 0 0}
.ui.segments:not(.horizontal)>.segment:last-child{border-radius:0 0 12px 12px}
.ui.segments:not(.horizontal)>.segment:only-child{border-radius:12px}
.ui.vertical.menu>.item:first-child{border-radius:12px 12px 0 0}
.ui.vertical.menu>.item:last-child{border-radius:0 0 12px 12px}
.ui.vertical.menu>.item:only-child,.ui.vertical.menu>.active.item:only-child{border-radius:12px}
/* plain horizontal (boxed) menus only: a .ui.secondary.menu (the navbar, repo tabs, filter bars) has free-standing items that
   round all four corners on hover, so rounding only the ends of the row squares one side of the first and last item;
   a .vertical menu has its own end rules below (the extra :not() must not out-specify them) */
.ui.menu:not(.secondary):not(.vertical)>.item:first-child{border-radius:12px 0 0 12px}
.ui.menu:not(.secondary):not(.vertical)>.item:last-child{border-radius:0 12px 12px 0}

/* attached box titles and boxes (diff file boxes, README box, settings sections) */
.ui.top.attached.header,.ui[class*="top attached"].menu,.ui.top.attached.segment{border-radius:12px 12px 0 0}
.ui.bottom.attached.header,.ui[class*="bottom attached"].menu,.ui.bottom.attached.segment{border-radius:0 0 12px 12px}
.ui.attached.header:not(.top):not(.bottom){border-radius:0}
.ui.attached.segment:last-child:not(.top){border-radius:0 0 12px 12px}
.ui.top.attached.segment:only-child{border-radius:12px}
.ui.horizontal.segments>.segment:first-child{border-radius:12px 0 0 12px}
.ui.horizontal.segments>.segment:last-child{border-radius:0 12px 12px 0}
.ui.horizontal.segments>.segment:only-child{border-radius:12px}
/* repo home file list: stock hard-codes 4.57px on the bottom of the table that closes the box */
#repo-files-table.ui.table{border-radius:0 0 12px 12px}
.ui.bottom.attached.message{border-radius:0 0 12px 12px}

/* hard-coded top-only / per-corner radii that ignore the variables */
.ui.modal>.header,.ui.modal>:first-child:not(.icon):not(.dimmer){border-top-left-radius:12px;border-top-right-radius:12px}
.repository.view.issue .comment-list .comment>.content>div:first-child:not(.segment){border-radius:12px 12px 0 0}
.comment-header,.markup .file-preview-box .header,.ui.attached.message,
.ui.cards>.card>.content:first-child,.ui.card>.content:first-child,
.ui.table>thead>tr:first-child>th:only-child{border-radius:12px 12px 0 0}
.ui.table>thead>tr:first-child>th:first-child:not(:only-child){border-radius:12px 0 0 0}
.ui.table>thead>tr:first-child>th:last-child:not(:only-child){border-radius:0 12px 0 0}
.ui.tabular.menu .active.item{border-radius:8px 8px 0 0!important}
.ui.upward.dropdown>.menu,.ui.upward.dropdown.button:not(.pointing):not(.floating).active{border-radius:12px 12px 0 0}
.ui.simple.upward.active.dropdown,.ui.simple.upward.dropdown:hover{border-radius:12px 12px 0 0!important}
.ui.vertical.menu>.active.item:first-child{border-radius:12px 12px 0 0}

/* the one monospace declaration upstream hard-codes (diff line numbers) */
.repository .data-table .line-num{font-family:var(--fonts-monospace)}

/* --- Realliance logo (custom/BRAND.md) ---
   logo.svg is the wide navbar mark (3d); it is not square, so release the 30x30 box (width attr stays as a fallback).
   logo.svg carries its own prefers-color-scheme ink, right for the *-auto themes. An <img> cannot see the Forgejo
   theme, so a fixed theme gets a baked file swapped in via content:url(). Fixed light = latte ink, fixed dark = mocha ink. */
#navbar-logo img{width:auto}
html[data-theme*="latte"] img[src$="/assets/img/logo.svg"],
html[data-theme*="light"] img[src$="/assets/img/logo.svg"]{content:url("../img/logo-latte.4d495f38.svg")}
html[data-theme*="frappe"] img[src$="/assets/img/logo.svg"],
html[data-theme*="macchiato"] img[src$="/assets/img/logo.svg"],
html[data-theme*="mocha"] img[src$="/assets/img/logo.svg"],
html[data-theme*="dark"] img[src$="/assets/img/logo.svg"]{content:url("../img/logo-mocha.efbf5c27.svg")}
