/* Shared contract for the primary hub heroes.
   Keep SEO markup page-specific; keep geometry and visual hierarchy global. */

/* One header contract for every primary destination, including calculators. */
body .topbar {
  min-width: 0 !important;
  min-height: 68px !important;
  height: auto !important;
  display: grid !important;
  grid-template-columns: 176px minmax(0, 1fr) 174px !important;
  align-items: center !important;
  gap: 30px !important;
  padding: 0 0 20px !important;
  font-family: "Manrope", system-ui, sans-serif !important;
}

body .topbar .logo {
  display: block !important;
  width: 176px !important;
  max-width: 176px !important;
  min-width: 0 !important;
  height: 42px !important;
  background-size: contain !important;
  background-position: left center !important;
}

body .topbar-nav {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  min-width: 0 !important;
}

body .topbar-nav a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 38px !important;
  padding: 0 11px !important;
  border: 0 !important;
  border-radius: 10px !important;
  color: var(--m3-text-soft, #bbb8ca) !important;
  background: transparent !important;
  text-decoration: none !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 13px !important;
  white-space: nowrap !important;
}

body .topbar-nav a:hover,
body .topbar-nav a:focus-visible {
  color: var(--m3-text, #f4f4fa) !important;
  background: rgba(255, 255, 255, .055) !important;
}

body .topbar-nav a[aria-current="page"] {
  color: var(--m3-primary, #ff8084) !important;
  background: rgba(255, 128, 132, .11) !important;
  box-shadow: inset 0 -2px 0 rgba(255, 128, 132, .78) !important;
}

body .topbar-nav a:last-child {
  color: var(--m3-secondary, #f2bd7e) !important;
}

body .topbar-nav a:last-child[aria-current="page"] {
  color: var(--m3-primary, #ff8084) !important;
}

body .topbar .topbar-cta {
  display: inline-flex !important;
  flex: 0 0 174px !important;
  width: 174px !important;
  min-width: 174px !important;
  max-width: 174px !important;
  min-height: 42px !important;
  height: 42px !important;
  padding: 0 14px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 14px !important;
  white-space: nowrap !important;
}

body .question-hero.unified-hub-hero,
body .academy-index-hero.unified-hub-hero,
body .compatibility-hero.unified-hub-hero {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 1fr) !important;
  gap: 48px !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 500px !important;
  min-height: 500px !important;
  margin: 0 0 clamp(24px, 4vw, 38px) !important;
  padding: 48px 52px !important;
  overflow: hidden !important;
  border: 1px solid rgba(228, 177, 125, .2) !important;
  border-radius: 28px !important;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 128, 132, .16), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, .055), rgba(22, 23, 30, .94) 52%, rgba(242, 189, 126, .055)) !important;
  box-shadow: 0 28px 72px rgba(0, 0, 0, .22) !important;
  box-sizing: border-box !important;
}

.unified-hub-hero::before {
  content: "" !important;
  position: absolute !important;
  inset: auto -150px -210px auto !important;
  width: 430px !important;
  height: 430px !important;
  border: 1px solid rgba(255, 216, 166, .11) !important;
  border-radius: 50% !important;
  box-shadow:
    0 0 0 58px rgba(255, 216, 166, .02),
    0 0 0 116px rgba(255, 128, 132, .014) !important;
  pointer-events: none !important;
}

.unified-hub-hero > * {
  position: relative !important;
  z-index: 1 !important;
  min-width: 0 !important;
}

