.global-search-open { overflow: hidden; }
.global-search {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 0;
  background: #070b12;
  color: #f3f7fc;
  font-family: Inter, Arial, sans-serif;
  overflow: hidden;
}
.global-search::backdrop { background: rgb(0 0 0 / 85%); }
.global-search__shell { display: flex; flex-direction: column; height: 100%; }
.global-search__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5.2rem;
  border-bottom: 1px solid #25354a;
  padding: 0 2rem;
}
.global-search__header h2 { margin: 0; font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 600; }
.global-search__close {
  width: 2.75rem; height: 2.75rem; border: 1px solid transparent; border-radius: 0.5rem;
  background: transparent; color: #e6eef7; font-size: 2rem; line-height: 1; cursor: pointer;
}
.global-search__close:hover { border-color: #41c9eb; color: #73dafa; }
.global-search__content { display: flex; flex: 1; flex-direction: column; min-height: 0; width: min(100% - 3rem, 78rem); margin: 0 auto; padding: 2rem 0 1rem; }
.global-search__controls { display: flex; align-items: stretch; gap: 0.75rem; }
.global-search__input-wrap {
  display: flex; flex: 1; align-items: center; min-width: 0; height: 3.7rem;
  border: 1px solid #4f7590; border-radius: 0.8rem; background: #101926;
}
.global-search__input-wrap:focus-within { border-color: #59d8fa; box-shadow: 0 0 0 3px rgb(65 201 235 / 18%); }
.global-search__input-wrap svg { width: 1.25rem; height: 1.25rem; margin: 0 1rem; fill: none; stroke: #80dff5; stroke-width: 2; }
.global-search input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
  color: #f3f7fc; font: inherit; font-size: 1.1rem;
}
.global-search input::placeholder { color: #91a0b2; }
.global-search__filter-wrap { position: relative; }
.global-search__filter {
  min-width: 8.4rem; height: 3.7rem; border: 1px solid #3e637d; border-radius: 0.8rem;
  padding: 0 1rem; background: #121e2d; color: #dcecf6; font: inherit; cursor: pointer;
}
.global-search__filter:hover, .global-search__filter[aria-expanded=true] { border-color: #5bd1ef; background: #1a3343; }
.global-search__filter-options {
  position: absolute; z-index: 1; right: 0; top: calc(100% + 0.45rem); width: 11rem;
  border: 1px solid #3e637d; border-radius: 0.7rem; padding: 0.35rem; background: #121e2d;
  box-shadow: 0 1rem 2rem rgb(0 0 0 / 45%);
}
.global-search__filter-options[hidden] { display: none; }
.global-search__filter-options button {
  display: block; width: 100%; min-height: 2.65rem; border: 0; border-radius: 0.4rem;
  padding: 0.5rem 0.75rem; background: transparent; color: #dcecf6; font: inherit;
  text-align: left; cursor: pointer;
}
.global-search__filter-options button:hover, .global-search__filter-options button[aria-pressed=true] { background: #244058; color: #83e5fa; }
.global-search__results-head { display: flex; justify-content: space-between; margin: 2rem 0 0.85rem; color: #b9d8e8; font-size: 0.9rem; }
.global-search__results { display: grid; grid-auto-rows: max-content; align-content: start; flex: 1; gap: 0.65rem; min-height: 0; overflow-y: auto; padding: 0.2rem 0.1rem 1rem; }
.global-search__result {
  display: grid; grid-auto-rows: max-content; align-content: start; gap: 0.18rem; min-height: 5.6rem; border: 1px solid #253d53;
  border-radius: 0.75rem; padding: 0.85rem 1.1rem; background: #101a28;
  color: #f3f7fc; text-decoration: none; overflow-wrap: anywhere;
}
.global-search__result:hover, .global-search__result:focus-visible { border-color: #52cfef; background: #172b3e; transform: translateY(-1px); }
.global-search__result strong { font-size: 1.05rem; }
.global-search__type { color: #66d7f2; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.global-search__context { color: #a4bfce; font-size: 0.83rem; }
.global-search__description { color: #b7c3d0; font-size: 0.87rem; line-height: 1.45; }
.global-search__message { padding: 4rem 1rem; color: #d9e7f0; text-align: center; }
.global-search__message strong { font-size: 1.2rem; }
.global-search__message p { margin: 0.5rem 0 0; color: #9cadbd; }
.global-search button:focus-visible, .global-search a:focus-visible { outline: 3px solid #85e8fc; outline-offset: 2px; }
@media (max-width: 700px) {
  .global-search__header { min-height: 4.3rem; padding: 0 1rem; }
  .global-search__content { width: calc(100% - 2rem); padding-top: 1.25rem; }
  .global-search__controls { gap: 0.5rem; }
  .global-search__input-wrap, .global-search__filter { height: 3.3rem; }
  .global-search__input-wrap svg { margin: 0 0.6rem; }
  .global-search input { font-size: 0.95rem; }
  .global-search__filter { min-width: 5rem; padding: 0 0.5rem; font-size: 0.8rem; }
}
@media (prefers-reduced-motion: reduce) { .global-search__result:hover { transform: none; } }
