/* One shared wordmark component. Settings are emitted by the Wordmark panel.
 * Keep the selectors specific enough to supersede older article/phone rules,
 * while leaving every other heading, the tagline and navigation untouched. */
html body .ag-site-header .ag-masthead .ag-masthead-title {
  --ag-wordmark-logo-width: var(--ag-wordmark-mobile-width, 189px);
  --ag-wordmark-logo-height: calc(var(--ag-wordmark-mobile-width, 189px) * 26 / 189);
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: var(--ag-wordmark-logo-width) !important;
  max-width: 100% !important;
  height: var(--ag-wordmark-logo-height) !important;
  min-width: 0 !important;
  margin: 5px auto 0 !important;
  padding: 0 !important;
}

html body .ag-site-header .ag-masthead .ag-masthead-title,
html body .ag-site-header .ag-masthead .ag-masthead-title a {
  font-family: "Merriweather", Georgia, serif !important;
  font-style: italic !important;
  font-weight: 900 !important;
  /* The viewport cap also keeps a large saved setting safe without JavaScript. */
  font-size: var(--ag-wordmark-fit-size, min(calc(var(--ag-wordmark-logo-width) / 12), 6vw)) !important;
  line-height: .92 !important;
  letter-spacing: .045em !important;
  white-space: nowrap !important;
}

html body .ag-site-header .ag-masthead .ag-masthead-title a {
  display: inline-block !important;
  flex: 0 0 auto;
  width: max-content !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

@media (min-width: 740px) {
  html body .ag-site-header .ag-masthead .ag-masthead-title {
    --ag-wordmark-logo-width: calc(var(--ag-wordmark-mobile-width, 189px) * 225 / 189);
    --ag-wordmark-logo-height: calc(var(--ag-wordmark-mobile-width, 189px) * 31 / 189);
    margin: 4px auto 0 !important;
  }
}

@media (min-width: 1024px) {
  html body .ag-site-header .ag-masthead .ag-masthead-title {
    --ag-wordmark-logo-width: calc(var(--ag-wordmark-desktop-width, 485px) * 450 / 485);
    --ag-wordmark-logo-height: calc(var(--ag-wordmark-desktop-width, 485px) * 61 / 485);
    margin: 10px auto 6px !important;
  }
}

@media (min-width: 1070px) {
  html body .ag-site-header .ag-masthead .ag-masthead-title {
    --ag-wordmark-logo-width: var(--ag-wordmark-desktop-width, 485px);
    --ag-wordmark-logo-height: calc(var(--ag-wordmark-desktop-width, 485px) * 64 / 485);
  }
}

/* Footer is independently sized and retains its existing wrapping and colors. */
html body .ag-site-footer .ag-footer-title,
html body .ag-site-footer .ag-footer-title a {
  font-size: clamp(var(--ag-wordmark-footer-min, 32px), 4vw, var(--ag-wordmark-footer-max, 64px)) !important;
}
