/* Stable destinations and explicit current-page state across all calculators. */
body:is(.bmi-page, .calculators-redesign-page) > header .site-switcher {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 !important;
  width: min(44vw, 520px) !important;
  left: 50% !important;
  right: auto !important;
  overflow: visible !important;
  z-index: 20 !important;
  transform: translateX(-50%) !important;
}

body:is(.bmi-page, .calculators-redesign-page) > header .site-switcher a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--ves-muted) !important;
  font-size: .72rem !important;
  text-align: center;
  text-decoration: none;
  box-shadow: none !important;
  transform: none !important;
}

body:is(.bmi-page, .calculators-redesign-page) > header .site-switcher a::after {
  position: absolute;
  inset: auto 10px 0;
  height: 2px;
  background: transparent !important;
  content: "";
}

body:is(.bmi-page, .calculators-redesign-page) > header .site-switcher a[aria-current="page"] {
  color: var(--ves-ink) !important;
}

body:is(.bmi-page, .calculators-redesign-page) > header .site-switcher a[aria-current="page"]::after {
  background: var(--ves-primary) !important;
}

body:is(.bmi-page, .calculators-redesign-page) > header .site-switcher a:hover {
  color: var(--ves-primary) !important;
}

/* Keep the theme and account controls clear of the centered calculator nav. */
body:is(.bmi-page, .calculators-redesign-page) > header .header-actions {
  position: relative !important;
  z-index: 30 !important;
  margin-left: auto !important;
  pointer-events: auto;
}

body:is(.bmi-page, .calculators-redesign-page) > header .site-switcher a:focus-visible {
  outline: 2px solid var(--ves-primary) !important;
  outline-offset: -4px;
}

@media (max-width: 1000px) {
  body:is(.bmi-page, .calculators-redesign-page) > header {
    display: block !important;
    height: auto !important;
  }

  body:is(.bmi-page, .calculators-redesign-page) > header .header-top {
    display: flex !important;
    height: 58px !important;
    min-height: 58px !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
  }

  body:is(.bmi-page, .calculators-redesign-page) > header .header-actions {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    grid-column: auto !important;
    grid-row: auto !important;
    height: 58px !important;
    min-height: 58px !important;
  }

  body:is(.bmi-page, .calculators-redesign-page) > header .user-menu {
    position: static !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
  }

  body:is(.bmi-page, .calculators-redesign-page) > header .site-switcher {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
    margin: 0 !important;
    padding-top: 2px !important;
    transform: translateY(2px) !important;
  }

  body:is(.bmi-page, .calculators-redesign-page) > header .header-actions {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    z-index: 30 !important;
  }

  body:is(.bmi-page, .calculators-redesign-page) > header .site-switcher a {
    min-width: 0;
    min-height: 44px;
    padding: 8px 4px !important;
    white-space: normal;
    line-height: 1.3;
  }
}

@media (max-width: 480px) {
  body:is(.bmi-page, .calculators-redesign-page) > header .header-top,
  body:is(.bmi-page, .calculators-redesign-page) > header .header-actions {
    height: 50px !important;
    min-height: 50px !important;
  }
}

/* Match the weight calculator's flat notice and restrained typography. */
body.calories-page .disclaimer-wrapper {
  padding: 22px 24px !important;
  border: 1px solid var(--ves-line) !important;
  border-radius: 6px !important;
  background: var(--ves-soft) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.calories-page .disclaimer {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--ves-muted) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: .76rem !important;
  line-height: 1.55 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  backdrop-filter: none !important;
}

body.calories-page .disclaimer-kicker {
  color: var(--ves-primary) !important;
  font-family: inherit !important;
  font-size: .68rem !important;
  font-weight: 700 !important;
  letter-spacing: .055em !important;
}

body.calories-page .disclaimer strong { color: var(--ves-ink); }
body.calories-page .disclaimer-wrapper::before,
body.calories-page .disclaimer-wrapper::after,
body.calories-page .disclaimer::before,
body.calories-page .disclaimer::after { content: none !important; }
