/* Prefer normal word boundaries, then wrap long URLs within their text column. */
section.section-content :is(main, .section-text, .card-body, .list-group-item) a:not(.btn) {
  overflow-wrap: anywhere;
}

/* Preserve the original heading margins when body sections are nested semantically.
   Inline margins and the existing !important spacing utilities still take priority. */
[data-heading-original-level="1"] { margin-top: .67em; }
[data-heading-original-level="2"] { margin-top: .83em; }
[data-heading-original-level="3"] { margin-top: 1em; }
[data-heading-original-level="4"] { margin-top: 1.33em; }
[data-heading-original-level="5"] { margin-top: 1.67em; }
[data-heading-original-level="6"] { margin-top: 2.33em; }

/* Profile contact links underline their text, including each wrapped line. */
.profile-contact-list a,
.profile-contact-list a:hover,
.profile-contact-list a:focus {
  border-bottom: 0;
  text-decoration-line: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: .15em;
  text-decoration-skip-ink: auto;
}

/* Keep News search close to the heading and breadcrumb trail. */
.template-wacdnews #hero .container.main {
  padding-bottom: .5rem;
}

/* The hero's desktop row cancels its container gutter; match it in the grid. */
@media (min-width: 768px) {
  .template-wacdnews main.news-grid > .container {
    padding-right: 0;
    padding-left: 0;
  }
}

/* Match control heights and keep entered/placeholder text above WCAG AA contrast. */
.template-wacdnews .news-search-form .form-control,
.template-wacdnews .news-search-form button[type="submit"] {
  height: calc(2.25rem + 2px);
}

.template-wacdnews .news-search-form button[type="submit"] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.template-wacdnews .news-search-form .form-control {
  color: #212529;
  background-color: #fff;
}

.template-wacdnews .news-search-form .form-control::placeholder {
  color: #595959;
  opacity: 1;
}
