/* Text colours meet WCAG AA 4.5:1: #7D868D on the #0B0D0F overlay (5.2:1), text-tertiary #6E6C66 on white (5.3:1).
   Sitewide search — Figma: Catalog — Search.
   .nav-search  magnifier in the primary nav, after the last text link
   .so-*        overlay below the nav (01 before typing · 02 typing · 03 no results)
   .sr-*        full results page /search (04) */

/* ---------------------------------------------------------------- nav button */
.nav-search {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 40px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--nav-text);
  cursor: pointer;
}
.nav-search svg {
  display: block;
  width: 18px;
  height: 18px;
}
.nav-search::after {
  content: '';
  height: 2px;
  width: 100%;
  background: transparent;
}
.nav-search:hover::after,
.nav-search.is-active::after {
  background: var(--teal-500);
}
.nav-primary__brand > .nav-search {
  align-self: flex-end;
}
@media (max-width: 1390px) {
  .nav-primary__brand {
    flex: 1;
  }
  .nav-primary__brand > .nav-search {
    align-self: center;
    margin-left: auto;
    height: auto;
    padding: 8px;
  }
  .nav-primary__brand > .nav-search::after {
    display: none;
  }
}

/* ---------------------------------------------------------------- overlay */
html.so-open {
  overflow: hidden;
}
.so {
  position: fixed;
  inset: 0;
  z-index: 39;
}
.so[hidden] {
  display: none;
}
.so__scrim {
  position: absolute;
  inset: 0;
  background: rgba(11, 13, 15, 0.55);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.so__panel {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--so-top, 138px);
  max-height: calc(100dvh - var(--so-top, 138px));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #0b0d0f;
  border-top: 1px solid #262d33;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  transform: translateY(-8px);
  opacity: 0;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease;
}
.so.is-in .so__scrim {
  opacity: 1;
}
.so.is-in .so__panel {
  transform: none;
  opacity: 1;
}
.so__inner {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 40px 0 56px;
}
@media (prefers-reduced-motion: reduce) {
  .so__scrim,
  .so__panel {
    transition: none;
  }
}

.so__field {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid #262d33;
  color: #f5f5f7;
}
.so__magnifier {
  flex: none;
  display: flex;
}
.so__input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  outline: none;
  font: inherit;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #f5f5f7;
  caret-color: var(--teal-500);
}
.so__input::placeholder {
  color: #7d868d;
}
.so__hint {
  flex: none;
  font-size: 13px;
  color: #7d868d;
  white-space: nowrap;
}
.so__hint[hidden] {
  display: none;
}
.so__clear {
  flex: none;
  display: flex;
  padding: 0;
  border: 0;
  background: none;
  color: #5a6268;
  cursor: pointer;
}
.so__clear:hover {
  color: #8a949c;
}
.so__clear[hidden] {
  display: none;
}

.so__state[hidden] {
  display: none;
}
.so__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}
.so__state--results.is-single .so__cols {
  grid-template-columns: 1fr;
}
.so__col {
  display: flex;
  flex-direction: column;
  gap: 36px;
  min-width: 0;
}
.so__col:empty {
  display: none;
}
.so-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 640px;
}
.so-group__label {
  margin: 0;
  padding: 0 0 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #8a949c;
}

.so-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 7px 12px;
  border-radius: 8px;
  color: #8a949c;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
}
.so-row__icon {
  flex: none;
  color: #8a949c;
}
.so-row__title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.so-row__title strong {
  font-weight: 600;
  color: #f5f5f7;
}
.so-row__meta {
  flex: none;
  font-size: 12px;
  font-weight: 400;
  color: #7d868d;
  white-space: nowrap;
}
.so-row:hover,
.so-row.is-active {
  background: rgba(255, 255, 255, 0.06);
  color: #f5f5f7;
}
.so-row:hover .so-row__icon,
.so-row.is-active .so-row__icon {
  color: var(--orange-500);
}
.so-row:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 0;
}
.so-row--thumb {
  align-items: center;
}
.so-row__thumb {
  flex: none;
  width: 32px;
  height: 40px;
  border-radius: 3px;
  background: #262d33;
  overflow: hidden;
}
.so-row__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.so-row__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.so-row--thumb .so-row__meta {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.so-empty {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 12px;
}
.so-empty__title {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  color: #f5f5f7;
}
.so-empty__text {
  margin: 0;
  font-size: 14px;
  color: #8a949c;
}
.so__state--empty {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.so__state--empty[hidden] {
  display: none;
}

.so__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid #262d33;
}
.so__foot[hidden] {
  display: none;
}
.so__all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #8a949c;
  text-decoration: none;
}
.so__all b {
  font-weight: 500;
  color: #f5f5f7;
}
.so__all:hover span {
  color: #f5f5f7;
}
.so__all kbd {
  padding: 3px 8px;
  border: 1px solid #5a6268;
  border-radius: 4px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  color: #8a949c;
}
.so__keys {
  margin-left: auto;
  font-size: 12px;
  color: #7d868d;
}

