/* Shared logo treatment. Load after page styles so every page uses the same frame. */
.site-header .brand-logo,
.site-footer .footer-logo {
  display: block;
  box-sizing: border-box;
  flex: 0 0 auto;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  object-fit: contain;
  object-position: center;
  border: 2px solid #fff;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
}

.site-header .brand-logo {
  width: 3.375rem;
  height: 3.375rem;
}

.site-footer .footer-logo {
  width: 7rem;
  height: 7rem;
}

@media (max-width: 70rem) {
  .site-header .brand-logo {
    width: 2.75rem;
    height: 2.75rem;
  }
}

/* The link includes the image (and, in the header, the wordmark). Keep the
   generic link highlight off that rectangular box; draw feedback on the circle. */
:root body :is(.site-header a.brand[href], .site-footer a.footer-brand[href]) {
  background: transparent;
  color: #fff;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

/* Keep footer spacing outside the link so its hit area is a true circle. */
.site-footer .footer-brand {
  border-radius: 50%;
  margin-bottom: 1rem;
  vertical-align: top;
}
.site-footer .footer-logo { margin: 0; }

.site-header .brand-logo,
.site-footer .footer-logo {
  outline: 3px solid transparent;
  outline-offset: 3px;
}

@media (hover: hover) {
  :root body :is(.site-header a.brand[href], .site-footer a.footer-brand[href]):hover :is(.brand-logo, .footer-logo) {
    outline-color: #fff0d5;
  }
}

:root body :is(.site-header a.brand[href], .site-footer a.footer-brand[href]):active :is(.brand-logo, .footer-logo) {
  outline-color: #fff;
  box-shadow: 0 0 0 6px #74351d;
}

/* Keyboard focus remains visible, but its two-tone ring follows the logo. */
:root body :is(.site-header a.brand[href], .site-footer a.footer-brand[href]):focus-visible {
  outline: none;
  box-shadow: none;
}
:root body :is(.site-header a.brand[href], .site-footer a.footer-brand[href]):focus-visible :is(.brand-logo, .footer-logo) {
  outline-color: #fff;
  box-shadow: 0 0 0 6px #073b45;
}

@media (forced-colors: active) {
  :root body :is(.site-header a.brand[href], .site-footer a.footer-brand[href]):is(:focus-visible, :active) :is(.brand-logo, .footer-logo) {
    outline-color: Highlight;
    box-shadow: none;
  }
}
@media (forced-colors: active) and (hover: hover) {
  :root body :is(.site-header a.brand[href], .site-footer a.footer-brand[href]):hover :is(.brand-logo, .footer-logo) {
    outline-color: Highlight;
  }
}