body .unified-hub-hero > :first-child,
body .academy-index-hero.unified-hub-hero .academy-index-hero__copy,
body .compatibility-hero.unified-hub-hero .compatibility-hero__copy {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

body .unified-hub-hero h1 {
  max-width: 15ch !important;
  margin: 0 !important;
  font-family: "Space Grotesk", "Manrope", sans-serif !important;
  font-size: 3.15rem !important;
  font-weight: 720 !important;
  line-height: 1.01 !important;
  letter-spacing: -.035em !important;
  text-wrap: balance;
  overflow-wrap: normal !important;
}

body .unified-hub-hero .lead,
body .academy-index-hero.unified-hub-hero .academy-index-hero__copy > p:not(.academy-index-hero__label) {
  max-width: 64ch !important;
  margin: 18px 0 0 !important;
  color: var(--m3-text-soft, #bbb8ca) !important;
  font-size: 1.06rem !important;
  line-height: 1.58 !important;
}

body .unified-hub-hero .question-kicker,
body .unified-hub-hero .compatibility-kicker,
body .unified-hub-hero .academy-index-hero__label {
  display: inline-flex !important;
  align-items: center !important;
  width: fit-content !important;
  max-width: 100% !important;
  min-height: 32px !important;
  margin: 0 0 18px !important;
  padding: 7px 13px !important;
  border: 1px solid rgba(255, 216, 166, .22) !important;
  border-radius: 999px !important;
  color: var(--m3-secondary, #f2bd7e) !important;
  background: rgba(255, 216, 166, .075) !important;
  font-size: .74rem !important;
  font-weight: 850 !important;
  line-height: 1.25 !important;
  letter-spacing: .045em !important;
  text-transform: uppercase !important;
}

body .unified-hub-hero .question-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin-top: 22px !important;
}

body .unified-hub-hero .button,
body .unified-hub-hero .compatibility-button {
  min-height: 48px !important;
  padding-inline: 19px !important;
  border-radius: 14px !important;
}

.unified-hub-hero .compatibility-hero__art,
.unified-hub-hero .academy-index-hero__visual,
.unified-hub-hero .unified-hero-art {
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  max-width: 460px !important;
  height: 330px !important;
  margin: 36px 0 0 !important;
  align-self: start !important;
  justify-self: end !important;
  inset: auto !important;
  transform: none !important;
}

.unified-hub-hero .compatibility-hero__art img,
.unified-hub-hero .academy-index-hero__visual img,
.unified-hub-hero .unified-hero-art img {
  display: block !important;
  width: min(100%, 440px) !important;
  height: 292px !important;
  aspect-ratio: 3 / 2 !important;
  object-fit: cover !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  border-radius: 20px !important;
  box-shadow: 0 22px 54px rgba(0, 0, 0, .3) !important;
}

body .unified-hub-hero .system-card-orbit {
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  max-width: 460px !important;
  height: 330px !important;
  min-width: 0 !important;
  margin: 36px 0 0 !important;
  align-self: start !important;
  justify-self: end !important;
  inset: auto !important;
  transform: none !important;
}

body .unified-hub-hero .system-card-orbit::after {
  content: "" !important;
  position: absolute !important;
  inset: 13% 8% 2% !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(255, 128, 132, .2), transparent 67%) !important;
  filter: blur(18px) !important;
}

body .unified-hub-hero .system-card-orbit img {
  position: absolute !important;
  z-index: 2 !important;
  top: 50% !important;
  left: 50% !important;
  display: block !important;
  width: 142px !important;
  height: 237px !important;
  aspect-ratio: 3 / 5 !important;
  object-fit: cover !important;
  border: 1px solid rgba(255, 255, 255, .22) !important;
  border-radius: 16px !important;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .46) !important;
}

body .unified-hub-hero .system-card-orbit img:nth-child(1) {
  transform: translate(-122%, -50%) rotate(-14deg) !important;
}

body .unified-hub-hero .system-card-orbit img:nth-child(2) {
  z-index: 3 !important;
  transform: translate(-50%, -57%) rotate(1deg) !important;
}

body .unified-hub-hero .system-card-orbit img:nth-child(3) {
  transform: translate(22%, -48%) rotate(14deg) !important;
}

