/* ============================================================
   BASE  ·  reset, chrome, layout shell
   Loaded on every page. Keep it small: this is the render-
   blocking cost on a 3G phone in Kampala.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--nrh-bg);
  color: var(--nrh-ink-body);
  font-family: var(--nrh-font);
  font-size: 17px;
  line-height: var(--nrh-leading);
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; }

/* Don't trust browser defaults: plugin resets and CSS combiners strip them.
   :where() keeps specificity at zero, so any component rule that wants
   list-style:none (.jb-toc, .jb-overview-list, .sch-section) still wins. */
.nrh-main :where(ul) { list-style: disc outside; }
.nrh-main :where(ol) { list-style: decimal outside; }
.nrh-main :where(li) { margin-bottom: 4px; }
img { border-radius: var(--nrh-radius-sm); }

a { color: var(--nrh-secondary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: var(--nrh-leading-tight); margin: 0 0 .5em; color: var(--nrh-ink); }
h1 { font-size: var(--nrh-h1); font-weight: 800; }
h2 { font-size: var(--nrh-h2); font-weight: 700; }
h3 { font-size: var(--nrh-h3); font-weight: 600; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--nrh-secondary);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---- accessibility ---------------------------------------- */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 12px 20px;
  background: var(--nrh-primary);
  color: #fff;
  font-weight: 700;
  border-radius: 0 0 var(--nrh-radius-sm) 0;
}
.skip-link:focus {
  left: 0; top: 0;
  text-decoration: none;
}

/* ---- layout ------------------------------------------------ */
.nrh-wrap {
  width: 100%;
  max-width: var(--nrh-measure-wide);
  margin-inline: auto;
  padding-inline: 22px;
}
.nrh-wrap--narrow { max-width: var(--nrh-measure-job); }

/* two-column shell: 1fr + 290px sticky, stacks at 900px */
.nrh-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--nrh-sidebar);
  gap: 30px;
  align-items: start;
}
.nrh-sticky { position: sticky; top: 18px; }

/*
 * A sticky child can only travel inside its own parent's box. The grid
 * above sets align-items: start, which sizes every column to its own
 * content, so the sidebar column was exactly as tall as the cards in it
 * and .nrh-sticky had nowhere to go: it scrolled away like static
 * content. Verified in a browser, the column measured 300px against a
 * 3000px article.
 *
 * align-items: start stays, because the other columns should not
 * stretch. Only the column that actually holds a sticky child opts back
 * into the full row height.
 */
.nrh-shell > .nrh-job-sidebar,
.nrh-shell > .nrh-has-sticky { align-self: stretch; }

@media (max-width: 900px) {
  .nrh-shell  { grid-template-columns: minmax(0, 1fr); }
  .nrh-sticky { position: static; }
  .nrh-hide-sm { display: none; }
}
@media (min-width: 901px) {
  .nrh-show-sm { display: none; }
}

/* ---- header ------------------------------------------------ */
.nrh-header { background: var(--nrh-primary); color: #fff; }
.nrh-header a { color: rgba(255,255,255,.92); }
.nrh-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: 13px;
}
.nrh-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #fff;
}
.nrh-brand:hover { text-decoration: none; }
.nrh-brand-accent { color: var(--nrh-apply-on-dark); }
.nrh-brand img { max-height: 40px; width: auto; border-radius: 0; }

.nrh-nav ul {
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  font-weight: 600;
}
.nrh-nav a { text-decoration: none; }
.nrh-nav a:hover,
.nrh-nav .current-menu-item > a { color: var(--nrh-apply-on-dark); }

.nrh-header-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }

