/* Kenya Watch v5.6 — desktop navigation fix.
 * Deliberately scoped to the shared header so v5.4 page layout is untouched.
 * Prevents legacy imported Elementor/Bootstrap or site CSS from stretching
 * the logo/navigation into a multi-row masthead on live WordPress.
 */
html body.kw-oc #page .kw-reference-header {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: max-content minmax(0, 1fr) !important;
  grid-template-rows: auto !important;
  align-items: center !important;
  justify-content: space-between !important;
  align-content: center !important;
  gap: clamp(24px, 3vw, 56px) !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 112px !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 18px clamp(22px, 3.2vw, 62px) !important;
  background: #fff !important;
  border-bottom: 1px solid #e9e9e9 !important;
  position: relative !important;
  float: none !important;
  clear: both !important;
  z-index: 999 !important;
}
html body.kw-oc #page .kw-reference-header > .kw-reference-logo {
  box-sizing: border-box !important;
  display: inline-block !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: start !important;
  align-self: center !important;
  width: max-content !important;
  max-width: none !important;
  height: auto !important;
  margin: 0 !important;
  flex: none !important;
  float: none !important;
  clear: none !important;
  font-size: clamp(36px, 2.9vw, 51px) !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
}
html body.kw-oc #page .kw-reference-header > .kw-reference-nav {
  box-sizing: border-box !important;
  display: flex !important;
  grid-column: 2 !important;
  grid-row: 1 !important;
  flex-flow: row nowrap !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  align-content: center !important;
  justify-content: flex-end !important;
  align-self: center !important;
  justify-self: stretch !important;
  gap: clamp(12px, 1.65vw, 30px) !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 44px !important;
  max-height: none !important;
  padding: 0 !important;
  margin: 0 !important;
  position: static !important;
  float: none !important;
  clear: none !important;
  overflow: visible !important;
  box-shadow: none !important;
  background: transparent !important;
}
html body.kw-oc #page .kw-reference-nav > a,
html body.kw-oc #page .kw-reference-nav > .kw-reference-dropdown {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  align-self: center !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  clear: none !important;
  position: relative !important;
  white-space: nowrap !important;
}
html body.kw-oc #page .kw-reference-nav > a,
html body.kw-oc #page .kw-reference-dropdown > button {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  min-height: 44px !important;
  height: auto !important;
  width: auto !important;
  margin: 0 !important;
  padding: 9px 0 !important;
  line-height: 1.3 !important;
  text-align: center !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
  text-transform: none !important;
  font-family: Inter, Arial, sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #141414 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
html body.kw-oc #page .kw-reference-dropdown > button { cursor: pointer !important; }
html body.kw-oc #page .kw-reference-nav > a:hover,
html body.kw-oc #page .kw-reference-dropdown > button:hover,
html body.kw-oc #page .kw-reference-nav > a[aria-current="page"] {color: #9f1f34 !important;}
html body.kw-oc #page .kw-reference-dropdown .kw-nav-chevron {
  display: inline-block !important;
  flex: 0 0 7px !important;
  width: 7px !important;
  height: 7px !important;
  padding: 0 !important;
  margin: -3px 1px 0 0 !important;
  border: 0 !important;
  border-right: 1.5px solid #818891 !important;
  border-bottom: 1.5px solid #818891 !important;
  transform: rotate(45deg) !important;
  position: static !important;
}
html body.kw-oc #page .kw-reference-dropdown > .kw-dropdown-list {
  display: none;
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  width: max-content !important;
  min-width: 240px !important;
  max-width: 310px !important;
  margin: 0 !important;
  background: #fff !important;
  box-shadow: 0 10px 25px rgba(0,0,0,.13) !important;
  text-align: left !important;
  z-index: 1001 !important;
}
html body.kw-oc #page .kw-reference-dropdown:hover > .kw-dropdown-list,
html body.kw-oc #page .kw-reference-dropdown:focus-within > .kw-dropdown-list,
html body.kw-oc #page .kw-reference-dropdown.is-open > .kw-dropdown-list {display: block !important;}
html body.kw-oc #page .kw-dropdown-list a {display: block !important; width: 100% !important; text-align: left !important; white-space: normal !important;}
html body.kw-oc #page .kw-reference-header > .kw-reference-menu-btn {display: none !important;}