body .unified-hub-hero .system-card-orbit span {
  position: absolute !important;
  z-index: 4 !important;
  right: 0 !important;
  bottom: 0 !important;
  max-width: 210px !important;
  padding: 10px 13px !important;
  border: 1px solid rgba(255, 255, 255, .14) !important;
  border-radius: 14px !important;
  color: var(--m3-text-soft, #bbb8ca) !important;
  background: rgba(18, 19, 25, .82) !important;
  backdrop-filter: blur(10px) !important;
  font-size: .82rem !important;
  line-height: 1.4 !important;
}

body .academy-index-hero.unified-hub-hero .academy-index-stats {
  gap: 0 !important;
  margin-top: 23px !important;
}

body .academy-index-hero.unified-hub-hero .academy-index-stats span {
  min-width: 0 !important;
  padding: 5px 18px !important;
  border: 0 !important;
  border-right: 1px solid rgba(255, 128, 132, .2) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body .academy-index-hero.unified-hub-hero .academy-index-stats span:first-child {
  padding-left: 0 !important;
}

body .academy-index-hero.unified-hub-hero .academy-index-stats span:last-child {
  border-right: 0 !important;
}

.astro-tools-page .compatibility-article:has(> .unified-hub-hero) {
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

@media (max-width: 900px) {
  body .topbar {
    grid-template-columns: minmax(150px, 1fr) 174px !important;
    gap: 10px 16px !important;
  }

  body .topbar-nav {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    padding: 2px 0 4px !important;
  }

  body .topbar-nav::-webkit-scrollbar {
    display: none !important;
  }

  body .topbar-nav a {
    flex: 0 0 auto !important;
    padding: 0 12px !important;
    background: rgba(255, 255, 255, .035) !important;
  }

  body .question-hero.unified-hub-hero,
  body .academy-index-hero.unified-hub-hero,
  body .compatibility-hero.unified-hub-hero {
    grid-template-columns: minmax(0, 1fr) !important;
    height: auto !important;
    min-height: 0 !important;
    gap: 28px !important;
    padding: 34px !important;
  }

  body .unified-hub-hero > :first-child,
  body .academy-index-hero.unified-hub-hero .academy-index-hero__copy,
  body .compatibility-hero.unified-hub-hero .compatibility-hero__copy {
    height: auto !important;
  }

  .unified-hub-hero .compatibility-hero__art,
  .unified-hub-hero .academy-index-hero__visual,
  .unified-hub-hero .unified-hero-art {
    max-width: 680px !important;
    height: auto !important;
    margin-top: 0 !important;
    justify-self: start !important;
  }

  body .unified-hub-hero .system-card-orbit {
    margin-top: 0 !important;
    justify-self: start !important;
  }
}

@media (max-width: 620px) {
  body .topbar {
    min-height: 96px !important;
    grid-template-columns: minmax(0, 1fr) 145px !important;
    gap: 8px 10px !important;
    padding: 0 0 12px !important;
  }

  body .topbar .logo {
    width: min(45vw, 154px) !important;
    max-width: 154px !important;
    height: 37px !important;
  }

  body .topbar .topbar-cta {
    flex-basis: 145px !important;
    width: 145px !important;
    min-width: 145px !important;
    max-width: 145px !important;
    min-height: 38px !important;
    height: 38px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }

  body .question-hero.unified-hub-hero,
  body .academy-index-hero.unified-hub-hero,
  body .compatibility-hero.unified-hub-hero {
    gap: 24px !important;
    margin-bottom: 24px !important;
    padding: 22px 18px !important;
    border-radius: 20px !important;
  }

  body .unified-hub-hero h1 {
    max-width: 100% !important;
    font-size: clamp(1.85rem, 8.8vw, 2.45rem) !important;
    line-height: 1.02 !important;
    letter-spacing: -.035em !important;
    overflow-wrap: anywhere !important;
  }

  body .unified-hub-hero .lead,
  body .academy-index-hero.unified-hub-hero .academy-index-hero__copy > p:not(.academy-index-hero__label) {
    margin-top: 14px !important;
    font-size: .98rem !important;
    line-height: 1.58 !important;
  }

  body .unified-hub-hero .question-kicker,
  body .unified-hub-hero .compatibility-kicker,
  body .unified-hub-hero .academy-index-hero__label {
    margin-bottom: 12px !important;
    padding: 6px 10px !important;
    font-size: .68rem !important;
    white-space: normal !important;
  }

  .unified-hub-hero .compatibility-hero__art img,
  .unified-hub-hero .academy-index-hero__visual img,
  .unified-hub-hero .unified-hero-art img {
    height: auto !important;
    max-height: 230px !important;
    aspect-ratio: 16 / 9 !important;
    border-radius: 15px !important;
  }

  body .unified-hub-hero .system-card-orbit {
    height: 245px !important;
    overflow: hidden !important;
  }

  body .unified-hub-hero .system-card-orbit img {
    width: 105px !important;
    height: 175px !important;
  }

  body .academy-index-hero.unified-hub-hero .academy-index-stats {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body .academy-index-hero.unified-hub-hero .academy-index-stats span {
    padding: 5px 8px !important;
    text-align: center !important;
  }
}
