/* The dark Resources hero uses static ice-white typography for maximum clarity. */
body:has(.resources-hero) .resources-hero h1 {
  position: relative;
  display: block;
  color: #f7f8ff;
  background: none;
  -webkit-text-fill-color: currentColor;
  font-family: "Inter", "Avenir Next", "Segoe UI", sans-serif;
  font-weight: 780;
  font-variation-settings: "wght" 780;
  font-feature-settings: "ss01" 1, "cv05" 1, "cv11" 1;
  line-height: 1.12;
  padding: .04em 0 .14em;
  overflow: visible;
  text-shadow: none;
  filter: drop-shadow(0 16px 28px rgba(9, 5, 38, .22));
  isolation: isolate;
  animation: none;
}

/* Focused resource search: dim the full page, including the sticky header, without blur. */
body:has(.resources-hero) .resource-search { z-index: 1001; }
body:has(.resources-hero):has(.resource-search:focus-within)::after {
  z-index: 1000;
  background: rgba(4, 8, 19, .82);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* Resource areas lead the search and use a consistent premium outline icon set. */
body:has(.resources-hero) .filter-row {
  margin-top: 0;
  margin-bottom: 12px;
}

body:has(.resources-hero) .filter-button,
body:has(.resources-hero) .filter-row > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

body:has(.resources-hero) .filter-icon {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(105, 135, 191, .22);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(230, 238, 253, .9));
  color: #174c9e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 3px 8px rgba(35, 73, 133, .08);
}

body:has(.resources-hero) .filter-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body:has(.resources-hero) .filter-button.selected .filter-icon,
body:has(.resources-hero) .filter-row > a:first-child .filter-icon {
  border-color: rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 3px 9px rgba(0, 0, 0, .12);
}

@media (max-width: 680px) {
  body:has(.resources-hero) .filter-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
    margin-right: 0;
    margin-left: 0;
    padding: 6px;
    border-radius: 16px;
  }

  body:has(.resources-hero) .filter-button,
  body:has(.resources-hero) .filter-row > a {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0 10px;
    justify-content: flex-start;
  }

  body:has(.resources-hero) .filter-icon {
    width: 22px;
    height: 22px;
    border-radius: 7px;
  }

  body:has(.resources-hero) .filter-icon svg {
    width: 13px;
    height: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body:has(.resources-hero) .resources-hero h1 {
    animation: none;
  }
}
