:focus {
  outline: none;
  box-shadow: 0 0 var(--accent);
}

:not(input):focus-visible {
  box-shadow: 0 0 0 2px var(--accent);
}

* {
  box-sizing: border-box;
  border: none;
  padding: 0;
  color: inherit;
  background: transparent;
}

:not(h1, h2, h3, h4, h5, h6, i) {
  font-size: inherit;
}

html, body {
  margin: 0;
  height: 100%;
  color-scheme: dark;
  background: var(--bg-0);
  overflow: hidden;
  color: var(--text);
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex-grow: 1;
  padding-bottom: 8px;
  height: 100%;
}

ul, ol {
  padding-left: 2em;
}

a {
  color: var(--link);
  text-decoration-color: transparent;
  transition: var(--box-shadow-transition);
}

a:hover {
  text-decoration-color: currentColor;
}

a:active {
  color: var(--link-active);
}

/* buttons :) */

button {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  --btn-transition: background 0.1s linear, var(--box-shadow-transition), outline 0.1s linear;
  transition: var(--btn-transition);
}

.pill {
  padding: 0 16px;
  border-radius: 100px;
  min-height: 40px;
}

/* secondary (basic gray button) */

.secondary:hover {
  background: var(--btn);
}

.secondary:active {
  background: var(--btn-active);
}

#panel {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 16px;
  padding-top: 0;
  background: var(--bg-1);
  border-radius: 16px;
  width: var(--panel-width);
  height: calc(100% - 73px);
  transition: right 0.4s ease, width 0.4s ease;
  overflow-y: auto;
}

#panel > div > h2 > i {
  margin-right: 8px;
  /* color: var(--accent); */
}

#close-panel {
  position: sticky;
  float: right;
  top: 16px;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  z-index: 3;
}


#search-results {
  font-family: var(--base-font);
}

#search-results > h2 {
  position: relative;
}

.search-result {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.search-result > span {
  color: var(--text-muted);
}

.search-result > h3 {
  margin: 0;
}

.search-result > h3::after {
  display: none;
}

.search-result-site {
  position: absolute;
  font-size: 0.75em;
  right: -8px;
  top: 0;
  background: var(--btn);
  backdrop-filter: blur(10px);
  padding: 0 8px;
  border-radius: 100px;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.1s linear, clip-path 0.2s ease;
  clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
}

.search-result::after {
  content: "";
  position: absolute;
  inset: -8px -16px;
  background: var(--btn);
  border-radius: 16px;
  z-index: -1;
  transform: scale(0.95);
  opacity: 0;
  transition: opacity 0.1s linear, transform 0.2s ease, background 0.1s linear;
}

.search-result:is(:hover, :focus-within)::after {
  opacity: 1;
  transform: scale(1);
}

.search-result:is(:hover, :focus-within) > .search-result-site {
  opacity: 1;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.search-result:active::after {
  background: var(--btn-active);
}

.search-results-from {
  position: absolute;
  top: -24px;
  right: 0;
  color: var(--text-muted);
  font-size: 0.5em;
}