@media (max-width: 900px) {
  .so__cols {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .so__inner {
    gap: 24px;
    padding: 24px 0 32px;
  }
  .so__input {
    font-size: 22px;
  }
  .so__hint,
  .so__keys {
    display: none;
  }
  .so-row__meta {
    display: none;
  }
  .so-row--thumb .so-row__meta {
    display: block;
  }
}

/* ---------------------------------------------------------------- results page */
.sr__inner {
  padding: 64px 0 96px;
}
.sr-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 28px;
}
.sr-head .eyebrow {
  margin: 0;
}
.sr-field {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 760px;
  height: 60px;
  padding: 0 10px 0 20px;
  border: 1px solid #c9c7c1;
  border-radius: 6px;
  background: #fff;
  color: var(--pcli-color-text-primary);
  box-sizing: border-box;
}
.sr-field:focus-within {
  border-color: var(--pcli-color-border-focus);
  box-shadow: 0 0 0 3px rgba(0, 171, 199, 0.2);
}
.sr-field__icon {
  flex: none;
}
.sr-field__input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font: inherit;
  font-size: 20px;
  font-weight: 500;
  color: var(--pcli-color-text-primary);
}
.sr-field__input::placeholder {
  color: var(--pcli-color-text-tertiary);
}
.sr-field__clear {
  font-size: 13px;
  font-weight: 600;
  color: var(--pcli-color-text-tertiary);
  text-decoration: none;
}
.sr-field__clear:hover {
  color: var(--pcli-color-text-primary);
}
.sr-field__go {
  height: 40px;
  padding: 0 20px;
}
.sr-head__title {
  margin: 0;
  font-size: 40px;
  font-weight: 400;
  line-height: 48px;
  letter-spacing: -0.02em;
  color: var(--pcli-color-text-primary);
}
.sr-head__title strong {
  font-weight: 600;
}

.sr-tabs {
  display: flex;
  gap: 32px;
  border-bottom: 1px solid #e3e1dc;
  overflow-x: auto;
  scrollbar-width: none;
}
.sr-tabs::-webkit-scrollbar {
  display: none;
}
.sr-tab {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex: none;
  padding: 8px 4px 12px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--pcli-color-text-secondary);
  text-decoration: none;
  white-space: nowrap;
}
.sr-tab span {
  font-size: var(--fs-body-s);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--pcli-color-text-tertiary);
}
.sr-tab:hover {
  color: var(--pcli-color-text-primary);
}
.sr-tab.is-on {
  font-weight: 600;
  color: var(--pcli-color-text-primary);
  border-bottom-color: var(--pcli-color-accent-teal);
}

.sr-groups {
  display: flex;
  flex-direction: column;
  gap: 56px;
  padding-top: 48px;
}
.sr-group__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--pcli-color-text-primary);
}
.sr-group__title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--pcli-color-text-primary);
}
.sr-group__count {
  font-size: 14px;
  font-weight: 500;
  color: var(--pcli-color-text-tertiary);
}
.sr-group__more {
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--pcli-color-text-eyebrow);
  text-decoration: none;
}
.sr-group__more:hover {
  color: var(--orange-500);
}

.sr-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sr-result {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 0;
  border-bottom: 1px solid #e3e1dc;
}
.sr-result__crumb {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--pcli-color-text-tertiary);
}
.sr-result__title {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 28px;
  letter-spacing: -0.01em;
}
.sr-result__title a {
  color: var(--pcli-color-text-primary);
  text-decoration: none;
}
.sr-result__title a:hover {
  color: var(--orange-800);
}
.sr-result__title strong {
  font-weight: 600;
}
.sr-result__snippet {
  margin: 0;
  max-width: 840px;
  font-size: 15px;
  line-height: 24px;
  color: var(--pcli-color-text-secondary);
}
.sr-result__snippet strong {
  font-weight: 600;
  color: var(--pcli-color-text-primary);
}

.sr-empty {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
}
.sr-empty__text {
  margin: 0 0 20px;
  font-size: 16px;
  color: var(--pcli-color-text-secondary);
}
.sr-empty__label {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--pcli-color-text-tertiary);
}
.sr-empty__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sr-empty__links a {
  font-size: 16px;
  font-weight: 500;
  color: var(--pcli-color-text-primary);
  text-decoration: none;
}
.sr-empty__links a:hover {
  color: var(--orange-800);
}

@media (max-width: 720px) {
  .sr__inner {
    padding: 40px 0 64px;
  }
  .sr-head__title {
    font-size: 28px;
    line-height: 36px;
  }
  .sr-field {
    height: 52px;
  }
  .sr-field__input {
    font-size: 17px;
  }
  .sr-field__clear {
    display: none;
  }
  .sr-tabs {
    gap: 20px;
  }
  .sr-group__head {
    flex-wrap: wrap;
  }
}
