/*
 * TNI branding on top of Forgejo's own themes, from the corporate design
 * (git.tni.dev/tni/design, brand/tokens.css + brand/type-color.css). Loaded via
 * templates/custom/header.tmpl. Direction rule: accent is olive #5f5e00 on light
 * surfaces, chartreuse #a6a500 on dark ones. Sharp corners, Poppins.
 */
@font-face { font-family: Poppins; font-weight: 400; font-display: swap; src: url(../fonts/Poppins-Regular.ttf) format("truetype"); }
@font-face { font-family: Poppins; font-weight: 500; font-display: swap; src: url(../fonts/Poppins-Medium.ttf) format("truetype"); }
@font-face { font-family: Poppins; font-weight: 600; font-display: swap; src: url(../fonts/Poppins-SemiBold.ttf) format("truetype"); }

:root {
  --fonts-proportional: Poppins, -apple-system, "Segoe UI", system-ui, Roboto, Arial;
  --border-radius: 0;
  --border-radius-medium: 0;
  --border-radius-large: 0;
}

/* light-dark() follows the color-scheme each Forgejo theme sets (forgejo-auto switches
   with the OS), so one block covers light, dark and auto.
   Light: cream page, white boxes, olive accent with white text (6.80:1).
   Dark: charcoal surfaces, chartreuse accent with charcoal text (5.33:1). */
:root {
  --color-body: light-dark(#f5f5ed, #2a2d25);
  --color-box-body: light-dark(#ffffff, #393b36);
  --color-nav-bg: light-dark(#ffffff, #191c15);
  --color-footer: light-dark(#dedfd6, #191c15);
  --color-text: light-dark(#2a2d25, #f5f5ed);
  --color-primary: light-dark(#5f5e00, #a6a500);
  --color-primary-contrast: light-dark(#ffffff, #2a2d25);
  --color-primary-dark-1: light-dark(#4f4e00, #b0af00);
  --color-primary-dark-2: light-dark(#3c4c24, #b0af00);
  --color-primary-dark-3: light-dark(#3c4c24, #cccd7f);
  --color-primary-dark-4: light-dark(#2a2d25, #cccd7f);
  --color-primary-dark-5: light-dark(#2a2d25, #e3e5bb);
  --color-primary-dark-6: light-dark(#2a2d25, #e3e5bb);
  --color-primary-dark-7: light-dark(#2a2d25, #f7f8e9);
  --color-primary-light-1: light-dark(#797802, #b0af00);
  --color-primary-light-2: light-dark(#8e8d04, #b0af00);
  --color-primary-light-3: light-dark(#a6a500, #cccd7f);
  --color-primary-light-4: light-dark(#cccd7f, #cccd7f);
  --color-primary-light-5: light-dark(#e3e5bb, #e3e5bb);
  --color-primary-light-6: light-dark(#f0f1d8, #f0f1d8);
  --color-primary-light-7: light-dark(#f7f8e9, #f7f8e9);
  --color-primary-alpha-10: light-dark(#5f5e0019, #a6a50019);
  --color-primary-alpha-20: light-dark(#5f5e0033, #a6a50033);
  --color-primary-alpha-30: light-dark(#5f5e004b, #a6a5004b);
  --color-primary-alpha-40: light-dark(#5f5e0066, #a6a50066);
  --color-primary-alpha-50: light-dark(#5f5e0080, #a6a50080);
  --color-primary-alpha-60: light-dark(#5f5e0099, #a6a50099);
  --color-primary-alpha-70: light-dark(#5f5e00b3, #a6a500b3);
  --color-primary-alpha-80: light-dark(#5f5e00cc, #a6a500cc);
  --color-primary-alpha-90: light-dark(#5f5e00e1, #a6a500e1);
}

/* Forgejo's dark theme is built on a blue-grey steel ramp; remap it to the brand's
   warm neutrals (#191c15 .. #dedfd6). Light themes don't use it. */
:root {
  --steel-900: #191c15;
  --steel-850: #20231b;
  --steel-800: #2a2d25;
  --steel-750: #31342c;
  --steel-700: #393b36;
  --steel-650: #42443e;
  --steel-600: #4c4c4c;
  --steel-550: #565754;
  --steel-500: #5f5f5d;
  --steel-450: #6a6b67;
  --steel-400: #747571;
  --steel-350: #858680;
  --steel-300: #959690;
  --steel-250: #a6a69f;
  --steel-200: #b8b7af;
  --steel-150: #cbcbc3;
  --steel-100: #dedfd6;
}

/* logo.svg is the reverse mark (tni-mark-reverse.svg): cream letters on a transparent
   ground, so it always sits on a charcoal tile, in both themes. Its viewBox already
   carries the clear space. logo.png (OpenGraph, manifest) stays the square badge. */
#navbar #navbar-logo,
#navbar #navbar-logo:is(:hover, :focus) {
  align-self: stretch;
  margin: 0 0 0 -10px;
  padding: 0 4px;
  background: #2a2d25;
}
#navbar #navbar-logo img {
  width: auto;
  height: 32px;
}
.page-content.home img.logo {
  width: 280px;
  height: auto;
  padding: 24px;
  background: #2a2d25;
}
