/* Shared site chrome, measured from the 1440 / 390 Figma home frames.
 * Layout grows with its content; only icons and logo artwork have fixed sizes. */
:root { --ustd-layout-max: 1440px; }

@font-face {
  font-family: "Aeonik";
  src: url("../fonts/aeonik-regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Aeonik";
  src: url("../fonts/aeonik-medium.otf") format("opentype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
/* Direct copy of Research's unhinted screen fonts; original metrics are preserved. */
@font-face {
  font-family: "Aeonik Screen";
  src: url("../fonts/aeonik-regular-screen.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Aeonik Screen";
  src: url("../fonts/aeonik-medium-screen.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

.ustd-announce,
.ustd-header,
.ustd-footer {
  font-family: "Aeonik", Arial, sans-serif;
  text-rendering: geometricPrecision;
}
.ustd-announce {
  min-height: 0;
  padding: 12px 48px;
  background: #13266b;
}
.ustd-announce__text {
  min-width: 0;
  margin: 0 auto;
  padding: 0;
  font-size: 14px;
  line-height: 20px;
  white-space: normal;
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.92);
}
.ustd-announce__text--mobile { display: none; }

.ustd-header,
body.home .ustd-header {
  position: relative;
  height: auto;
  min-height: 88px;
  background: #fdf8f0;
  border-bottom: 1px solid #e0d7c8;
  color: #13266b;
}
.ustd-header .ustd-header__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  width: calc(100% - 96px);
  max-width: calc(var(--ustd-layout-max) - 96px);
  height: auto;
  min-height: 87px;
  padding: 0;
}
.ustd-header .ustd-header__zone--left,
.ustd-header .ustd-header__hamburger { display: none; }
.ustd-header .ustd-header__logo {
  position: static;
  display: flex;
  align-items: center;
  width: 211.605px;
  max-width: 100%;
  height: auto;
  min-height: 44px;
  gap: 0;
  transform: none;
}
.ustd-brand-graphic {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 211.605 / 30;
  flex: 0 1 auto;
}
.ustd-brand-graphic__symbol {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  width: 22.69079%;
  height: 100%;
  max-width: none;
}
.ustd-brand-graphic__wordmark {
  position: absolute;
  inset: 20.92% 0 20.92% auto;
  display: block;
  width: 69.51%;
  height: 58.16%;
  max-width: none;
}
.ustd-header .ustd-nav {
  position: static;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  justify-self: center;
  min-width: 0;
  height: auto;
  gap: 0 32px;
  transform: none;
}
.ustd-header .ustd-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  gap: 0 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ustd-header .ustd-nav__list li { display: flex; min-width: 0; max-width: 100%; }
.ustd-header .ustd-nav__link {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.ustd-header .ustd-header__actions {
  position: static;
  display: flex;
  align-items: center;
  width: auto;
  margin: 0;
  gap: 12px;
}
.ustd-header .ustd-header__iconbtn {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 0;
}
.ustd-header .ustd-header__iconbtn img {
  display: block;
  width: 22px;
  height: 22px;
}

.ustd-footer {
  height: auto;
  min-height: 0;
  padding: 0;
  background: #13266b;
}
.ustd-footer .ustd-footer__inner {
  display: block;
  width: calc(100% - 96px);
  max-width: calc(var(--ustd-layout-max) - 96px);
  height: auto;
  min-height: 0;
  padding: 56px 0 40px;
}
.ustd-footer .ustd-footer__cols {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
}
.ustd-footer .ustd-footer__links { display: contents; }
.ustd-footer .ustd-footer__brand,
.ustd-footer .ustd-footer__col {
  grid-column: auto;
  min-width: 0;
  margin: 0;
  border: 0;
}
.ustd-footer .ustd-footer__logo {
  display: flex;
  align-items: center;
  width: 211.605px;
  max-width: 100%;
  height: auto;
  min-height: 0;
  margin: 0 0 12px;
  gap: 0;
}
.ustd-footer .ustd-footer__tagline {
  max-width: none;
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.75);
}
.ustd-footer .ustd-footer__heading {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: normal;
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.7);
}
.ustd-footer .ustd-footer__list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  gap: 12px;
}
.ustd-footer .ustd-footer__list li { min-width: 0; line-height: 22px; }
.ustd-footer .ustd-footer__list a,
.ustd-footer .ustd-footer__list span {
  display: inline-block;
  min-height: 0;
  max-width: 100%;
  font-size: 15px;
  font-weight: 400;
  line-height: 22px;
  overflow-wrap: anywhere;
  color: #fff;
}
.ustd-footer .ustd-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin: 40px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.ustd-footer .ustd-footer__disclaimer,
.ustd-footer .ustd-footer__copy {
  min-width: 0;
  max-width: none;
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.72);
}
.ustd-footer .ustd-footer__disclaimer { flex: 1; }
.ustd-footer .ustd-footer__copy { flex: 0 1 auto; max-width: 100%; white-space: normal; }

@media (max-width: 1080px) {
  .ustd-header,
  body.home .ustd-header { min-height: 61px; }
  .ustd-header .ustd-header__inner {
    width: 100%;
    grid-template-columns: 88px minmax(0, 1fr) 88px;
    min-height: 60px;
    padding: 0 8px;
    gap: 0;
  }
  .ustd-header .ustd-header__zone--left {
    display: flex;
    align-items: center;
    min-width: 0;
    width: auto;
  }
  .ustd-header .ustd-header__hamburger {
    position: static;
    display: inline-flex;
  }
  .ustd-header .ustd-header__logo {
    position: static;
    justify-self: center;
    width: 155.177px;
    max-width: 100%;
    height: auto;
    transform: none;
  }
  .ustd-header .ustd-nav { display: none; }
  .ustd-header .ustd-header__actions { justify-content: flex-end; gap: 0; }
  .ustd-header .ustd-header__iconbtn--account { display: none; }
  .ustd-footer .ustd-footer__cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 26px;
  }
  .ustd-footer .ustd-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .ustd-announce { min-height: 0; padding: 12px 24px; }
  .ustd-announce__text--desktop { display: none; }
  .ustd-announce__text--mobile {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 0;
    font-size: 12px;
    line-height: 17px;
    white-space: normal;
  }
  .ustd-footer { min-height: 0; padding: 0; }
  .ustd-footer .ustd-footer__inner { width: calc(100% - 48px); min-height: 0; padding: 48px 0 32px; }
  .ustd-footer .ustd-footer__cols {
    display: block;
  }
  .ustd-footer .ustd-footer__links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 16px;
    margin-top: 26px;
  }
  .ustd-footer .ustd-footer__brand { margin: 0; }
  .ustd-footer .ustd-footer__logo { width: 169.284px; margin-bottom: 14px; }
  .ustd-footer .ustd-footer__tagline { font-size: 13px; line-height: 19px; }
  .ustd-footer .ustd-footer__heading {
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 16px;
  }
  .ustd-footer .ustd-footer__list { gap: 8px; }
  .ustd-footer .ustd-footer__legal {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 26px;
    padding-top: 20px;
    gap: 8px;
  }
  .ustd-footer .ustd-footer__disclaimer,
  .ustd-footer .ustd-footer__copy { font-size: 11px; line-height: 17px; }
}