.nrh-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 42px; height: 38px;
  padding: 0;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 9px;
  cursor: pointer;
}
.nrh-burger span { display: block; width: 17px; height: 2px; background: #fff; border-radius: 2px; }
@media (max-width: 900px) {
  .nrh-burger { display: flex; }
  .nrh-nav { display: none; }
  .nrh-nav.is-open {
    display: block;
    position: absolute;
    left: 0; right: 0;
    z-index: 40;
    background: var(--nrh-primary);
    border-top: 1px solid rgba(255,255,255,.15);
    padding: 12px 22px 18px;
  }
  .nrh-nav.is-open ul { flex-direction: column; gap: 4px; }
  .nrh-nav.is-open li { border-bottom: 1px solid rgba(255,255,255,.1); }
  .nrh-nav.is-open a { display: block; padding: 11px 0; }
}

/* ---- buttons (chrome) --------------------------------------- */
.nrh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border: 2px solid transparent;
  border-radius: 9px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease;
}
.nrh-btn:hover { text-decoration: none; }
.nrh-btn--apply { background: var(--nrh-apply-ink); color: #fff; }
.nrh-btn--apply:hover { background: var(--nrh-apply-hover); color: #fff; }
.nrh-btn--save  { background: var(--nrh-save-ink); color: #fff; }
.nrh-btn--save:hover { background: var(--nrh-save-hover); color: #fff; }
.nrh-btn--ghost { background: var(--nrh-info-bg); color: var(--nrh-primary); }
.nrh-btn--light { background: #fff; color: var(--nrh-primary); }

/* ---- footer -------------------------------------------------- */
.nrh-footer {
  margin-top: 40px;
  background: #072c6b;
  color: rgba(255,255,255,.88);
}
.nrh-footer a { color: rgba(255,255,255,.88); }
.nrh-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
  padding-block: 30px;
}
.nrh-footer h2 { font-size: 18px; color: #fff; margin-bottom: 8px; }
.nrh-footer-heading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #62f48a;
  margin-bottom: 9px;
}
.nrh-footer ul { list-style: none; margin: 0; padding: 0; line-height: 1.95; font-size: 14.5px; }
.nrh-footer-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  padding: 15px 0 24px;
  border-top: 1px solid rgba(255,255,255,.16);
  font-size: 13px;
}
.nrh-footer-safety { color: #fbbf24; font-weight: 600; }

/* ---- the logo tile -------------------------------------------
   Size travels as a custom property, so any context can resize it
   with one declaration and no !important against an inline style.
   Two variants, because a brand logo and our own initials want
   opposite treatments. See nrh_logo_tile().
   -------------------------------------------------------------- */
.nrh-job-logo {
  --nrh-logo-size: 58px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  width: var(--nrh-logo-size);
  height: var(--nrh-logo-size);
  border-radius: 50%;
  background: var(--nrh-primary);
  border: 1px solid rgba(0,0,0,.06);
  color: #fff;
  font-size: calc(var(--nrh-logo-size) * .29);
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1;
}

/* An uploaded logo is someone else's artwork: light ground, padded,
   rounded square, never a circle and never on navy. A transparent PNG
   with dark lettering is invisible on the navy tile, and a circle
   crops the corners off a square mark. */
.nrh-job-logo--img {
  background: #fff;
  border: 1px solid var(--nrh-line);
  border-radius: calc(var(--nrh-logo-size) * .22);
  padding: calc(var(--nrh-logo-size) * .1);
}
.nrh-logo-img {
  display: block;
  width: 100%;
  height: 100%;
  /* min-*: 0 defeats the grid automatic minimum size. Without it a grid
     item defaults to min-height: auto, which for a replaced element means
     its intrinsic size wins over height: 100%: a 200x420 stacked lockup
     rendered 110px tall inside a 68px tile and spilled out of it. The
     max-* pair is belt and braces for the same thing. */
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  /* contain, never cover: a wide wordmark keeps its proportions
     instead of having its sides cropped away. */
  object-fit: contain;
  object-position: center;
}

/* ---- safety notice: one line, every job page ----------------- */
.nrh-safety {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 10px 14px;
  margin-bottom: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  font-size: 14.5px;
  color: #78350f;
}
.nrh-safety strong { color: #78350f; }

/* ---- expired notice ------------------------------------------ */
.nrh-expired {
  padding: 18px 20px;
  margin-bottom: 20px;
  background: var(--nrh-warn-bg);
  border: 1px solid var(--nrh-warn-line);
  border-left: 5px solid #b3261e;
  border-radius: var(--nrh-radius);
}
.nrh-expired h2 { margin: 0 0 6px; font-size: 1.15rem; color: var(--nrh-warn-ink); }
.nrh-expired p  { margin: 0; color: var(--nrh-warn-ink); font-size: 15px; }

/* ---- sticky mobile apply bar --------------------------------- */
.nrh-applybar { display: none; }
@media (max-width: 900px) {
  .nrh-applybar {
    position: sticky;
    bottom: 0;
    z-index: 30;
    display: flex;
    gap: 9px;
    align-items: center;
    padding: 11px 16px;
    background: rgba(255,255,255,.97);
    border-top: 1px solid var(--nrh-line);
    box-shadow: 0 -6px 20px -12px rgba(11,61,145,.35);
  }
  .nrh-applybar-title {
    flex: 1;
    min-width: 0;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--nrh-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ---- breadcrumbs ---------------------------------------------- */
.nrh-crumbs {
  padding-block: 12px;
  font-size: 14px;
  color: var(--nrh-ink-soft);
}
.nrh-crumbs span[aria-current] { color: var(--nrh-ink-muted); font-weight: 600; }

/* ---- pagination ------------------------------------------------ */
.nrh-pagination { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin: 22px 0; }
.nrh-pagination .page-numbers {
  min-width: 38px;
  padding: 8px 11px;
  text-align: center;
  background: var(--nrh-surface);
  border: 1px solid var(--nrh-line);
  border-radius: var(--nrh-radius-sm);
  font-weight: 700;
  text-decoration: none;
}
.nrh-pagination .page-numbers.current {
  background: var(--nrh-primary);
  border-color: var(--nrh-primary);
  color: #fff;
}

/* ---- widgets ---------------------------------------------------- */
.nrh-widget {
  background: var(--nrh-surface);
  border: 1px solid var(--nrh-line);
  border-radius: 13px;
  padding: 17px;
  margin-bottom: 14px;
}
.nrh-widget .widget-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--nrh-ink-soft);
  margin-bottom: 11px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---- small utilities used by templates ----------------------- */
.nrh-meta      { color: var(--nrh-ink-soft); font-size: 14.5px; margin: 0 0 8px; }
.nrh-block     { margin-top: 20px; }
.nrh-block-lg  { margin-top: 32px; }
.nrh-pad-page  { padding-block: 40px; }
.nrh-full      { width: 100%; }
.nrh-mb-xs     { margin-bottom: 7px; }
.nrh-card-title { font-size: 1.2rem; margin-top: 10px; }
.nrh-card-company { color: var(--nrh-secondary); font-weight: 600; margin: 0 0 7px; }
.nrh-card-meta { color: var(--nrh-ink-muted); font-size: 14px; margin: 0; }
.nrh-card-deadline { font-size: 14px; font-weight: 600; margin: 6px 0 0; color: #b45309; }
.nrh-card-deadline--closed { color: var(--nrh-warn-ink); }
.nrh-searchform { display: flex; gap: 8px; flex-wrap: wrap; }
.nrh-searchform input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 1px solid var(--nrh-line);
  border-radius: 9px;
  font-size: 16px;
  font-family: inherit;
}

/* ---- structural hooks used by templates ---------------------- */
.nrh-main         { display: block; min-height: 50vh; }
.nrh-sidebar,
.nrh-job-sidebar  { min-width: 0; }
.nrh-footer-col   { min-width: 0; }
.nrh-archive-desc { color: var(--nrh-ink-muted); max-width: 70ch; }

.nrh-footer-tagline {
  max-width: 62ch;
  margin: 26px 0 0;
  font-size: 15.5px;
  color: rgba(255,255,255,.88);
}
