/* Civil Service Jobs search layout, informed by the operative UK service
 * and its archived page fixtures. GOV.UK Frontend remains the component and
 * typography source; these rules are confined to the recruitment workflow.
 */
.csj-home { max-width: 960px; }
.csj-search-form {
  background-color: #dee0e2;
  padding: 16px 16px 8px;
  margin: 30px 0 24px;
}
.csj-search-form .govuk-form-group { margin-bottom: 10px; }
@media (min-width: 40.0625em) {
  .csj-search-form .govuk-grid-row > .govuk-grid-column-one-third:nth-child(-n+2) { width: 38.75%; }
  .csj-search-form .govuk-grid-row > .govuk-grid-column-one-third:last-child { width: 22.5%; }
}
.csj-search-form .govuk-hint { min-height: 45px; }
.csj-search-button { padding-top: 48px; }
.csj-search-button .govuk-button { width: 100%; margin-bottom: 0; }
.csj-advanced-link { text-align: right; margin: 12px 0 0; }
.csj-result-layout { margin-top: 18px; }
.csj-filters {
  border-right: 4px solid #1d70b8;
  padding-right: 16px;
  margin-right: 12px;
}
.csj-filters .govuk-form-group { margin-bottom: 18px; }
.csj-filters .govuk-select { max-width: 100%; }
.csj-sort {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid #b1b4b6;
  padding-bottom: 12px;
}
.csj-sort .govuk-form-group, .csj-sort .govuk-button { margin-bottom: 0; }
.csj-results-list { border-top: 1px solid #b1b4b6; margin-top: 18px; }
.csj-result {
  border-bottom: 1px solid #b1b4b6;
  padding: 15px 0;
  margin-bottom: 0;
}
.csj-result h2 { margin-bottom: 6px; }
.csj-result p { margin-bottom: 6px; }
.csj-vacancy-layout { margin-top: 34px; }
.csj-vacancy-facts {
  background: #dee0e2;
  padding: 15px;
  margin-bottom: 28px;
}
.csj-vacancy-facts dl { margin: 0; }
.csj-vacancy-facts dt { font-weight: 700; margin: 0 0 4px; }
.csj-vacancy-facts dd { margin: 0 0 16px; overflow-wrap: anywhere; }
.csj-vacancy-facts dd:last-child { margin-bottom: 0; }
.csj-contents { margin-bottom: 26px; }
.csj-contents li { margin-bottom: 5px; }
.csj-vacancy article section { margin-bottom: 34px; }
.csj-preserve-lines { white-space: pre-line; }
@media (max-width: 40.0525em) {
  .csj-search-form .govuk-hint { min-height: 0; }
  .csj-search-button { padding-top: 0; }
  .csj-search-button .govuk-button { width: 100%; }
  .csj-filters { border-right: 0; border-bottom: 4px solid #1d70b8; padding-bottom: 15px; margin: 0 0 24px; }
}

/* Civil Service Jobs uses the GOV.UK Frontend native generic header, phase
   banner and footer components. GOV.UH brand artwork is served by the
   authoritative GOV.UH brand route, not copied into recruitment code. */
.csj-site-header {
  background: #0b0c0c;
  border-bottom: 0;
}
.csj-site-header__layout {
  display: flex;
  align-items: center;
  gap: 118px;
  min-height: 76px;
  border-bottom: 8px solid #1d70b8;
  box-sizing: border-box;
}
.csj-site-header .govuk-generic-header {
  border: 0;
  flex: 0 0 auto;
}
.csj-site-header .govuk-generic-header__container {
  width: auto;
  padding: 0;
  margin: 0;
}
.csj-site-header .govuk-generic-header__logo { margin: 0; }
.csj-site-header .govuk-generic-header__homepage-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
  padding: 0;
}
.csj-govuh-brand-logo {
  display: block;
  width: 162px;
  height: 30px;
  filter: brightness(0) invert(1);
}
.csj-service-name {
  display: inline-block;
  font-family: "GDS Transport", arial, sans-serif;
  color: #fff;
  font-size: 30px;
  line-height: 1.25;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.csj-site-header .govuk-generic-header__homepage-link:focus,
.csj-site-header .csj-service-name:focus {
  color: #0b0c0c;
  background: #ffdd00;
  outline: 3px solid #ffdd00;
  box-shadow: 0 3px #0b0c0c;
}
.csj-site-header .govuk-generic-header__homepage-link:hover,
.csj-site-header .csj-service-name:hover { text-decoration: underline; }
.csj-site-identity .govuk-phase-banner { border-bottom: 0; padding-bottom: 8px; }
.csj-site-identity .govuk-phase-banner__content__tag {
  background: #1d70b8;
  color: #fff;
  font-weight: 700;
  border-radius: 0;
}
.csj-utility-nav { border-bottom: 0; padding-top: 15px; padding-bottom: 12px; }
.csj-utility-nav ul {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px;
  list-style: none; padding: 0; margin: 0;
}
.csj-utility-nav .govuk-link { font-size: 16px; }
/* The Civil Service Jobs footer follows the UK service's legacy grey
   GOV.UK component layout. The official UH arms replace only the crest. */
.csj-site-footer {
  margin-top: 48px;
  padding-top: 34px;
  padding-bottom: 25px;
  border-top: 1px solid #b1b4b6;
  background: #dee0e2;
  color: #454a4c;
  font-size: 16px;
  line-height: 1.25;
}
.csj-site-footer .govuk-footer__meta {
  align-items: flex-end;
}
.csj-site-footer .govuk-footer__meta-item:last-child {
  flex: 0 0 125px;
}
.csj-site-footer .govuk-footer__inline-list {
  margin-bottom: 0;
}
.csj-site-footer .govuk-footer__inline-list-item {
  margin-right: 15px;
  margin-bottom: 5px;
}
.csj-site-footer .govuk-footer__meta-custom {
  margin: 0 0 12px;
}
.csj-site-footer .govuk-footer__licence-description {
  display: inline;
  text-wrap: initial;
}
.csj-site-footer .govuk-footer__link:link,
.csj-site-footer .govuk-footer__link:visited {
  color: #454a4c;
}
.csj-site-footer .govuk-footer__link:hover {
  color: #0b0c0c;
}
.csj-site-footer .govuk-footer__copyright-logo {
  min-width: 125px;
  width: 125px;
  max-width: 125px;
  white-space: nowrap;
  background: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  text-align: center;
  gap: 5px;
  font-size: 14px;
  line-height: 1.25;
}
/* GOV.UK Frontend inserts its own 112px crest pseudo-element by default.
   Do not leave that empty space above the separate UH arms image. */
.csj-site-footer .govuk-footer__copyright-logo::before {
  content: none;
  display: none;
}
.csj-uh-government-arms {
  display: block;
  width: 162px;
  height: 118px;
  object-fit: cover;
  object-position: center;
  opacity: 0.55;
}
@media (max-width: 40.0525em) {
  .csj-site-footer { padding-top: 25px; }
  .csj-site-footer .govuk-footer__meta { align-items: flex-start; }
  .csj-site-footer .govuk-footer__meta-item:last-child { flex: 0 0 auto; }
  .csj-site-footer .govuk-footer__copyright-logo {
    min-width: 125px;
    width: auto;
    max-width: none;
    white-space: normal;
    align-items: flex-start;
    text-align: left;
  }
  .csj-site-header__layout { flex-wrap: wrap; gap: 6px 20px; padding-top: 12px; padding-bottom: 10px; }
  .csj-govuh-brand-logo { width: 144px; height: auto; }
  .csj-service-name { font-size: 24px; white-space: normal; }
  
  .csj-utility-nav ul { justify-content: flex-start; }
}
