:root {
  --bg: #121212;
  --deep: #0d0d0d;
  --text: #e0e0e0;
  --surface: #1e1e1e;
  --blue: #75caff;
  --border: #1c1c1c;
}

html.light-theme {
  --bg: #ffffff;
  --deep: #F2F2F2;
  --text: #1a1a1a;
  --surface: #f5f5f5;
  --blue: #4db5ff;
  --border: #e3e3e3;
}

body {
  font-family: Google Sans Flex, Google Sans, Helvetica Neue, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  padding: 20px;
}

header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 32px;
}

header nav {
  justify-self: start;
}

header input {
  height: 32px;
  border-radius: 20px;
  background-color: var(--deep);
  border: 1px solid var(--border);
  padding: 0px 16px;
  justify-self: center;
  width: 200%;
  color: var(--text);
}

header input:focus {
  outline: none;
  border-color: var(--text);
}

header input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  height: 16px;
  width: 16px;
  background-color: var(--text);
  opacity: 0.5; /* Matches your default link/text opacity */
  cursor: pointer;
  /* Creates a clean 'X' icon mask that automatically takes on your --text color */
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>');
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>');
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* Hover state to match your text hover behavior (opacity 100%) */
header input[type="search"]::-webkit-search-cancel-button:hover {
  opacity: 1;
}

#auth {
  justify-self: end;
}

.icon {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.icon-sm {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.button {
  height: 32px;
  box-sizing: border-box;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  border-radius: 16px;
}

summary {
  list-style: none;
  cursor: pointer;
}

summary::-webkit-details-marker {
  display: none;
}

details {
  position: relative;
}

details div {
  position: absolute;
  display: flex;
  flex-direction: column;
}

details div a, details div span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px;
  white-space: nowrap;
  cursor: pointer;
  opacity: 55%;
}

details div span:hover {
  opacity: 100%;
}

.top {
  top: 100%;
}

.right {
  right: 0;
  left: auto;
}

a {
  color: inherit;
  text-decoration: none;
  opacity: 55%;
}

a:hover {
  opacity: 100%;
}