/* Research text-rendering correction, adapted to the .us paper header and copy.
   Opacity stays outside the filter, and vector logos/icons are never filtered. */
html[data-ustd-font-rendering="windows"] :is(.ustd-announce,.ustd-header,.ustd-footer) {
  font-family: "Aeonik Screen", "Aeonik", Arial, sans-serif;
}
html[data-ustd-font-rendering="windows"] .ustd-header--paper .ustd-nav__link {
  filter: url(#ustd-text-grayscale);
}
html[data-ustd-font-rendering="windows"] .ustd-announce__text { color: #fff; opacity: .92; }
html[data-ustd-font-rendering="windows"] :is(.ustd-announce__text--desktop > span,.ustd-announce__text--mobile) {
  filter: url(#ustd-text-edge-alpha);
}
html[data-ustd-font-rendering="windows"] .ustd-footer :is(.ustd-footer__heading,.ustd-footer__list a,.ustd-footer__list span,.ustd-footer__tagline,.ustd-footer__legal p) {
  filter: url(#ustd-text-edge-alpha);
  color: #fff;
}
html[data-ustd-font-rendering="windows"] .ustd-footer__heading { opacity: .7; }
html[data-ustd-font-rendering="windows"] .ustd-footer__tagline { opacity: .75; }
html[data-ustd-font-rendering="windows"] .ustd-footer__legal p { opacity: .72; }

/* Copied from Research's chrome: dialogs remain below the WordPress toolbar. */
body.admin-bar :is(#ustd-menu-drawer,#ustd-cart-drawer) { top: var(--wp-admin--admin-bar--height,32px); }
body.admin-bar #ustd-menu-drawer {
  height: calc(100vh - var(--wp-admin--admin-bar--height,32px));
  height: calc(100dvh - var(--wp-admin--admin-bar--height,32px));
}

/* Final library pixels match the existing menu field. The more specific
   selector also wins when drawer.css is enqueued after this stylesheet. */
#ustd-menu-drawer.ustd-menu-drawer {
  background-image: url("../imagery/menu/mobile/menu-background_brand-gradient.webp");
}
