/* Test-only article grids; the hero carousel and shared styles are unchanged. */
#main-content.insights-layout-test {
  width: 100%;
  max-width: none;
  padding-inline: clamp(1rem, 3vw, 3rem);
}

#main-content.insights-layout-test > .container-fluid {
  width: 100%;
  max-width: none;
  padding-inline: 0;
}

#main-content.insights-layout-test > .container-fluid > .row {
  --bs-gutter-x: 0;
}

#western-source-content .insights-pagination-test__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem 1.5rem;
}

#western-source-content .insights-pagination-test__grid > .card {
  width: 100%;
  min-width: 0;
  margin: 0;
}

#western-source-content .insights-pagination-test__grid > .card > div {
  height: 100%;
}

/* Match the production article titles without changing other card headings. */
#western-source-content .insights-pagination-test__grid > .card .card-body > h1.card-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  min-height: 2.4em;
  max-height: 2.4em;
}

#western-source-content .insights-pagination-test [hidden] {
  display: none !important;
}

/* Retain the original carousel cards' outlined article-button appearance. */
#western-source-content .insights-pagination-test .card a.btn.btn-primary {
  background-color: #fff;
  border: 1px solid #0579b8;
  box-shadow: none;
  color: #0579b8;
}

#western-source-content .insights-pagination-test .card a.btn.btn-primary:hover,
#western-source-content .insights-pagination-test .card a.btn.btn-primary:focus-visible {
  background-color: #0579b8;
  color: #fff;
}

#western-source-content .insights-pagination-test__pages {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

#western-source-content .insights-pagination-test__pages button {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #0579b8;
  border-radius: 0.25rem;
  background: #fff;
  color: #0579b8;
  font: inherit;
  transition: background-color 0.15s ease, color 0.15s ease;
}

#western-source-content .insights-pagination-test__pages button[aria-current="page"],
#western-source-content .insights-pagination-test__pages button:enabled:hover,
#western-source-content .insights-pagination-test__pages button:focus-visible {
  background: #0579b8;
  color: #fff;
}

#western-source-content .insights-pagination-test__pages button:focus-visible {
  outline: 3px solid #050f22;
  outline-offset: 2px;
}

#western-source-content .insights-pagination-test__pages button:disabled {
  border-color: #767676;
  color: #666;
  cursor: default;
}

@media (min-width: 576px) {
  #western-source-content .insights-pagination-test__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  #western-source-content .insights-pagination-test__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  #western-source-content .insights-pagination-test__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  #western-source-content .insights-pagination-test__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Live article search, confined to the Insights test page. */
.insights-search-test {
  margin-bottom: 1.5rem;
}

.insights-search-test .insights-search-test__label {
  display: block;
  text-align: center;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.insights-search-test .insights-search-test__input {
  display: block;
  margin-inline: auto;
  box-sizing: border-box;
  width: 100%;
  max-width: 36rem;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #767676;
  border-radius: 0.25rem;
  background: #fff;
  color: #050f22;
  font: inherit;
}

.insights-search-test .insights-search-test__input:focus-visible {
  outline: 3px solid #0579b8;
  outline-offset: 2px;
}

#western-source-content .insights-search-test__results-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 1.5rem;
  margin-bottom: 1.5rem;
}

#western-source-content .insights-search-test__results .insights-search-test__status {
  margin: 0;
  padding: 0.5rem 0.875rem;
  max-width: 100%;
  background-color: #41454e;
  color: #fff;
  border-radius: 0.125rem;
  overflow-wrap: anywhere;
}

.insights-search-test .insights-search-test__divider {
  margin: 1.5rem 0;
  border: 0;
  border-top: 1px solid #767676;
  opacity: 0.5;
}

#western-source-content .insights-search-test__heading {
  margin: 0;
  padding: 0;
}

#western-source-content > .tab-pane[hidden],
#western-source-content > .insights-search-test__results[hidden],
#western-source-content .insights-search-test__results [hidden] {
  display: none !important;
}

#western-source-content .insights-search-test__categories {
  display: block;
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #444;
  -webkit-line-clamp: unset;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}


/* Keyboard-accessible skip link */
.insights-test-skip-link {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2000;
  display: inline-block;
  max-width: calc(100vw - 2rem);
  padding: 0.75rem 1rem;
  border: 2px solid #fff;
  border-radius: 0.25rem;
  background-color: #050f22;
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  overflow-wrap: anywhere;
  transform: translateY(calc(-100% - 1rem));
}

.insights-test-skip-link:focus {
  transform: translateY(0);
}

.insights-test-skip-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #050f22;
}
