:root {
  color-scheme: light;
  --surface: #202122;
  --highlight: #383b3e;
}

@font-face {
  font-family: "Areal Semi Mono";
  src: local("ABC Areal Semi Mono Regular"), local("ABCArealSemiMono-Regular");
  font-style: normal;
  font-weight: 400;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #fff;
}

.navigation {
  position: fixed;
  z-index: 1;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
}

.capsule {
  position: relative;
  display: grid;
  grid-template-columns: 68px 60px 68px;
  align-items: center;
  height: 40px;
  background: var(--surface);
  border-radius: 20px;
}

.capsule img,
.dropdown img {
  display: block;
  flex: none;
  pointer-events: none;
}

.portrait {
  justify-self: center;
  border-radius: 22.4px;
}

.portrait img {
  border-radius: inherit;
}

.toggle,
.plus {
  display: grid;
  place-items: center;
}

.toggle {
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.toggle[aria-expanded="true"] {
  background: var(--highlight);
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  width: min(182px, calc(100vw - 16px));
  transform: translateX(-50%);
  padding-top: 14px;
}

.dropdown ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 12px 12px 12px min(57px, 30vw);
  list-style: none;
  background: var(--surface);
  border-radius: 12px;
}

.dropdown a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  color: inherit;
  text-decoration: none;
  font: 400 0.8125rem / 1rem "Areal Semi Mono", "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.02em;
}

.dropdown a[aria-current]::before {
  content: "";
  position: absolute;
  left: -24px;
  width: 16px;
  height: 16px;
  background: url("assets/check.png") center / 16px 16px no-repeat;
}

.dropdown a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.navigation :focus-visible {
  outline: 1px solid white;
  outline-offset: 2px;
}

@media (pointer: coarse) {
  .toggle::after {
    content: "";
    position: absolute;
    inset: -2px 68px;
  }
}
