.part--logo {
  --logo-shown: var(--logo-height);
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border-radius: var(--radius-small);
  line-height: 0;
}
.part--logo:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}
.part--logo .logo__image {
  display: block;
  width: auto;
  height: var(--logo-shown);
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

/* Both, one over the other: the white one shows where the text is light. The one not shown is
   no height, so no width either: the logo is as wide as the one shown when their shapes differ. */
.part--logo.is-both {
  display: inline-grid;
}
.part--logo.is-both .logo__image {
  grid-area: 1 / 1;
  height: calc(var(--logo-shown) * (1 - var(--sc-light, 0)));
  opacity: calc(1 - var(--sc-light, 0));
  transition: opacity 0.3s ease;
}
.part--logo.is-both .logo__image--white {
  height: calc(var(--logo-shown) * var(--sc-light, 0));
  opacity: var(--sc-light, 0);
}
@media (max-width: 767px) {
  .part--logo {
    --logo-shown: calc(var(--logo-height) * 0.8);
  }
}
