/*
 * Fine-detail surface audit
 *
 * A search control is already made of an input and an action button.  Do not
 * put a second translucent card around it: that creates a visible duplicate
 * rim on light backgrounds, especially on narrow screens.
 */
body[data-page="knowledge"] .hero-shell .kb-search {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* All public landing-page search fields share one restrained boundary.  The
 * form itself stays transparent; only the editable field receives a line. */
body[data-page] .hero-search input[type="search"],
body[data-page] .hero-search-form input[type="search"],
body[data-page] .news-search input[type="search"],
body[data-page] .kb-search input[type="search"],
body[data-page] .banner-search input[type="search"] {
  border: 1px solid rgba(154, 193, 225, .52) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .88) !important;
}

body[data-page="knowledge"] .hero-shell .kb-search button {
  border: 1px solid transparent !important;
  box-shadow: 0 10px 22px rgba(0,172,235,.16) !important;
}

/* Category chips are controls, not a second panel.  This prevents the
 * shallow line below the group from reading as a separate container. */
body[data-page="knowledge"] #category-filters {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-page="knowledge"] #category-filters .filter-chip {
  background: rgba(255, 255, 255, .90) !important;
  border: 1px solid rgba(154, 205, 238, .62) !important;
  color: #0a4a63 !important;
  box-shadow: none !important;
}

body[data-page="knowledge"] #category-filters .filter-chip.active {
  background: #e6f7fd !important;
  border-color: #b8e6f5 !important;
  color: #0a4a63 !important;
  box-shadow: none !important;
}

/* Mobile knowledge search and category selection share one control group. */
body.mobile-page[data-page="knowledge"] .hero-shell .kb-search {
  grid-template-columns: minmax(0, 1fr) 96px !important;
  gap: 10px !important;
  margin-top: 10px !important;
}

body.mobile-page[data-page="knowledge"] #category-filters {
  display: none !important;
}

body.mobile-page[data-page="knowledge"] .knowledge-mobile-category {
  display: block !important;
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 0;
}

body.mobile-page[data-page="knowledge"] .knowledge-mobile-category select {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 32px 0 12px;
  border: 1px solid rgba(154, 205, 238, .62);
  border-radius: 12px;
  outline: 0;
  background: rgba(255, 255, 255, .90);
  color: #003b52;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

body.mobile-page[data-page="knowledge"] .term-card,
body.mobile-page[data-page="knowledge"] .term-title,
body.mobile-page[data-page="knowledge"] .term-card-content,
body.mobile-page[data-page="knowledge"] .term-card-content p,
body.mobile-page[data-page="knowledge"] .term-mechanism,
body.mobile-page[data-page="knowledge"] .term-context,
body.mobile-page[data-page="knowledge"] .term-note,
body.mobile-page[data-page="knowledge"] .term-source,
body.mobile-page[data-page="knowledge"] .term-title strong {
  min-width: 0 !important;
  max-width: 100% !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

body.mobile-page[data-page="knowledge"] .term-title strong {
  text-overflow: clip !important;
}

body.mobile-page[data-page="knowledge"] #category-filters .filter-chip {
  flex: 0 0 auto !important;
  height: 28px !important;
  padding: 0 9px !important;
  font-size: 11px !important;
  white-space: nowrap !important;
}

/* Shared accessibility primitives for visitor-facing pages. These rules add
 * semantics and usable hit areas without changing the established glass UI. */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 10000;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border: 1px solid rgba(0,172,235,.48);
  border-radius: 10px;
  background: #fff;
  color: #00557a;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(31, 65, 101, .18);
  transform: translateY(calc(-100% - 16px));
  transition: transform .15s ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

body[data-page] :where(a[href], button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid #0087b3 !important;
  outline-offset: 2px !important;
}

body[data-page] .hero-search input:focus-visible,
body[data-page] .hero-search-form input:focus-visible,
body[data-page] .news-search input:focus-visible,
body[data-page] .kb-search input:focus-visible {
  outline: 3px solid #0087b3 !important;
  outline-offset: 2px !important;
  border-color: rgba(37, 132, 221, .72) !important;
  box-shadow: 0 0 0 4px rgba(37, 132, 221, .14) !important;
}

body.mobile-page[data-page="home"] .hero-search input:focus-visible,
body.mobile-page .nav-menu a:focus-visible,
body.mobile-page .tools-nav-menu a:focus-visible {
  outline: 3px solid #0087b3 !important;
  outline-offset: 2px !important;
}

@media (max-width: 768px), (pointer: coarse) {
  body.mobile-page .nav-menu a,
  body.mobile-page .tools-nav-menu a,
  body.mobile-page .search-result-tabs button,
  body.mobile-page .search-suggest-item,
  body.mobile-page .live-section-link,
  body.mobile-page .search-result-meta a {
    min-height: 44px !important;
  }

  body.mobile-page .nav-menu a,
  body.mobile-page .tools-nav-menu a,
  body.mobile-page .live-section-link,
  body.mobile-page .search-result-meta a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body.mobile-page .search-result-tabs button {
    height: 44px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skip-link,
  body[data-page] :where(a[href], button, input, select, textarea, [tabindex]) {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  body[data-page] :where(a[href], button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid Highlight !important;
  }
}

/* Unified soft focus treatment for text-entry controls. */
body[data-page] :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea):focus {
  outline: none !important;
  border-color: rgba(82, 142, 200, .42) !important;
  box-shadow: 0 0 0 2px rgba(82, 142, 200, .08) !important;
}

body[data-page] :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea):focus-visible {
  outline: none !important;
}
/* Final specificity pass: soften legacy field-specific focus selectors. */
body[data-page] .hero-search input:focus,
body[data-page] .hero-search-form input:focus,
body[data-page] .news-search input:focus,
body[data-page] .kb-search input:focus,
body[data-page] .banner-search input:focus,
body[data-page] .hero-search input:focus-visible,
body[data-page] .hero-search-form input:focus-visible,
body[data-page] .news-search input:focus-visible,
body[data-page] .kb-search input:focus-visible,
body[data-page] .banner-search input:focus-visible,
body.mobile-page[data-page="home"] .hero-search input:focus,
body.mobile-page[data-page="home"] .hero-search input:focus-visible {
  outline: none !important;
  outline-offset: 0 !important;
  border-color: rgba(82, 142, 200, .42) !important;
  box-shadow: 0 0 0 2px rgba(82, 142, 200, .08) !important;
}