/**
 * Align the home hero, navigation and all shared site header rows with the
 * 1600px / 94% archive shell. Keep desktop categories visible without scrolling.
 */
body.home .thf-discovery-home .thf-discovery-shell {
  width: min(94%, 1600px) !important;
  max-width: 1600px !important;
  margin-inline: auto !important;
}
body #page-container header.et-l--header .et_pb_row_0_tb_header,
body #page-container header.et-l--header .et_pb_row_2_tb_header {
  width: min(94%, 1600px) !important;
  max-width: 1600px !important;
  box-sizing: border-box;
}
body #page-container header.et-l--header .et_pb_row_2_tb_header {
  height: auto !important;
  max-height: none !important;
  padding-block: 0 !important;
}
@media (min-width: 981px) {
  /* These selectors also outrank the homepage's old 1280px !important rules. */
  body.home #page-container header.et-l--header .et_pb_row_0_tb_header,
  body.home #page-container header.et-l--header .et_pb_row_2_tb_header {
    width: min(94%, 1600px) !important;
    max-width: 1600px !important;
  }
  body #page-container header.et-l--header .et_pb_row_2_tb_header ul.categories,
  body.home #page-container header.et-l--header .et_pb_row_2_tb_header ul.categories {
    display: flex !important;
    flex-flow: row wrap !important;
    direction: ltr !important;
    align-items: center !important;
    justify-content: space-between !important;
    align-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    gap: 0 clamp(8px, .8vw, 15px) !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    scrollbar-width: none;
  }
  body #page-container header.et-l--header .et_pb_row_2_tb_header ul.categories > li {
    flex: 0 0 auto !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
  }
  body #page-container header.et-l--header .et_pb_row_2_tb_header ul.categories > li > a,
  body.home #page-container header.et-l--header .et_pb_row_2_tb_header ul.categories > li > a {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: clamp(10px, .69vw, 11.5px) !important;
    line-height: 1.3 !important;
    padding: 10px 0 !important;
  }
}
/* On narrower desktops, wrapped items retain comfortable, even gaps. */
@media (min-width: 981px) and (max-width: 1370px) {
  body #page-container header.et-l--header .et_pb_row_2_tb_header ul.categories,
  body.home #page-container header.et-l--header .et_pb_row_2_tb_header ul.categories {
    justify-content: flex-start !important;
    gap: 0 14px !important;
  }
}

/* Tablets get full access through tidy rows instead of a clipped rail. */
@media (min-width: 641px) and (max-width: 980px) {
  body #page-container header.et-l--header .et_pb_row_2_tb_header ul.categories,
  body.home #page-container header.et-l--header .et_pb_row_2_tb_header ul.categories {
    display: flex !important;
    flex-flow: row wrap !important;
    align-items: center;
    align-content: center;
    justify-content: flex-start !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    gap: 0 17px !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  body #page-container header.et-l--header .et_pb_row_2_tb_header ul.categories > li > a {
    min-height: 35px;
    padding: 7px 0 !important;
    gap: 6px !important;
    font-size: 11px !important;
  }
}
/* Phones keep compact, touch-friendly horizontal navigation. */
@media (max-width: 640px) {
  body.home .thf-discovery-home .thf-discovery-shell {
    width: calc(100% - 32px) !important;
  }
  body #page-container header.et-l--header .et_pb_row_0_tb_header,
  body #page-container header.et-l--header .et_pb_row_2_tb_header {
    width: calc(100% - 32px) !important;
    max-width: none !important;
  }
  body #page-container header.et-l--header .et_pb_row_2_tb_header ul.categories {
    max-width: 100%;
    min-height: 44px;
  }
}