/* HTS Pathway Maps */

.hts-pm {
  --hts-pm-junior: #424e3d;
  --hts-pm-stage1: #819175;
  --hts-pm-stage2: #f2587d;
  --hts-pm-text: #fff;
  --hts-pm-muted: #6b7266;
  --hts-pm-gap-x: clamp(1.75rem, 3.5vw, 3rem);
  --hts-pm-track: 1.8rem;
  --hts-pm-min-width: 780px;
  margin: 0 0 3.5rem;
}

.hts-pm__title {
  margin: 0 0 1rem;
  padding: 0;
  font-weight: normal;
  font-size: 26px;
}

.hts-pm__hint {
  display: none;
  margin: 0 0 0.5rem;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--hts-pm-muted);
}

.hts-pm__scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
}

.hts-pm__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: minmax(var(--hts-pm-track), auto);
  column-gap: var(--hts-pm-gap-x);
  min-width: var(--hts-pm-min-width);
}

.hts-pm__arrows {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}

.hts-pm__arrow {
  fill: none;
  stroke-width: 2;
}

.hts-pm__arrow--junior {
  stroke: var(--hts-pm-junior);
}
.hts-pm__arrow--stage1 {
  stroke: var(--hts-pm-stage1);
}
.hts-pm__arrow--stage2 {
  stroke: var(--hts-pm-stage2);
}
.hts-pm__head--junior {
  fill: var(--hts-pm-junior);
}
.hts-pm__head--stage1 {
  fill: var(--hts-pm-stage1);
}
.hts-pm__head--stage2 {
  fill: var(--hts-pm-stage2);
}

.hts-pm__year {
  grid-row: 1;
  align-self: end;
  padding: 0 0 0.75rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hts-pm-muted);
}

.hts-pm__year small {
  display: block;
  font-size: inherit;
  font-weight: 400;
}

.hts-pm__node {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  margin: 0.375rem 0;
}

/* Extra specificity so Divi module link colours don't win. */
.hts-pm .hts-pm__grid .hts-pm__box {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0.6em 0.7em;
  background: var(--hts-pm-junior);
  color: var(--hts-pm-text);
  font-size: 0.9375rem;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  overflow-wrap: break-word;
  transition:
    filter 0.15s ease,
    box-shadow 0.15s ease;
}

.hts-pm .hts-pm__node[data-stage="stage1"] .hts-pm__box {
  background: var(--hts-pm-stage1);
}
.hts-pm .hts-pm__node[data-stage="stage2"] .hts-pm__box {
  background: var(--hts-pm-stage2);
}

.hts-pm .hts-pm__grid a.hts-pm__box:hover {
  filter: brightness(1.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.hts-pm .hts-pm__grid a.hts-pm__box:focus-visible {
  outline: 3px solid #1d1d1b;
  outline-offset: 2px;
}

.hts-pm__sub {
  display: block;
  margin-top: 0.15em;
  font-size: 0.8em;
}

.hts-pm__sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.hts-pm__map-footer {
  padding-block: 40px 20px;
  font-size: 15px;
}

.hts-pm__key,
.hts-pm__key div {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.hts-pm__key div {
  gap: 0.6rem;
  font-size: 15px;
}

.hts-pm__key div span {
  width: 2rem;
  height: 2rem;
  background-color: #424e3d;
}

.hts-pm__key div:nth-child(2) span {
  background-color: #6b7266;
}

.hts-pm__key div:last-of-type span {
  background-color: #f2587d;
}

@media (max-width: 860px) {
  .hts-pm {
    --hts-pm-gap-x: 1.75rem;
  }

  .hts-pm .hts-pm__grid .hts-pm__box {
    font-size: 0.8125rem;
    padding: 0.5em 0.45em;
  }
}

.hts-pm.is-scrollable .hts-pm__hint {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .hts-pm .hts-pm__grid .hts-pm__box {
    transition: none;
  }
}