/* Responsive breakpoint intentionally precedes the point at which navigation
 * could squeeze together: no desktop wrap and no duplicated menu row. */
/* Laptops are desktops too. Keep the whole menu until it genuinely runs out
 * of physical space; CSS breakpoints are affected by browser zoom. */
@media (min-width: 861px) and (max-width: 1250px) {
  html body.kw-oc #page .kw-reference-header {
    min-height: 88px !important;
    padding: 13px clamp(15px, 2.2vw, 27px) !important;
    gap: clamp(10px, 1.4vw, 19px) !important;
  }
  html body.kw-oc #page .kw-reference-header > .kw-reference-logo {
    font-size: clamp(31px, 3.15vw, 40px) !important;
    letter-spacing: -1.8px !important;
  }
  html body.kw-oc #page .kw-reference-header > .kw-reference-nav {
    gap: clamp(7px, 1.1vw, 15px) !important;
  }
  html body.kw-oc #page .kw-reference-nav > a,
  html body.kw-oc #page .kw-reference-dropdown > button {
    font-size: clamp(11.5px, 1.05vw, 13px) !important;
    letter-spacing: -.12px !important;
  }
}
/* Phones and genuinely narrow tablet viewports use the mobile menu. */
@media (max-width: 860px) {
  html body.kw-oc #page .kw-reference-header {
    grid-template-columns: minmax(0,1fr) auto !important;
    min-height: 82px !important;
    padding: 13px clamp(16px,3vw,30px) !important;
    gap: 16px !important;
  }
  html body.kw-oc #page .kw-reference-header > .kw-reference-logo {grid-column: 1 !important; font-size: clamp(31px,4vw,43px) !important;}
  html body.kw-oc #page .kw-reference-header > .kw-reference-menu-btn {
    display: inline-flex !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-items: center !important;
    justify-content: center !important;
    justify-self: end !important;
    align-self: center !important;
    gap: 8px !important;
    padding: 9px 12px !important;
    margin: 0 !important;
    border: 1px solid #d9dfe5 !important;
    background: #fff !important;
    color: #20232a !important;
    line-height: 1.2 !important;
    min-height: 42px !important;
    font-size: 14px !important;
    cursor: pointer !important;
  }
  html body.kw-oc #page .kw-reference-header > .kw-reference-nav {
    display: none !important;
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 100% !important;
    width: 100% !important;
    max-height: calc(100vh - 90px) !important;
    overflow-y: auto !important;
    flex-flow: column nowrap !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 12px clamp(16px,3vw,30px) 18px !important;
    background: #fff !important;
    box-shadow: 0 12px 24px rgba(0,0,0,.14) !important;
  }
  html body.kw-oc #page .kw-reference-header > .kw-reference-nav.is-open {display: flex !important;}
  html body.kw-oc #page .kw-reference-nav > a,
  html body.kw-oc #page .kw-reference-nav > .kw-reference-dropdown {display: block !important; width: 100% !important;}
  html body.kw-oc #page .kw-reference-nav > a,
  html body.kw-oc #page .kw-reference-dropdown > button {
    justify-content: space-between !important;
    text-align: left !important;
    width: 100% !important;
    padding: 10px 0 !important;
    font-size: 15px !important;
    min-height: 45px !important;
  }
  html body.kw-oc #page .kw-reference-dropdown > .kw-dropdown-list {
    position: static !important;
    min-width: 0 !important;
    max-width: none !important;
    width: 100% !important;
    padding: 0 0 8px 12px !important;
    box-shadow: none !important;
  }
}
@media (max-width: 390px) {
  html body.kw-oc #page .kw-reference-header > .kw-reference-logo {font-size: 29px !important;letter-spacing: -1.3px !important;}
  html body.kw-oc #page .kw-reference-header > .kw-reference-menu-btn {font-size: 13px !important; padding: 8px 9px !important;}
}
