.native-site-search-trigger {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--deep);
  cursor: pointer;
}

.native-site-search-trigger:hover {
  border-color: var(--line);
  background: var(--accent-soft);
}

.native-site-search-icon {
  position: relative;
  width: 13px;
  height: 13px;
  margin: -3px 3px 0 0;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.native-site-search-icon::after {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 7px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  content: '';
  transform: rotate(45deg);
  transform-origin: left center;
}

.native-site-search {
  width: min(40rem, calc(100% - 24px));
  max-height: min(38rem, calc(100dvh - 28px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 18px 55px #16272433;
}

.native-site-search[open] {
  display: flex;
  flex-direction: column;
}

.native-site-search::backdrop {
  background: #202a2680;
}

.native-site-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 9px;
}

.native-site-search-header h2 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.3;
}

.native-site-search-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--deep);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.native-site-search-field {
  padding: 0 18px 14px;
  border-bottom: 1px solid var(--line);
}

.native-site-search-field input {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}

.native-site-search-field input:focus-visible {
  outline-offset: 2px;
}

.native-site-search-empty {
  margin: 15px 18px;
  color: var(--muted);
  font-size: .92rem;
}

.native-site-search-results {
  margin: 0;
  padding: 7px 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}

.native-site-search-results:empty {
  padding: 0;
}

.native-site-search-results a {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border-radius: 5px;
  font-size: .92rem;
  line-height: 1.4;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.native-site-search-results a:is(:hover, :focus-visible) {
  background: var(--accent-soft);
  color: var(--ink);
}

.native-site-search-results a:focus-visible {
  outline-offset: -2px;
}

.native-site-search-results small {
  color: var(--muted);
  font-size: .77rem;
}
